diff options
author | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2018-06-05 20:27:07 +0200 |
---|---|---|
committer | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2018-06-05 20:27:07 +0200 |
commit | cd0f52aebdfcfd88b038aaf9f5d3f75b036df116 (patch) | |
tree | e4ad8c44b5d75257bffcb9f16611628245acea0a /helm-imenu.el | |
parent | 959101147bba84967de9fab6bc2541ff14123d54 (diff) |
Allow handling extra modes in imenu-in-all-bufs (#2052)
* helm-imenu.el (helm-imenu-extra-modes): New.
(helm-imenu-candidates-in-all-buffers): Use it.
Diffstat (limited to 'helm-imenu.el')
-rw-r--r-- | helm-imenu.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/helm-imenu.el b/helm-imenu.el index bae72955..6ebac9e3 100644 --- a/helm-imenu.el +++ b/helm-imenu.el @@ -81,6 +81,10 @@ Each car is a regexp match pattern of the imenu type string." (regexp :tag "Imenu type regexp pattern") (sexp :tag "Face")))) +(defcustom helm-imenu-extra-modes nil + "Extra modes where helm-imenu-in-all-buffers should look into." + :group 'helm-imenu + :type '(repeat symbol)) ;;; keymap (defvar helm-imenu-map @@ -214,7 +218,8 @@ Each car is a regexp match pattern of the imenu type string." for b in lst for count from 1 when (with-current-buffer b - (and (derived-mode-p 'prog-mode) + (and (or (member major-mode helm-imenu-extra-modes) + (derived-mode-p 'prog-mode)) (helm-same-major-mode-p cur-buf helm-imenu-all-buffer-assoc))) if build-sources |