diff -r a426c3ef778c -r f7c1fd21a5dd contrib/gadict.el --- a/contrib/gadict.el Mon Sep 26 14:23:54 2016 +0300 +++ b/contrib/gadict.el Mon Sep 26 14:47:23 2016 +0300 @@ -27,14 +27,28 @@ (defconst gadict--art-var-regex (regexp-opt '("v1" "v2" "v3" "s" "pl" "male" "female" "abbr" "comp" "super" "Am" "Br" "Au"))) (defconst gadict--art-pos-regex (regexp-opt '("n" "v" "adj" "adv" "pron" "prep" "num" "conj" "int" "phr" "phr.v" "contr" "abbr" "prefix"))) +(defgroup gadict nil + "gadict-mode customization." + :group 'wp) + +(defface gadict-tr-face '((t :foreground "#40a040" :slant italic)) + "Face for marker of translation." + :group 'gadict) +(defface gadict-ex-face '((t :foreground "#20a0c0" :slant italic)) + "Face for marker of example." + :group 'gadict) +(defface gadict-glos-face '((t :foreground "#a04040" :slant italic)) + "Face for marker of explanation." + :group 'gadict) + (defvar gadict-font-lock-keywords `( ("^\\(__\\)\n\n\\(\\w.*\\)$" (1 font-lock-function-name-face) (2 font-lock-keyword-face)) ("^ .*\n\\(\\w.*\\)" (1 font-lock-keyword-face)) ("^#.*" . font-lock-comment-face) ("^ +\\[[^]\n]+]" . font-lock-type-face) - (,(format "^%s: " gadict--art-lang-regex) . font-lock-type-face) - (,(format "^%s> " gadict--art-lang-regex) . font-lock-doc-face) - (,(format "^%s= " gadict--art-lang-regex) . font-lock-constant-face) + (,(format "^%s: " gadict--art-lang-regex) . 'gadict-tr-face) + (,(format "^%s> " gadict--art-lang-regex) . 'gadict-ex-face) + (,(format "^%s= " gadict--art-lang-regex) . 'gadict-glos-face) (,(format "^%s: " gadict--art-rel-regex) . font-lock-doc-face) (,(format "^ +%s$" gadict--art-var-regex) . font-lock-doc-face) (,(format "^%s$" gadict--art-pos-regex) . font-lock-warning-face) ))