[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bugfix: c-mode, font-locking array declaration
From: |
Alexander Pohoyda |
Subject: |
bugfix: c-mode, font-locking array declaration |
Date: |
Sun, 7 Dec 2003 12:49:39 +0100 (CET) |
There seems to be a bug in c-mode. In the string:
char abc[23], def;
variable `def' is not fontified.
Here's the proposed patch:
--- /workspace/emacs/lisp/progmodes/cc-fonts.el Sun Nov 16 20:30:34 2003
+++ cc-fonts.el Sun Dec 7 12:30:33 2003
@@ -791,10 +791,11 @@
;; beginning of an initializer or function prototype ("="
;; or "\\s\(").
(c-syntactic-re-search-forward
- "[\];,\{\}\[\)>]\\|\\'\\|\\(=\\|\\(\\s\(\\)\\)" limit t t))
+ "[;,\{\}\)>]\\|\\'\\|\\(=\\|\\(\\s\(\\)\\)" limit t t))
(setq next-pos (match-beginning 0)
- id-face (if (match-beginning 2)
+ id-face (if (and (match-beginning 2)
+ (string-equal (match-string 2) "("))
'font-lock-function-name-face
'font-lock-variable-name-face)
got-init (match-beginning 1))
--
Alexander Pohoyda <alexander.pohoyda@gmx.net>
PGP Key fingerprint: 7F C9 CC 5A 75 CD 89 72 15 54 5F 62 20 23 C6 44
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bugfix: c-mode, font-locking array declaration,
Alexander Pohoyda <=