diff options
author | Alex Kost <alezost@gmail.com> | 2015-09-26 22:42:07 +0300 |
---|---|---|
committer | Alex Kost <alezost@gmail.com> | 2015-10-09 16:14:11 +0300 |
commit | 1af9815d81090e10a0f89596482e572dc59e454b (patch) | |
tree | 1a2bda7e273a87de979641a37551890c270b0378 /emacs | |
parent | b5881775ac2db345bf5826d6351366346ff03275 (diff) | |
download | patches-1af9815d81090e10a0f89596482e572dc59e454b.tar patches-1af9815d81090e10a0f89596482e572dc59e454b.tar.gz |
emacs: devel: Highlight gexp symbols.
Suggested by Ludovic Courtès <ludo@gnu.org>.
* emacs/guix-devel.el (guix-devel-gexp-symbol): New face.
(guix-devel-font-lock-keywords): Adjust to handle gexp symbols.
Diffstat (limited to 'emacs')
-rw-r--r-- | emacs/guix-devel.el | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/emacs/guix-devel.el b/emacs/guix-devel.el index 8a6fc1ec08..2e85a7edae 100644 --- a/emacs/guix-devel.el +++ b/emacs/guix-devel.el @@ -43,6 +43,12 @@ "Face for a `modify-phases' keyword ('delete', 'replace', etc.)." :group 'guix-devel-faces) +(defface guix-devel-gexp-symbol + '((t :inherit font-lock-keyword-face)) + "Face for gexp symbols ('#~', '#$', etc.). +See Info node `(guix) G-Expressions'." + :group 'guix-devel-faces) + (defcustom guix-devel-activate-mode t "If non-nil, then `guix-devel-mode' is automatically activated in Scheme buffers." @@ -130,7 +136,9 @@ to find 'modify-phases' keywords." (save-excursion (up-list) (point))) (defvar guix-devel-font-lock-keywords - `((,(guix-guile-keyword-regexp "modify-phases") + `((,(rx (or "#~" "#$" "#$@" "#+" "#+@")) . + 'guix-devel-gexp-symbol) + (,(guix-guile-keyword-regexp "modify-phases") (1 'font-lock-keyword-face) (guix-devel-modify-phases-font-lock-matcher (guix-devel-modify-phases-font-lock-pre) |