diff options
author | Dave Love <fx@gnu.org> | 2001-01-11 19:04:29 +0000 |
---|---|---|
committer | Dave Love <fx@gnu.org> | 2001-01-11 19:04:29 +0000 |
commit | 117be359bf4253cccaf522846ccc2192537bdc10 (patch) | |
tree | f57546ea564d0782ab9c06553431f9aea48e849e /lisp | |
parent | 3280fbe885ab0b9d16e898a44032338eda5840fe (diff) | |
download | emacs-117be359bf4253cccaf522846ccc2192537bdc10.tar.gz |
(imenu--truncate-items): Revert last change.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/imenu.el | 21 |
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) |