mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-19 05:57:04 +01:00
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.
This commit is contained in:
parent
b5881775ac
commit
1af9815d81
1 changed files with 9 additions and 1 deletions
|
@ -43,6 +43,12 @@
|
||||||
"Face for a `modify-phases' keyword ('delete', 'replace', etc.)."
|
"Face for a `modify-phases' keyword ('delete', 'replace', etc.)."
|
||||||
:group 'guix-devel-faces)
|
: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
|
(defcustom guix-devel-activate-mode t
|
||||||
"If non-nil, then `guix-devel-mode' is automatically activated
|
"If non-nil, then `guix-devel-mode' is automatically activated
|
||||||
in Scheme buffers."
|
in Scheme buffers."
|
||||||
|
@ -130,7 +136,9 @@ to find 'modify-phases' keywords."
|
||||||
(save-excursion (up-list) (point)))
|
(save-excursion (up-list) (point)))
|
||||||
|
|
||||||
(defvar guix-devel-font-lock-keywords
|
(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)
|
(1 'font-lock-keyword-face)
|
||||||
(guix-devel-modify-phases-font-lock-matcher
|
(guix-devel-modify-phases-font-lock-matcher
|
||||||
(guix-devel-modify-phases-font-lock-pre)
|
(guix-devel-modify-phases-font-lock-pre)
|
||||||
|
|
Loading…
Reference in a new issue