1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-16 17:19:41 +00:00

(imenu--truncate-items): Revert last change.

This commit is contained in:
Dave Love 2001-01-11 19:04:29 +00:00
parent 3280fbe885
commit 117be359bf

View File

@ -557,15 +557,18 @@ This variable is local in all buffers, once set.")
;;; Truncate all strings in MENULIST to imenu-max-item-length
(defun imenu--truncate-items (menulist)
(dolist (item menulist)
(cond
((consp (cdr item))
(imenu--truncate-items (cdr item)))
(t
;; truncate if necessary
(if (and (numberp imenu-max-item-length)
(> (length (car item)) imenu-max-item-length))
(setcar item (substring (car item) 0 imenu-max-item-length)))))))
(mapcar (function
(lambda (item)
(cond
((consp (cdr item))
(imenu--truncate-items (cdr item)))
(t
;; truncate if necessary
(if (and (numberp imenu-max-item-length)
(> (length (car item)) imenu-max-item-length))
(setcar item (substring (car item) 0
imenu-max-item-length)))))))
menulist))
(defun imenu--make-index-alist (&optional noerror)