From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: how to replace old-style backquotes Date: Sat, 25 Dec 2010 22:59:48 +0100 Message-ID: <87fwtla4yz.fsf@member.fsf.org> References: <877hf3og6k.fsf@notengoamigos.org> <87tyi7w0i2.fsf@member.fsf.org> <20101224140644.GA10586@shi.workgroup> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1293314435 8561 80.91.229.12 (25 Dec 2010 22:00:35 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 25 Dec 2010 22:00:35 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Dec 25 23:00:32 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PWcA9-00064d-JB for geh-help-gnu-emacs@m.gmane.org; Sat, 25 Dec 2010 23:00:29 +0100 Original-Received: from localhost ([127.0.0.1]:40944 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PWcA9-0002Gy-7A for geh-help-gnu-emacs@m.gmane.org; Sat, 25 Dec 2010 17:00:29 -0500 Original-Received: from [140.186.70.92] (port=46558 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PWc9j-0002Gn-9K for help-gnu-emacs@gnu.org; Sat, 25 Dec 2010 17:00:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PWc9i-0003AT-1n for help-gnu-emacs@gnu.org; Sat, 25 Dec 2010 17:00:03 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:54786) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PWc9h-00039G-SS for help-gnu-emacs@gnu.org; Sat, 25 Dec 2010 17:00:02 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PWc9g-0005qk-6X for help-gnu-emacs@gnu.org; Sat, 25 Dec 2010 23:00:00 +0100 Original-Received: from 95-88-32-105-dynip.superkabel.de ([95.88.32.105]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 25 Dec 2010 23:00:00 +0100 Original-Received: from tassilo by 95-88-32-105-dynip.superkabel.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 25 Dec 2010 23:00:00 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 44 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 95-88-32-105-dynip.superkabel.de User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:d40tzVtRHp8LqbI5RdcChmkpybs= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:77887 Archived-At: Gregor Zattler 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