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

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

Re: how to replace old-style backquotes


From: Tassilo Horn
Subject: Re: how to replace old-style backquotes
Date: Sat, 25 Dec 2010 22:59:48 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux)

Gregor Zattler <telegraph@gmx.net> writes:

Hi Gregor,

> I have no clue about elisp but want to replace old-style with
> new-style backquotes in old code I use.
>
> Can this reliable be done by shortening every occurrence of 
> (ΒΈ like this:
>
>   "(` ...)"  --> "`..."
>
> and every comma-marked item like this:
>
>   "(, ...)"  --> ",..."
>
> or
>
>   "(,@ ...)" --> ",@..."
>
> ?

Hm, well, I think, yes.  But don't complain at me if there is some
corner case where that simple rule is not correct.

> If so the replacement could be done efficiently via a set of Emacs
> macros (or elisp which I'm not capable of writing).

I think, especially with paredit.el, it should be quite easy to produce
a keyboard macro for doing that.

> Or is it more complex than that?  E.g. does it matter how these are
> nested

Well, yes.  Commas are only to be replaced in backquoted forms, but
since that's the only use anyway...

> or does the correct replacement depend on the actual code (here
> represented as three dots)?

Nope, it's purely syntactical.

Bye,
Tassilo




reply via email to

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