Alex Kost <alez...@gmail.com> skribis: > Hello, I would like to add a usual keyword highlighting for some Guix > things (substitute-keyword-arguments, with-directory-excursion, etc.). > > But this one is unusual, as along with 'modify-phases' itself, its > keywords ('add-after', 'delete', …) will also be highlighted. IMO this > will make the code of the packages easier to read; or is it too > colorful?
Sounds like a good idea! > From ed1c3871b81d4904d106a3ca5aadde2e1803d2a6 Mon Sep 17 00:00:00 2001 > From: Alex Kost <alez...@gmail.com> > Date: Thu, 24 Sep 2015 20:10:29 +0300 > Subject: [PATCH] emacs: devel: Highlight 'modify-phases' keywords. > > * emacs/guix-guile.el (guix-guile-keyword-regexp): New function. > * emacs/guix-devel.el (guix-devel-faces): New custom group. > (guix-devel-modify-phases-keyword): New face. > (guix-devel-modify-phases-keyword-regexp, > guix-devel-font-lock-keywords): New variables. > (guix-devel-modify-phases-font-lock-matcher, > guix-devel-modify-phases-font-lock-pre): New functions. > (guix-devel-mode): Adjust to add/remove font-lock-keywords. OK! I also have this one that I find useful: --8<---------------cut here---------------start------------->8--- ;; For Guix g-expressions. (font-lock-add-keywords 'scheme-mode '(("#~" . font-lock-keyword-face) ("#\\$" . font-lock-keyword-face) ("#\\+" . font-lock-keyword-face))) --8<---------------cut here---------------end--------------->8--- Similarly .dir-locals.el has ‘modify-syntax-entry’ stuff for gexps that could maybe go to guix-devel.el? Thanks, Ludo’.