Fixed font-lock for #include <sys/stat.h> etc.
This commit is contained in:
parent
ff1ab2bc9a
commit
8a637b9d4d
1 changed files with 10 additions and 3 deletions
|
@ -1,12 +1,19 @@
|
||||||
(defun add-my-keywords (mode)
|
(defun add-my-php-keywords (mode)
|
||||||
(font-lock-add-keywords
|
(font-lock-add-keywords
|
||||||
mode
|
mode
|
||||||
;; Currently support for [ ] | & ! . + = - / % * , ( ) < > { } ? : => ->
|
;; Currently support for [ ] | & ! . + = - / % * , ( ) < > { } ? : => ->
|
||||||
'(("\\([\\[|.!+=&/%*,(){}:-]\\|\\]\\|\\ [><]\\ \\|[^<]\\?[^>]\\|\\=>\\)" 1 font-lock-operator-face)
|
'(("\\([\\[|.!+=&/%*,(){}:-]\\|\\]\\|\\ [><]\\ \\|[^<]\\?[^>]\\|\\=>\\)" 1 font-lock-operator-face)
|
||||||
("\\(;\\)" 1 font-lock-end-statement))))
|
("\\(;\\)" 1 font-lock-end-statement))))
|
||||||
|
|
||||||
(add-my-keywords 'c-mode)
|
(defun add-my-c-keywords (mode)
|
||||||
(add-my-keywords 'php-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-operator-face)
|
||||||
(make-face 'font-lock-end-statement)
|
(make-face 'font-lock-end-statement)
|
||||||
|
|
Loading…
Reference in a new issue