From: Dave Love Date: Thu, 11 Jan 2001 19:04:29 +0000 (+0000) Subject: (imenu--truncate-items): Revert last change. X-Git-Tag: emacs-pretest-21.0.96~343 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=117be359bf4253cccaf522846ccc2192537bdc10;p=emacs.git (imenu--truncate-items): Revert last change. --- diff --git a/lisp/imenu.el b/lisp/imenu.el index 1457f6f861c..486fb0d2394 100644 --- a/lisp/imenu.el +++ b/lisp/imenu.el @@ -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)