summaryrefslogtreecommitdiff
path: root/lisp/imenu.el
diff options
context:
space:
mode:
authorDave Love <fx@gnu.org>2001-01-11 19:04:29 +0000
committerDave Love <fx@gnu.org>2001-01-11 19:04:29 +0000
commite6dc1fae2cf7b8f22f936de9c2603dcacea2357b (patch)
tree12c1c7558366aa70fe51438504e3c43a2ea177fa /lisp/imenu.el
parent050e6b99b2e837810b998e0e31f7b039df7325e3 (diff)
downloademacs-e6dc1fae2cf7b8f22f936de9c2603dcacea2357b.tar.gz
(imenu--truncate-items): Revert last change.
Diffstat (limited to 'lisp/imenu.el')
-rw-r--r--lisp/imenu.el21
1 files changed, 12 insertions, 9 deletions
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)