diff options
author | Alex Kost <alezost@gmail.com> | 2015-10-16 23:38:38 +0300 |
---|---|---|
committer | Alex Kost <alezost@gmail.com> | 2015-10-17 18:57:30 +0300 |
commit | 5d86684ddfe7ed27b37fa4b29c602b45756cc5be (patch) | |
tree | aa93d4166b59dbe263168522ed4e46c15973583d /emacs | |
parent | 5e2b761e6adda10c86f2f0038dc7c62ac7a640cc (diff) |
emacs: devel: Highlight Guix keywords.
* emacs/guix-devel.el (guix-devel-keywords): New constant.
(guix-devel-font-lock-keywords): Use it.
Diffstat (limited to 'emacs')
-rw-r--r-- | emacs/guix-devel.el | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/emacs/guix-devel.el b/emacs/guix-devel.el index c8bfbb0a8a..f3ad4b9255 100644 --- a/emacs/guix-devel.el +++ b/emacs/guix-devel.el @@ -178,9 +178,52 @@ to find 'modify-phases' keywords." (ignore-errors (forward-sexp)) (save-excursion (up-list) (point))))) +(defconst guix-devel-keywords + '("call-with-compressed-output-port" + "call-with-container" + "call-with-decompressed-port" + "call-with-derivation-narinfo" + "call-with-derivation-substitute" + "call-with-error-handling" + "call-with-temporary-directory" + "call-with-temporary-output-file" + "define-enumerate-type" + "define-gexp-compiler" + "define-lift" + "define-monad" + "define-operation" + "define-record-type*" + "emacs-substitute-sexps" + "emacs-substitute-variables" + "mbegin" + "mlet" + "mlet*" + "munless" + "mwhen" + "run-with-state" + "run-with-store" + "signature-case" + "substitute*" + "substitute-keyword-arguments" + "test-assertm" + "use-package-modules" + "use-service-modules" + "use-system-modules" + "with-atomic-file-output" + "with-atomic-file-replacement" + "with-derivation-narinfo" + "with-derivation-substitute" + "with-directory-excursion" + "with-error-handling" + "with-monad" + "with-mutex" + "with-store")) + (defvar guix-devel-font-lock-keywords `((,(rx (or "#~" "#$" "#$@" "#+" "#+@")) . 'guix-devel-gexp-symbol) + (,(guix-guile-keyword-regexp (regexp-opt guix-devel-keywords)) + (1 'font-lock-keyword-face)) (,(guix-guile-keyword-regexp "modify-phases") (1 'font-lock-keyword-face) (guix-devel-modify-phases-font-lock-matcher |