all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bugfix: c-mode, font-locking array declaration
@ 2003-12-07 11:49 Alexander Pohoyda
  0 siblings, 0 replies; only message in thread
From: Alexander Pohoyda @ 2003-12-07 11:49 UTC (permalink / raw)
  Cc: bug-gnu-emacs

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


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-12-07 11:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-07 11:49 bugfix: c-mode, font-locking array declaration Alexander Pohoyda

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.