>From 13ebd00178d1f6139da4c1f76a2e358935ce16f0 Mon Sep 17 00:00:00 2001 From: Alex Kost Date: Sat, 26 Sep 2015 22:42:07 +0300 Subject: [PATCH] emacs: devel: Highlight gexp symbols. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Suggested by Ludovic Courtès . * emacs/guix-devel.el (guix-devel-gexp-symbol): New face. (guix-devel-font-lock-keywords): Adjust to handle gexp symbols. --- emacs/guix-devel.el | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/emacs/guix-devel.el b/emacs/guix-devel.el index 8a6fc1e..2e85a7e 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) -- 2.5.0