help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: What is "splicing mode" in el-search.el?


From: Michael Heerdegen
Subject: Re: What is "splicing mode" in el-search.el?
Date: Tue, 06 Sep 2016 16:45:40 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Hello Chunyang!

> I tried el-search.el from gnu elpa and have one problem with it.

Great, this is the first remark I got about it :-)  Your comments are
much appreciated, please report every discrepancy you find.  Multi-file
support will come soon, btw.


> The Commentary of el-search.el mentions "splicing mode", but I can't
> figure out what it means, can you give me an example?
>
> ;; It is possible to replace a match with multiple expressions using
> ;; "splicing mode".  When it is active, the replacement expression
> ;; must evaluate to a list, and is spliced instead of inserted into
> ;; the buffer for any replaced match.

It just means that instead of the list, it's elements are inserted into
the buffer, in the same order as in the list.  If you replace e.g. this

    `(f . ,args) -> args

and you have in some buffer

     (f x y)

then this would normally be replaced with

     (x y)

but with splicing mode turned on, you would get

      x y

(Do you have a suggestion for a better name?)

But it seems I have broken this submode with one of my latest commits, I
get an error here when I try to enable it.  Will try to fix soon.


Thanks,

Michael.



reply via email to

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