aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/imenu.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/imenu.el b/lisp/imenu.el
index aa4dd433dbe..f35116d840c 100644
--- a/lisp/imenu.el
+++ b/lisp/imenu.el
@@ -488,16 +488,18 @@ or 'imenu-create-index-function")
488 ;; Sets the markers in imenu--index-alist 488 ;; Sets the markers in imenu--index-alist
489 ;; point nowhere. 489 ;; point nowhere.
490 ;; if alist is provided use that list. 490 ;; if alist is provided use that list.
491 (and imenu--index-alist 491 (or alist
492 (setq alist imenu--index-alist))
493 (and alist
492 (mapcar 494 (mapcar
493 (function 495 (function
494 (lambda (item) 496 (lambda (item)
495 (cond 497 (cond
496 ((markerp (cdr item)) 498 ((markerp (cdr item))
497 (set-marker (cdr item) nil)) 499 (set-marker (cdr item) nil))
498 ((listp (cdr item)) 500 ((consp (cdr item))
499 (imenu--cleanup (cdr item)))))) 501 (imenu--cleanup (cdr item))))))
500 (if alist alist imenu--index-alist)) 502 alist)
501 t)) 503 t))
502 504
503(defun imenu-default-create-index-function () 505(defun imenu-default-create-index-function ()