summaryrefslogtreecommitdiff
path: root/lisp
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
commit117be359bf4253cccaf522846ccc2192537bdc10 (patch)
treef57546ea564d0782ab9c06553431f9aea48e849e /lisp
parent3280fbe885ab0b9d16e898a44032338eda5840fe (diff)
downloademacs-117be359bf4253cccaf522846ccc2192537bdc10.tar.gz
(imenu--truncate-items): Revert last change.
Diffstat (limited to 'lisp')
-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)