guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] emacs: devel: Highlight 'modify-phases' keywords.


From: Ludovic Courtès
Subject: Re: [PATCH] emacs: devel: Highlight 'modify-phases' keywords.
Date: Fri, 25 Sep 2015 21:22:43 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Alex Kost <address@hidden> 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 <address@hidden>
> 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’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]