From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Gregor Zattler Newsgroups: gmane.emacs.help 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 Message-ID: <20101224140644.GA10586@shi.workgroup> References: <877hf3og6k.fsf@notengoamigos.org> <87tyi7w0i2.fsf@member.fsf.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1293287728 14599 80.91.229.12 (25 Dec 2010 14:35:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 25 Dec 2010 14:35:28 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Tassilo Horn Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Dec 25 15:35:24 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 1PWVDP-0004NB-FI for geh-help-gnu-emacs@m.gmane.org; Sat, 25 Dec 2010 15:35:23 +0100 Original-Received: from localhost ([127.0.0.1]:55665 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PWVDN-0008P7-5M for geh-help-gnu-emacs@m.gmane.org; Sat, 25 Dec 2010 09:35:21 -0500 Original-Received: from [140.186.70.92] (port=46232 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PW8Io-0007DG-4o for help-gnu-emacs@gnu.org; Fri, 24 Dec 2010 09:07:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PW8Im-0001Jd-TW for help-gnu-emacs@gnu.org; Fri, 24 Dec 2010 09:07:25 -0500 Original-Received: from mailout-de.gmx.net ([213.165.64.22]:47368 helo=mail.gmx.net) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1PW8Il-0001J8-Vq for help-gnu-emacs@gnu.org; Fri, 24 Dec 2010 09:07:24 -0500 Original-Received: (qmail invoked by alias); 24 Dec 2010 14:07:21 -0000 Original-Received: from p549463C7.dip.t-dialin.net (EHLO shi.workgroup) [84.148.99.199] by mail.gmx.net (mp072) with SMTP; 24 Dec 2010 15:07:21 +0100 X-Authenticated: #19296480 X-Provags-ID: V01U2FsdGVkX18DgHt6jBIDZKU/gYqhJFnfRlZ9Znkvd6hrK0f5wR cCV3FYkV3JfOm7 Original-Received: from grfz by shi.workgroup with local (Exim 4.72) (envelope-from ) id 1PW8IS-0004Se-VL; Fri, 24 Dec 2010 15:07:05 +0100 Mail-Followup-To: Tassilo Horn , help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: <87tyi7w0i2.fsf@member.fsf.org> User-Agent: Mutt/1.5.20 (2009-06-14) X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Mailman-Approved-At: Sat, 25 Dec 2010 09:31:56 -0500 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:77881 Archived-At: Hi Tassilo, * Tassilo Horn [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 -- -... --- .-. . -.. ..--.. ...-.-