[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Regression in `imenu--mouse-menu'
From: |
David PONCE |
Subject: |
Regression in `imenu--mouse-menu' |
Date: |
Fri, 16 May 2003 14:47:26 +0200 (CEST) |
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
- Regression in `imenu--mouse-menu',
David PONCE <=