From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Martin Stjernholm Newsgroups: gmane.emacs.bugs Subject: Re: CC Mode 5.28 (ObjC); tags dont work Date: 29 Oct 2002 16:32:40 +0100 Sender: bug-gnu-emacs-admin@gnu.org Message-ID: <5bn0oxp8fb.fsf@lister.roxen.com> References: <5.1.0.14.0.20021016160853.00a02dd0@mbox.su.se> <87of9d46hq.fsf@pot.cnuce.cnr.it> Reply-To: bug-cc-mode@gnu.org NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1035905567 16892 80.91.224.249 (29 Oct 2002 15:32:47 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 29 Oct 2002 15:32:47 +0000 (UTC) Cc: Karl =?iso-8859-1?q?Landstr=F6m?= , bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 186YMH-0004OA-00 for ; Tue, 29 Oct 2002 16:32:45 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 186YMn-0005Cg-00; Tue, 29 Oct 2002 10:33:17 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 186YMW-0004wv-00 for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2002 10:33:00 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 186YMR-0004n8-00 for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2002 10:32:59 -0500 Original-Received: from godzilla.roxen.com ([194.52.182.190] helo=mail.roxen.com) by monty-python.gnu.org with esmtp (Exim 4.10) id 186YML-0004Ft-00; Tue, 29 Oct 2002 10:32:49 -0500 Original-Received: from lister.roxen.com (lister.roxen.com [194.52.182.147]) by mail.roxen.com (Postfix) with ESMTP id 76A4399C3; Tue, 29 Oct 2002 16:32:40 +0100 (MET) Original-To: Francesco Potorti` In-Reply-To: <87of9d46hq.fsf@pot.cnuce.cnr.it> Original-Lines: 80 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 Errors-To: bug-gnu-emacs-admin@gnu.org X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.bugs:3784 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:3784 --=-=-= Francesco Potorti` wrote: > > When i try to display tags for Objective-C sourse code with function > > `imenu' i get the error message > > > > wrong type argument: listp, 94 > > > > The speedbar is also unable to show tags for Objective-C code. > > Tags in e.g. C-mode works fine. > > Would you submit a precise test case, and describe exactly what you did > before the error message? Possibly, have a look at the bug reporting > manual page. This bug has already been identified and solved; my response is attached below. I usually don't keep the CC to bug-gnu-emacs@gnu.org for bugs that clearly are CC Mode related, but I guess it wasn't so clear in this case. Sorry for the confusion. --=-=-= Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 8bit To: Karl =?iso-8859-1?q?Landstr=F6m?= Cc: bug-cc-mode@gnu.org Subject: Re: CC Mode 5.28 (ObjC); tags dont work From: Martin Stjernholm MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Karl Landström skrev: > When i try to display tags for Objective-C sourse code with function > `imenu' i get the error message > > wrong type argument: listp, 94 This is due to an initialization error in the Objective-C imenu support. The patch below fixes it. Thank you. (This bug also shows that noone before this has tested and bothered to report imenu in Objective-C since CC Mode 5.26 was released almost three years ago. I suspect that the Objective-C support has substantial bitrot in other areas too. Anyway, the situation should improve with the next release since I've now read up a bit on the language.) Index: cc-menus.el =================================================================== RCS file: /cvsroot/cc-mode/cc-mode/cc-menus.el,v retrieving revision 5.60 diff -u -r5.60 cc-menus.el --- cc-menus.el 18 Feb 2001 18:19:21 -0000 5.60 +++ cc-menus.el 26 Oct 2002 14:31:18 -0000 @@ -405,8 +405,10 @@ ; ()) ; FIXME: Please contribute one! -(defun cc-imenu-init (mode-generic-expression) +(defun cc-imenu-init (mode-generic-expression + &optional mode-create-index-function) (setq imenu-generic-expression mode-generic-expression + imenu-create-index-function mode-create-index-function imenu-case-fold-search nil)) Index: cc-mode.el =================================================================== RCS file: /cvsroot/cc-mode/cc-mode/cc-mode.el,v retrieving revision 5.126 diff -u -r5.126 cc-mode.el --- cc-mode.el 25 Feb 2001 04:54:55 -0000 5.126 +++ cc-mode.el 26 Oct 2002 14:31:18 -0000 @@ -584,7 +584,7 @@ c-access-key c-ObjC-access-key c-method-key c-ObjC-method-key ) - (cc-imenu-init cc-imenu-objc-generic-expression) + (cc-imenu-init nil 'cc-imenu-objc-function) (run-hooks 'c-mode-common-hook) (run-hooks 'objc-mode-hook) (c-update-modeline)) --=-=-=--