mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-27 07:37:33 +00:00
* lisp/imenu.el (imenu--truncate-items): Fix subalist checking.
Fixes: debbugs:13576
This commit is contained in:
parent
741d511359
commit
dd331297c1
@ -1,3 +1,8 @@
|
||||
2013-01-30 Leo Liu <sdl.web@gmail.com>
|
||||
|
||||
* imenu.el (imenu--truncate-items): Fix subalist checking.
|
||||
(Bug#13576)
|
||||
|
||||
2013-01-30 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* mouse.el (mouse-drag-line): Avoid pushing same event onto
|
||||
|
@ -555,16 +555,14 @@ NOT share structure with ALIST."
|
||||
|
||||
(defun imenu--truncate-items (menulist)
|
||||
"Truncate all strings in MENULIST to `imenu-max-item-length'."
|
||||
(mapcar (lambda (item)
|
||||
(cond
|
||||
((consp (cdr item))
|
||||
(imenu--truncate-items (cdr item)))
|
||||
;; truncate if necessary
|
||||
((and (numberp imenu-max-item-length)
|
||||
(> (length (car item)) imenu-max-item-length))
|
||||
(setcar item (substring (car item) 0 imenu-max-item-length)))))
|
||||
menulist))
|
||||
|
||||
(mapc (lambda (item)
|
||||
;; truncate if necessary
|
||||
(when (and (numberp imenu-max-item-length)
|
||||
(> (length (car item)) imenu-max-item-length))
|
||||
(setcar item (substring (car item) 0 imenu-max-item-length)))
|
||||
(when (imenu--subalist-p item)
|
||||
(imenu--truncate-items (cdr item))))
|
||||
menulist))
|
||||
|
||||
(defun imenu--make-index-alist (&optional noerror)
|
||||
"Create an index alist for the definitions in the current buffer.
|
||||
|
Loading…
Reference in New Issue
Block a user