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)