From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.bugs Subject: bug#2357: imenu-add-menubar-index fails in Objective-C mode Date: Tue, 17 Feb 2009 13:22:21 +0100 Message-ID: Reply-To: Juanma Barranquero , 2357@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1234874669 860 80.91.229.12 (17 Feb 2009 12:44:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 17 Feb 2009 12:44:29 +0000 (UTC) To: Emacs Bug Tracker Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 17 13:45:44 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LZPKZ-00006n-LR for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Feb 2009 13:45:43 +0100 Original-Received: from localhost ([127.0.0.1]:47027 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LZPJF-0000MP-KR for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Feb 2009 07:44:21 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LZPIc-0008Mg-EH for bug-gnu-emacs@gnu.org; Tue, 17 Feb 2009 07:43:42 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LZPIZ-0008LU-8v for bug-gnu-emacs@gnu.org; Tue, 17 Feb 2009 07:43:40 -0500 Original-Received: from [199.232.76.173] (port=59233 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LZPIY-0008LM-Tp for bug-gnu-emacs@gnu.org; Tue, 17 Feb 2009 07:43:39 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:42904) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LZPIY-0004yQ-2E for bug-gnu-emacs@gnu.org; Tue, 17 Feb 2009 07:43:38 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n1HChZOc027037; Tue, 17 Feb 2009 04:43:36 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n1HCU5m5023680; Tue, 17 Feb 2009 04:30:05 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Juanma Barranquero Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs , owner@emacsbugs.donarmstrong.com Resent-Date: Tue, 17 Feb 2009 12:30:05 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: report 2357 X-Emacs-PR-Package: emacs,cc-mode X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.123487334622273 (code B ref -1); Tue, 17 Feb 2009 12:30:05 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 17 Feb 2009 12:22:26 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.173]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n1HCMMDB022267 for ; Tue, 17 Feb 2009 04:22:24 -0800 Original-Received: by ug-out-1314.google.com with SMTP id u2so183138uge.14 for ; Tue, 17 Feb 2009 04:22:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=gagkWOoSsRQn2SJgG+fhvclnK8cf2ohYqgzbjDSypR4=; b=uhQ3ZiKpZNRiMFA6e0h+zINFI2uCqsS+8wVGM8B8uo6MvvAqWMFPAmwYNGc7ccnhRU oMj9had+rt0q01sfQl6Rn0c7DUqYipQrZF0kqounvr3mLFyJ/PkzToGjbj0rO8xHj+sG BSbwj8JL2NXU+5ONVop25JMl2+f34GRfUa0BQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=JtTA+8HS1yxmGEbBNu6Tq8mCM+UqVGpptNT3+QkhNIpp6rUAPzdgw/3aysCFLfAG9J /vDW0HG5aHpywLUS8tHYgCaGCCIDbLL4cMe/GJJF0KTbW/pqLghybffDHmoZApb7BBY8 QiNXpVl+kWcMZuNKGq7I+pvToefov0xr3FiqM= Original-Received: by 10.210.129.19 with SMTP id b19mr210573ebd.190.1234873341908; Tue, 17 Feb 2009 04:22:21 -0800 (PST) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Tue, 17 Feb 2009 07:43:40 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:25361 Archived-At: Package: emacs,cc-mode [This part is a bugfix] emacs -Q --visit nsfns.m --f imenu-add-menubar-index =3D> Error in menu-bar-update-hook: (invalid-function imenu-progress-messa= ge) 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 * 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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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) =0C @@ -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)))