[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r111630: * lisp/imenu.el (imenu--trun
From: |
Leo Liu |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r111630: * lisp/imenu.el (imenu--truncate-items): Fix subalist checking. |
Date: |
Thu, 31 Jan 2013 01:57:54 +0800 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 111630
fixes bug: http://debbugs.gnu.org/13576
committer: Leo Liu <address@hidden>
branch nick: trunk
timestamp: Thu 2013-01-31 01:57:54 +0800
message:
* lisp/imenu.el (imenu--truncate-items): Fix subalist checking.
modified:
lisp/ChangeLog
lisp/imenu.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-01-30 17:16:30 +0000
+++ b/lisp/ChangeLog 2013-01-30 17:57:54 +0000
@@ -1,3 +1,8 @@
+2013-01-30 Leo Liu <address@hidden>
+
+ * imenu.el (imenu--truncate-items): Fix subalist checking.
+ (Bug#13576)
+
2013-01-30 Glenn Morris <address@hidden>
* mouse.el (mouse-drag-line): Avoid pushing same event onto
=== modified file 'lisp/imenu.el'
--- a/lisp/imenu.el 2013-01-30 08:07:37 +0000
+++ b/lisp/imenu.el 2013-01-30 17:57:54 +0000
@@ -555,16 +555,14 @@
(defun imenu--truncate-items (menulist)
"Truncate all strings in MENULIST to `imenu-max-item-length'."
- (mapcar (lambda (item)
- (cond
- ((consp (cdr item))
- (imenu--truncate-items (cdr item)))
- ;; truncate if necessary
- ((and (numberp imenu-max-item-length)
- (> (length (car item)) imenu-max-item-length))
- (setcar item (substring (car item) 0 imenu-max-item-length)))))
- menulist))
-
+ (mapc (lambda (item)
+ ;; truncate if necessary
+ (when (and (numberp imenu-max-item-length)
+ (> (length (car item)) imenu-max-item-length))
+ (setcar item (substring (car item) 0 imenu-max-item-length)))
+ (when (imenu--subalist-p item)
+ (imenu--truncate-items (cdr item))))
+ menulist))
(defun imenu--make-index-alist (&optional noerror)
"Create an index alist for the definitions in the current buffer.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r111630: * lisp/imenu.el (imenu--truncate-items): Fix subalist checking.,
Leo Liu <=