From 117be359bf4253cccaf522846ccc2192537bdc10 Mon Sep 17 00:00:00 2001 From: Dave Love Date: Thu, 11 Jan 2001 19:04:29 +0000 Subject: [PATCH] (imenu--truncate-items): Revert last change. --- lisp/imenu.el | 21 ++++++++++++--------- 1 file 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) -- 2.39.5