Skip to content

Commit

Permalink
Allow handling extra modes in imenu-in-all-bufs (#2052)
Browse files Browse the repository at this point in the history
* helm-imenu.el (helm-imenu-extra-modes): New.
(helm-imenu-candidates-in-all-buffers): Use it.
  • Loading branch information
thierryvolpiatto committed Jun 5, 2018
1 parent 9591011 commit cd0f52a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion helm-imenu.el
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit cd0f52a

Please sign in to comment.