[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
font-lock-add-keywords is not being honored
From: |
Rami A |
Subject: |
font-lock-add-keywords is not being honored |
Date: |
Thu, 25 Apr 2013 10:02:04 -0700 (PDT) |
User-agent: |
G2/1.0 |
I have the following color settings in my dotemacs file:
(defconst lconfig-font-lock-faces
(list
'(font-lock-builtin-face
((((class color)) (:foreground "Red" :bold t))))
'(font-lock-constant-face
((((class color)) (:foreground "Black" :bold t))))
'(font-lock-preprocessor-face
((((class color)) (:foreground "DarkBlue" :bold t))))
)
)
Then I am configuring specific words to be colored in this form:
(font-lock-add-keywords
'c-mode
'(
("^#[ \t]*\\(ifdef\\|else\\|ifndef\\|if !?defined\\|elif
!?defined\\|if\\|elif\\|endif\\|ident\\).*$" 1 font-lock-constant-face)
;#defines
)
)
Unfortunately, in c files # preprocessors stay in blue color and not black as I
configured "font-lock-constant-face".
Commenting out the lines:
'(font-lock-preprocessor-face
((((class color)) (:foreground "DarkBlue" :bold t))))
will make them in Red color.
And commenting the lines:
'(font-lock-builtin-face
((((class color)) (:foreground "Red" :bold t))))
Will bring them back to the violent color that you get when you start emacs
without a dotemacs file.
What am I doing wrong?
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- font-lock-add-keywords is not being honored,
Rami A <=