blob: 026099daa2f7335c9225f031af4c8bbafd2216f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
(defun add-my-php-keywords (mode)
(font-lock-add-keywords
mode
;; Currently support for [ ] | & ! . + = - / % * , ( ) < > { } ? : => ->
'(("\\([\\[|.!+=&/%*,(){}:-]\\|\\]\\|\\ [><]\\ \\|[^<]\\?[^>]\\|\\=>\\)" 1 font-lock-operator-face)
("\\(;\\)" 1 font-lock-end-statement))))
(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)
(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")
|