bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CC Mode 5.28 (ObjC); tags dont work


From: Martin Stjernholm
Subject: Re: CC Mode 5.28 (ObjC); tags dont work
Date: 29 Oct 2002 16:32:40 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

Francesco Potorti` <address@hidden> 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 address@hidden
for bugs that clearly are CC Mode related, but I guess it wasn't so
clear in this case. Sorry for the confusion.


--- Begin Message --- Subject: Re: CC Mode 5.28 (ObjC); tags dont work
Karl Landström <address@hidden> 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))

--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]