guix-devel
[Top][All Lists]
Advanced

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

Re: Emacs minor-mode highlight code stages (gexp & sexp)


From: Ludovic Courtès
Subject: Re: Emacs minor-mode highlight code stages (gexp & sexp)
Date: Fri, 10 Nov 2017 23:51:26 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Hi Oleg,

Oleg Pykhalov <address@hidden> skribis:

> I found Emacs minor-mode for highlighting stages of code and send a
> request for release a tarball¹, so I could package it properly.

Woow, this is really cool!

PNG image

> Also I made a fork to add a support for G-Expressions and I will wait
> until close a request¹ before sending a patch.  You could try it now:
>
> $ git clone https://github.com/wigust/highlight-stages.git -b gexp
> $ cd CLONED_REPOSITORY_DIRECTORY
> $ guix package --install-from-file=guix.scm

Works for me!  I’ve augmented the regexp to match the long forms:

diff --git a/highlight-stages.el b/highlight-stages.el
index dfaf220..e11260e 100644
--- a/highlight-stages.el
+++ b/highlight-stages.el
@@ -244,7 +244,7 @@ non-nil, (match-string 0) must be the expression matched."
              (progn (ignore-errors (forward-sexp 1)) (point)))))))
 
 (defun highlight-stages-lisp-escape-matcher (&optional limit)
-  (when (highlight-stages--search-forward-regexp 
",@?\\|([\s\t\n]*\\\\,@?+[\s\t\n]+\\|#\\$" limit)
+  (when (highlight-stages--search-forward-regexp 
",@?\\|([\s\t\n]*\\\\,@?+[\s\t\n]+\\|\\(unquote\\)\\|\\(unquote-splicing\\)\\|\\(ungexp-native\\)\\|\\(ungexp-splicing\\)\\|\\(ungexp-native-splicing\\)\\|\\(ungexp\\)\\|#\\$"
 limit)
     (set-match-data
      (list (point)
            (progn (ignore-errors (forward-sexp 1)) (point))))
Thank you!

Ludo’.

reply via email to

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