2011-04-01 21:35:42 +02:00
|
|
|
(defun add-my-php-keywords (mode)
|
2011-04-01 16:47:48 +02:00
|
|
|
(font-lock-add-keywords
|
|
|
|
mode
|
|
|
|
;; Currently support for [ ] | & ! . + = - / % * , ( ) < > { } ? : => ->
|
|
|
|
'(("\\([\\[|.!+=&/%*,(){}:-]\\|\\]\\|\\ [><]\\ \\|[^<]\\?[^>]\\|\\=>\\)" 1 font-lock-operator-face)
|
|
|
|
("\\(;\\)" 1 font-lock-end-statement))))
|
|
|
|
|
2011-04-01 21:35:42 +02:00
|
|
|
(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)
|
2011-04-01 16:47:48 +02:00
|
|
|
|
|
|
|
(make-face 'font-lock-operator-face)
|
|
|
|
(make-face 'font-lock-end-statement)
|
|
|
|
(defvar font-lock-operator-face 'font-lock-operator-face)
|
|
|
|
(defvar font-lock-end-statement 'font-lock-end-statement)
|
|
|
|
|
|
|
|
(set-face-foreground 'font-lock-operator-face "#EDD400")
|
|
|
|
(set-face-foreground 'font-lock-end-statement "#888A85")
|