lang/cc: fontify constants only in c/c++ buffers
This commit is contained in:
parent
a5877139cd
commit
fa3f627f44
1 changed files with 5 additions and 4 deletions
|
@ -66,10 +66,11 @@ preceded by the opening brace or a comma (disregarding whitespace in between)."
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun +cc|fontify-constants ()
|
(defun +cc|fontify-constants ()
|
||||||
"Better fontification for preprocessor constants"
|
"Better fontification for preprocessor constants"
|
||||||
(font-lock-add-keywords
|
(when (memq major-mode '(c-mode c++-mode))
|
||||||
nil '(("\\<[A-Z]*_[A-Z_]+\\>" . font-lock-constant-face)
|
(font-lock-add-keywords
|
||||||
("\\<[A-Z]\\{3,\\}\\>" . font-lock-constant-face))
|
nil '(("\\<[A-Z]*_[A-Z_]+\\>" . font-lock-constant-face)
|
||||||
t))
|
("\\<[A-Z]\\{3,\\}\\>" . font-lock-constant-face))
|
||||||
|
t)))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun +cc|irony-init-compile-options ()
|
(defun +cc|irony-init-compile-options ()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue