Commit 4818d210 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(imenu--cleanup): Set alist to its default just once, at the beginning.

Don't recurse on a cdr which is nil.
parent 90914938
......@@ -488,16 +488,18 @@ or 'imenu-create-index-function")
;; Sets the markers in imenu--index-alist
;; point nowhere.
;; if alist is provided use that list.
(and imenu--index-alist
(or alist
(setq alist imenu--index-alist))
(and alist
(lambda (item)
((markerp (cdr item))
(set-marker (cdr item) nil))
((listp (cdr item))
((consp (cdr item))
(imenu--cleanup (cdr item))))))
(if alist alist imenu--index-alist))
(defun imenu-default-create-index-function ()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment