Mercurial > emacs
changeset 74009:0588a1acad14
(c-font-lock-declarators): Iff at the top-level or inside a class
declaration, use c-at-toplevel-p rather than a variable instantiation
to recognise a function declaration. Suggested by Feng Li
<fengli@gmail.com>.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Wed, 15 Nov 2006 16:31:03 +0000 |
parents | eba67440b734 |
children | ba98b964892a |
files | lisp/progmodes/cc-fonts.el |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/progmodes/cc-fonts.el Wed Nov 15 16:30:48 2006 +0000 +++ b/lisp/progmodes/cc-fonts.el Wed Nov 15 16:31:03 2006 +0000 @@ -897,7 +897,11 @@ "[;,]\\|\\s)\\|\\'\\|\\(=\\|\\s(\\)" limit t t)) (setq next-pos (match-beginning 0) - id-face (if (eq (char-after next-pos) ?\() + id-face (if (and (eq (char-after next-pos) ?\() + (let (c-last-identifier-range) + (save-excursion + (goto-char next-pos) + (c-at-toplevel-p)))) 'font-lock-function-name-face 'font-lock-variable-name-face) got-init (and (match-beginning 1)