GNU bug report logs - #2357
imenu-add-menubar-index fails in Objective-C mode

Previous Next

Packages: emacs, cc-mode;

Reported by: Juanma Barranquero <lekktu <at> gmail.com>

Date: Tue, 17 Feb 2009 12:30:05 UTC

Severity: normal

Merged with 1638

Done: Juanma Barranquero <lekktu <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 2357 in the body.
You can then email your comments to 2357 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com:
bug#2357; Package emacs,cc-mode. (Tue, 17 Feb 2009 12:30:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Juanma Barranquero <lekktu <at> gmail.com>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com. (Tue, 17 Feb 2009 12:30:05 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Juanma Barranquero <lekktu <at> gmail.com>
To: Emacs Bug Tracker <submit <at> debbugs.gnu.org>
Subject: imenu-add-menubar-index fails in Objective-C mode
Date: Tue, 17 Feb 2009 13:22:21 +0100
Package: emacs,cc-mode

[This part is a bugfix]

emacs -Q --visit nsfns.m --f imenu-add-menubar-index

 => Error in menu-bar-update-hook: (invalid-function imenu-progress-message)

The reason is that progmodes/cc-menus.el does

  (cc-bytecomp-defun imenu-progress-message)

to avoid loading imenu.el, and then uses `imenu-progress-message' in
Objective-C specific code (cc-imenu-objc-function). But it is a macro,
so it fails.

I think the best way to fix it is just removing the cc-bytecomp-defun
and all calls to imenu-progress-message from cc-menus.el. That macro
has been defined as a no-op since 2004-10-27 and I don't think it is
worth jumping around hoops just to make cc-menus.el successfully
define something that goes unused.

[This part is not a bugfix, so not needed now]

Additionally, there are useless calls to `imenu-progress-message' in
imenu.el, erc/erc-imenu.el and net/smtp-mode.el. For the latter two,
removing the macro calls would also remove the need to require imenu.

    Juanma



2009-02-17  Juanma Barranquero  <lekktu <at> gmail.com>

	* progmodes/cc-menus.el (imenu-progress-message):
	Remove (bogus and useless) cc-bytecomp-defun.
	(cc-imenu-objc-function): Don't call `imenu-progress-message'.
	Don't let-bind unused variable `stupid'.


Index: lisp/progmodes/cc-menus.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/progmodes/cc-menus.el,v
retrieving revision 1.42
diff -u -2 -r1.42 cc-menus.el
--- lisp/progmodes/cc-menus.el	17 Feb 2009 10:59:14 -0000	1.42
+++ lisp/progmodes/cc-menus.el	17 Feb 2009 11:51:30 -0000
@@ -48,5 +48,4 @@
 (cc-bytecomp-defvar imenu-generic-expression)
 (cc-bytecomp-defvar imenu-create-index-function)
-(cc-bytecomp-defun imenu-progress-message)

 
@@ -317,5 +316,4 @@
 	(classcount 0)
 	toplist
-	stupid
 	str
 	str2
@@ -331,8 +329,6 @@
 	   'buffer-substring)))
     (goto-char (point-max))
-    (imenu-progress-message stupid 0)
     ;;
     (while (re-search-backward cc-imenu-objc-generic-expression nil t)
-      (imenu-progress-message stupid)
       (setq langnum (if (match-beginning OBJC)
 			OBJC
@@ -386,5 +382,4 @@
 	      methodlist nil))))
     ;;
-    (imenu-progress-message stupid 100)
     (if (eq (car toplist) nil)
 	(setq toplist (cdr toplist)))




Merged 1638 2357. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Tue, 17 Feb 2009 18:00:04 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com:
bug#2357; Package emacs,cc-mode. (Wed, 18 Feb 2009 03:05:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com. (Wed, 18 Feb 2009 03:05:06 GMT) Full text and rfc822 format available.

Message #12 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: 2357 <at> debbugs.gnu.org,
        Emacs Bug Tracker <submit <at> debbugs.gnu.org>
Subject: Re: bug#2357: imenu-add-menubar-index fails in Objective-C mode
Date: Tue, 17 Feb 2009 21:57:28 -0500
> -(cc-bytecomp-defun imenu-progress-message)

Removing uses of cc-bytecomp-* is always a reason for rejoycing.


        Stefan



Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com:
bug#2357; Package emacs,cc-mode. (Wed, 18 Feb 2009 03:05:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com. (Wed, 18 Feb 2009 03:05:07 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> emacsbugs.donarmstrong.com. (Wed, 18 Mar 2009 14:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 16 years and 101 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.