summaryrefslogtreecommitdiff
path: root/helm-imenu.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2017-03-09 09:29:46 +0100
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2017-03-09 09:29:46 +0100
commit91689a341e746b1167c760c2d8c35c4dc0e02f46 (patch)
tree58aee162730f322f989f281faf6b6a4d6aa45404 /helm-imenu.el
parentdbf68f1396f864b0125f16dc59d4d9f8ffab8122 (diff)
Fix imenu transformer to handle more types from semantic.
* helm-imenu.el (helm-imenu-transformer): Fix also buffer-name with overlays.
Diffstat (limited to 'helm-imenu.el')
-rw-r--r--helm-imenu.el12
1 files changed, 8 insertions, 4 deletions
diff --git a/helm-imenu.el b/helm-imenu.el
index d9ed4702..a2535edd 100644
--- a/helm-imenu.el
+++ b/helm-imenu.el
@@ -247,15 +247,19 @@ only '((foo . bar)) is needed."
(cl-loop for (k . v) in candidates
for types = (or (helm-imenu--get-prop k)
(list "Function" k))
- for bufname = (and (markerp v) (buffer-name (marker-buffer v)))
+ for bufname = (buffer-name
+ (pcase v
+ ((pred overlayp) (overlay-buffer v))
+ ((pred markerp) (marker-buffer v))))
for disp1 = (mapconcat
(lambda (x)
(propertize
- x 'face (cond ((string= x "Variables")
+ x 'face (cond ((member x '("Variables" "Classes"))
'font-lock-variable-name-face)
- ((string= x "Function")
+ ((member x '("Function" "Defuns"))
'font-lock-function-name-face)
- ((string= x "Types")
+ ((member x '("Types" "Provides" "Requires"
+ "Imports" "Misc" "Code"))
'font-lock-type-face))))
types helm-imenu-delimiter)
for disp = (propertize disp1 'help-echo bufname)