all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Oleg Pykhalov <go.wigust@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: Emacs minor-mode highlight code stages (gexp & sexp)
Date: Fri, 10 Nov 2017 23:51:26 +0100	[thread overview]
Message-ID: <878tfdlpch.fsf@gnu.org> (raw)
In-Reply-To: <87zi7vlrtt.fsf@gmail.com> (Oleg Pykhalov's message of "Thu, 09 Nov 2017 12:33:18 +0300")

[-- Attachment #1: Type: text/plain, Size: 231 bytes --]

Hi Oleg,

Oleg Pykhalov <go.wigust@gmail.com> 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!


[-- Attachment #2: sample --]
[-- Type: image/png, Size: 113619 bytes --]

[-- Attachment #3: Type: text/plain, Size: 378 bytes --]


> 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:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: Type: text/x-patch, Size: 786 bytes --]

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))))

[-- Attachment #5: Type: text/plain, Size: 26 bytes --]


Thank you!

Ludo’.

  reply	other threads:[~2017-11-10 22:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-09  9:33 Emacs minor-mode highlight code stages (gexp & sexp) Oleg Pykhalov
2017-11-10 22:51 ` Ludovic Courtès [this message]
2017-11-13 21:33   ` Oleg Pykhalov
2017-11-11  2:34 ` Chris Marusich
2017-11-11 13:54   ` Ludovic Courtès
2017-11-11 16:58     ` Chris Marusich
2017-11-22  6:21       ` Oleg Pykhalov
2017-11-24 13:23         ` Ludovic Courtès
2017-11-24 21:59           ` Oleg Pykhalov
2017-11-22  6:46       ` Oleg Pykhalov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878tfdlpch.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=go.wigust@gmail.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.