unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Gregor Zattler <telegraph@gmx.net>
To: Tassilo Horn <tassilo@member.fsf.org>
Cc: help-gnu-emacs@gnu.org
Subject: how to replace old-style backquotes (was: Re: Revert Emacs to version supporting cedet backticks?)
Date: Fri, 24 Dec 2010 15:06:44 +0100	[thread overview]
Message-ID: <20101224140644.GA10586@shi.workgroup> (raw)
In-Reply-To: <87tyi7w0i2.fsf@member.fsf.org>

Hi Tassilo,
* Tassilo Horn <tassilo@member.fsf.org> [21. Dec. 2010]:
> I don't think backticks are a problem, but only the old-style stuff
> deprecated for more than a decade had a bug in the current emacs bzr
> HEAD.
> 
>   `(foo ,tab-width) ;; new style. ok!
>     ==> (foo 2)
> 
>   (` (foo (, tab-width))) ;; old style. had a bug, but works for me...
>     ==> (foo 2)
> 
> I use a very recent Emacs version, so it seems that the bug is already
> fixed.
> 
> But it's still a very good idea to replace the old-style
> backquotes/backticks.

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

  "(,@ ...)" --> ",@..."

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

Or is it more complex than that?  E.g. does it matter how these
are nested or does the correct replacement depend on the actual
code (here represented as three dots)?


Ciao, Gregor
-- 
 -... --- .-. . -.. ..--.. ...-.-



  reply	other threads:[~2010-12-24 14:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.19.1292896532.3394.help-gnu-emacs@gnu.org>
2010-12-21  5:20 ` Revert Emacs to version supporting cedet backticks? Jason Earl
2010-12-21 16:31   ` Tassilo Horn
2010-12-24 14:06     ` Gregor Zattler [this message]
2010-12-25 21:59       ` how to replace old-style backquotes Tassilo Horn
     [not found]       ` <mailman.10.1293314405.24913.help-gnu-emacs@gnu.org>
2010-12-28  2:32         ` Stefan Monnier

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=20101224140644.GA10586@shi.workgroup \
    --to=telegraph@gmx.net \
    --cc=help-gnu-emacs@gnu.org \
    --cc=tassilo@member.fsf.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).