Fixed font-lock for #include <sys/stat.h> etc.

This commit is contained in:
Tom Willemsen 2011-04-01 21:35:42 +02:00
parent ff1ab2bc9a
commit 8a637b9d4d

View file

@ -1,12 +1,19 @@
(defun add-my-keywords (mode)
(defun add-my-php-keywords (mode)
(font-lock-add-keywords
mode
;; Currently support for [ ] | & ! . + = - / % * , ( ) < > { } ? : => ->
'(("\\([\\[|.!+=&/%*,(){}:-]\\|\\]\\|\\ [><]\\ \\|[^<]\\?[^>]\\|\\=>\\)" 1 font-lock-operator-face)
("\\(;\\)" 1 font-lock-end-statement))))
(add-my-keywords 'c-mode)
(add-my-keywords 'php-mode)
(defun add-my-c-keywords (mode)
(font-lock-add-keywords
mode
;; Currently support for [ ] | & ! . + = - / % * , ( ) < > { } ? : => ->
'(("\\([\\[|!+=&%*,(){}:-]\\|\\]\\|\\ [><]\\ \\|[^<]\\?[^>]\\|\\=>\\|[^<].*[./].*[^>]\\)" 1 font-lock-operator-face)
("\\(;\\)" 1 font-lock-end-statement))))
(add-my-c-keywords 'c-mode)
(add-my-php-keywords 'php-mode)
(make-face 'font-lock-operator-face)
(make-face 'font-lock-end-statement)