changeset 35243:569b2a1b20df

(imenu--truncate-items): Revert last change.
author Dave Love <fx@gnu.org>
date Thu, 11 Jan 2001 19:04:29 +0000
parents 910222f6a03c
children 682d1ffa0b5e
files lisp/imenu.el
diffstat 1 files changed, 12 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/imenu.el	Thu Jan 11 16:44:28 2001 +0000
+++ b/lisp/imenu.el	Thu Jan 11 19:04:29 2001 +0000
@@ -557,15 +557,18 @@
 
 ;;; 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)