diff options
author | Tom Willemsen | 2011-04-01 16:47:48 +0200 |
---|---|---|
committer | Tom Willemsen | 2011-04-01 16:47:48 +0200 |
commit | 16a98c0b6f66cdc6ac789874c74ef28bf728d442 (patch) | |
tree | 7b9269f3e784b223df0100a73006574e8a00a538 /emacs.d | |
parent | 827f5efb0ad458d16abe91717354c48271591400 (diff) | |
download | dotfiles-16a98c0b6f66cdc6ac789874c74ef28bf728d442.tar.gz dotfiles-16a98c0b6f66cdc6ac789874c74ef28bf728d442.zip |
More fontlock!
I increased fontlocking for c-mode and php-mode to also show certain
operators like [] {} + - / -> => etc.
Diffstat (limited to 'emacs.d')
-rw-r--r-- | emacs.d/10-font-lock.el | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/emacs.d/10-font-lock.el b/emacs.d/10-font-lock.el new file mode 100644 index 0000000..29528c6 --- /dev/null +++ b/emacs.d/10-font-lock.el @@ -0,0 +1,17 @@ +(defun add-my-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) + +(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") |