unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David PONCE <david.ponce@wanadoo.fr>
Subject: Regression in `imenu--mouse-menu'
Date: Fri, 16 May 2003 14:47:26 +0200 (CEST)	[thread overview]
Message-ID: <25287543.1053089246520.JavaMail.www@wwinf0401> (raw)

Hi,

As indicated in its doc string the function `imenu--mouse-menu' should
"Returns t for rescan and otherwise an element or subelement of
INDEX-ALIST.".

I checked that it works as expected in both Emacs 20.7 and 21.3.

Using the CVS HEAD version of Emacs, `imenu--mouse-menu' always
returns nil, and unconditionally moves the cursor to the position in
the cdr of the selected item.

The following simple test illustrates that:

emacs -q --no-site-file

(require 'imenu)
(imenu--mouse-menu
 '(
   ("a" . a)
   ("b" . b)
   ("c" . c)
   ("d" . 1)
   ("e" . e)
   ("f" . f)
   )
 t)

In both Emacs 20.7 and 21.3, when I execute the above code and select,
for example, the menu item "c", `imenu--mouse-menu' correctly returns
the element ("c" . c).

The same code run in Emacs HEAD fails with the following error:

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p c)
  imenu-default-goto-function("c" c)
  apply(imenu-default-goto-function "c" c nil)
  imenu(("c" . c))
  imenu--menubar-select(("c" . c))

When I select the menu item "d", Emacs 20.7 and 21.3 return ("d" . 1),
Emacs HEAD returns nil and moves the point to 1.

That new behavior is quite annoying and breaks existing code (for
example, in the JDEE and Semantic, that use `imenu--menubar-select'
to display (possibly large) completion menus, to benefit of the nice
automatic menu split done by imenu).

In case it helps, After replacing the code of `imenu--menubar-select'
in HEAD by the 21.3 version, the function works again as expected.

Sincerely,
David

             reply	other threads:[~2003-05-16 12:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-16 12:47 David PONCE [this message]
2003-05-16 20:55 ` Regression in `imenu--mouse-menu' Stefan Monnier
2003-05-16 23:00   ` David Ponce

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=25287543.1053089246520.JavaMail.www@wwinf0401 \
    --to=david.ponce@wanadoo.fr \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).