elisp: update macro fontification rules

This commit is contained in:
Henrik Lissner 2016-05-20 09:19:56 -04:00
parent 030cde12aa
commit 5b4117fc11
2 changed files with 15 additions and 13 deletions

View file

@ -37,24 +37,26 @@
(setq mode-name "Elisp") ; [pedantry intensifies]
(font-lock-add-keywords
nil `(("(\\(lambda\\)"
(1 (narf/show-as )))
nil `(("(\\(lambda\\)" (1 (narf/show-as )))
("(\\(narf\\)\\>" (1 font-lock-keyword-face append))
;; Highlight narf macros (macros are fontified in emacs 25+)
(,(concat
"(\\(def-"
(regexp-opt '("electric" "project-type" "company-backend"
"builder" "repl" "textobj" "tmp-excmd" "rotate"
"repeat" "yas-mode" "version-cmd" "docset"))
"repeat" "yas-mode" "version-cmd" "docset"
"open-with"))
"!\\)")
(1 font-lock-keyword-face append))
(,(concat
"(\\("
(regexp-opt '("λ" "in" "map" "after" "shut-up" "add-hook"
"associate" "open-with" "define-org-link"
"associate" "define-org-link" "ex"
"define-org-section"))
"!\\)")
(1 font-lock-keyword-face append))
;; Ert
(,(concat
"("
(regexp-opt '("ert-deftest") t)