* face font in c-mode when adding new keyword
@ 2013-07-31 19:10 Rami A
2013-08-01 18:48 ` Rami A
0 siblings, 1 reply; 2+ messages in thread
From: Rami A @ 2013-07-31 19:10 UTC (permalink / raw)
To: help-gnu-emacs
Hi,
I am trying to customize some added words to be colored differently from the default face-font colors.
This is what I am doing:
(defconst lconfig-font-lock-faces
(list
'(font-lock-function-name-face
((((class color)) (:foreground "DarkBlue" :bold t))))
'(font-lock-constant-face
((((class color)) (:foreground "Black" :bold t))))
'(font-lock-builtin-face
((((class color)) (:foreground nil))))
'(font-lock-preprocessor-face
((((class color)) (:foreground nil))))
)
)
(autoload 'custom-set-faces "font-lock" "Set the color scheme" t)
(autoload 'font-lock-fontify-buffer "font-lock" "Fontify Buffer" t)
(progn (apply 'custom-set-faces lconfig-font-lock-faces)
(add-hook 'c-mode-common-hook 'font-lock-fontify-buffer)
(add-hook 'emacs-lisp-mode-hook 'font-lock-fontify-buffer)
)
(global-font-lock-mode t)
(font-lock-add-keywords
'c-mode
'(
("^#[ \t]*\\(ifdef\\|else\\|ifndef\\|if !?defined\\|if\\|elif\\|endif\\|ident\\).*$" 1 font-lock-constant-face) ;#defines
("\\(^#[ \t]*define\\|^#[ \t]*include\\|^#[ \t]*undef\\).*$" 1 font-lock-function-name-face) ;other #s
)
)
unfortunately when opening a c file I see #include and #define being black colored. Although they should match the regular expressions and turn to dark blue.
Also #ifdef and #endif is in light dark color and not bold.
Any help is appreciated.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: face font in c-mode when adding new keyword
2013-07-31 19:10 face font in c-mode when adding new keyword Rami A
@ 2013-08-01 18:48 ` Rami A
0 siblings, 0 replies; 2+ messages in thread
From: Rami A @ 2013-08-01 18:48 UTC (permalink / raw)
To: help-gnu-emacs
bumping this...
Could someone advise on this?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-08-01 18:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-31 19:10 face font in c-mode when adding new keyword Rami A
2013-08-01 18:48 ` Rami A
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).