From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David PONCE Newsgroups: gmane.emacs.devel Subject: Regression in `imenu--mouse-menu' Date: Fri, 16 May 2003 14:47:26 +0200 (CEST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <25287543.1053089246520.JavaMail.www@wwinf0401> Reply-To: david.ponce@wanadoo.fr NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1053089654 21017 80.91.224.249 (16 May 2003 12:54:14 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 16 May 2003 12:54:14 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri May 16 14:54:09 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19Gefb-0005DF-00 for ; Fri, 16 May 2003 14:50:43 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19Genx-0004EG-00 for ; Fri, 16 May 2003 14:59:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19Gecn-0000Ac-06 for emacs-devel@quimby.gnus.org; Fri, 16 May 2003 08:47:49 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 19GecV-00009z-00 for emacs-devel@gnu.org; Fri, 16 May 2003 08:47:31 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 19GecR-00007w-00 for emacs-devel@gnu.org; Fri, 16 May 2003 08:47:30 -0400 Original-Received: from smtp5.wanadoo.fr ([193.252.22.27] helo=mwinf0404.wanadoo.fr) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19GecR-00007r-00 for emacs-devel@gnu.org; Fri, 16 May 2003 08:47:27 -0400 Original-Received: from wwinf0401 (wwinf0401 [172.22.135.28]) by mwinf0404.wanadoo.fr (SMTP Server) with ESMTP id 82AB73800134 for ; Fri, 16 May 2003 14:47:26 +0200 (CEST) Original-To: emacs-devel X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:13926 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:13926 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