From: "Drew Adams" <drew.adams@oracle.com>
To: 12717@debbugs.gnu.org
Subject: bug#12717: 24.2.50; [PATCH] `imenu--split-submenus' incorrectly distinguishes submenus
Date: Tue, 23 Oct 2012 17:07:11 -0700 [thread overview]
Message-ID: <9212825D880B4B2581E22420DB3B53DC@us.oracle.com> (raw)
Imenu allows the use of something it calls "special" menu elements,
which have this form: (INDEX-NAME POSITION FUNCTION ARGUMENTS...)
`imenu--split-submenus' needs to distinguish submenus from ordinary menu
elements, including from special menu elements. Currently this is
bugged.
The current code for `imenu--split-submenus' does this:
(defun imenu--split-submenus (alist)
"..."
(mapcar (lambda (elt)
(if (and (consp elt) (stringp (car elt)) (listp (cdr elt)))
(imenu--split-menu (cdr elt) (car elt))
elt))
alist))
The `if' condition should instead test whether the element is a submenu.
We have a function that does that: `imenu--subalist-p'. I believe this
is the correct code:
(defun imenu--split-submenus (alist)
"..."
(mapcar (lambda (elt)
(if (imenu--subalist-p elt)
(imenu--split-menu (cdr elt) (car elt))
elt))
alist))
In GNU Emacs 24.2.50.1 (i386-mingw-nt5.1.2600)
of 2012-10-22 on DANI-PC
Bzr revision: 110618 monnier@iro.umontreal.ca-20121022132928-232zm0fecassmhfb
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
`configure --with-gcc (4.7) --no-opt --enable-checking --cflags
-I../../libs/libxpm-3.5.8/include -I../../libs/libxpm-3.5.8/src
-I../../libs/libpng-1.4.10 -I../../libs/zlib-1.2.6
-I../../libs/giflib-4.1.4-1/include -I../../libs/jpeg-6b-4/include
-I../../libs/tiff-3.8.2-1/include
-I../../libs/libxml2-2.7.8-w32-bin/include/libxml2
-I../../libs/gnutls-3.0.16/include
-I../../libs/libiconv-1.14-2-mingw32-dev/include'
next reply other threads:[~2012-10-24 0:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-24 0:07 Drew Adams [this message]
2012-10-30 3:05 ` bug#12717: 24.2.50; [PATCH] `imenu--split-submenus' incorrectly distinguishes submenus Stefan Monnier
2012-10-30 6:18 ` Drew Adams
2012-10-30 6:33 ` Drew Adams
2012-11-15 2:03 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9212825D880B4B2581E22420DB3B53DC@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=12717@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.