diff options
author | 2011-04-01 21:35:42 +0200 | |
---|---|---|
committer | 2011-04-01 21:35:42 +0200 | |
commit | 8a637b9d4d3a092ccdb231a7141c75924e474e85 (patch) | |
tree | 459fc2b11c635e9acb5d019198b86a6f4928bdb6 /emacs.d/10-font-lock.el | |
parent | ff1ab2bc9ade7a548f769fe09e0cee87ee790b91 (diff) | |
download | dotfiles-8a637b9d4d3a092ccdb231a7141c75924e474e85.tar.gz dotfiles-8a637b9d4d3a092ccdb231a7141c75924e474e85.zip |
Fixed font-lock for #include <sys/stat.h> etc.
Diffstat (limited to 'emacs.d/10-font-lock.el')
-rw-r--r-- | emacs.d/10-font-lock.el | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/emacs.d/10-font-lock.el b/emacs.d/10-font-lock.el index 29528c6..026099d 100644 --- a/emacs.d/10-font-lock.el +++ b/emacs.d/10-font-lock.el @@ -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) |