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