Subject: bug#13576: closed (Re: bug#13576: 24.2.92; [PATCH] a bug in imenu--truncate-items)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 30 Jan 2013 18:03:01 +0000

Your bug report

#13576: 24.2.92; [PATCH] a bug in imenu--truncate-items

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
13576: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13576
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#13576: 24.2.92; [PATCH] a bug in imenu--truncate-items
From: Leo Liu <[email-masked]>
To: [email-masked]
Date: Thu, 31 Jan 2013 02:01:20 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Fixed in trunk

Subject: 24.2.92; [PATCH] a bug in imenu--truncate-items
From: Leo Liu <[email-masked]>
To: [email-masked]
Date: Mon, 28 Jan 2013 23:09:04 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

According to documentation on imenu--index-alist, a special item looks
like:

        (INDEX-NAME POSITION FUNCTION ARGUMENTS...)

which fails imenu--truncate-items.

diff --git a/lisp/imenu.el b/lisp/imenu.el
index 80dacf93..649fc0a7 100644
--- a/lisp/imenu.el
+++ b/lisp/imenu.el
@@ -557,7 +557,7 @@ (defun imenu--truncate-items (menulist)
   "Truncate all strings in MENULIST to `imenu-max-item-length'."
   (mapcar (lambda (item)
             (cond
-             ((consp (cdr item))
+             ((imenu--subalist-p item)
               (imenu--truncate-items (cdr item)))
              ;; truncate if necessary
              ((and (numberp imenu-max-item-length)