unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Regression in `imenu--mouse-menu'
@ 2003-05-16 12:47 David PONCE
  2003-05-16 20:55 ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: David PONCE @ 2003-05-16 12:47 UTC (permalink / 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-05-16 23:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-16 12:47 Regression in `imenu--mouse-menu' David PONCE
2003-05-16 20:55 ` Stefan Monnier
2003-05-16 23:00   ` David Ponce

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).