From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.cc-mode.general,gmane.emacs.devel Subject: Re: Old-style backquotes in cc-vars.el Date: Sun, 7 Oct 2007 09:40:25 +0000 Message-ID: <20071007094025.GA1416@muc.de> References: <20071006163101.GA2565@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1191749777 12733 80.91.229.12 (7 Oct 2007 09:36:17 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 7 Oct 2007 09:36:17 +0000 (UTC) Cc: bug-cc-mode@gnu.org, Peter Dyballa , Martin Stjernholm , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: cc-mode-help-bounces@lists.sourceforge.net Sun Oct 07 11:36:14 2007 Return-path: Envelope-to: sf-cc-mode-help@m.gmane.org Original-Received: from lists-outbound.sourceforge.net ([66.35.250.225]) by lo.gmane.org with esmtp (Exim 4.50) id 1IeSYX-0003qA-L4 for sf-cc-mode-help@m.gmane.org; Sun, 07 Oct 2007 11:36:14 +0200 Original-Received: from sc8-sf-list1-new.sourceforge.net (sc8-sf-list1-new-b.sourceforge.net [10.3.1.93]) by sc8-sf-spam2.sourceforge.net (Postfix) with ESMTP id 61E60FE2F; Sun, 7 Oct 2007 02:36:08 -0700 (PDT) Original-Received: from sc8-sf-mx2-b.sourceforge.net ([10.3.1.92] helo=mail.sourceforge.net) by sc8-sf-list1-new.sourceforge.net with esmtp (Exim 4.43) id 1IeSYR-0001oh-C0 for cc-mode-help@lists.sourceforge.net; Sun, 07 Oct 2007 02:36:07 -0700 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by mail.sourceforge.net with esmtps (TLSv1:AES256-SHA:256) (Exim 4.44) id 1IeSYQ-0000iA-Rw for cc-mode-help@lists.sourceforge.net; Sun, 07 Oct 2007 02:36:07 -0700 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by fencepost.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IeSXR-0006Nk-8B for bug-cc-mode@gnu.org; Sun, 07 Oct 2007 05:35:05 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1IeSYG-0005N0-U1 for bug-cc-mode@gnu.org; Sun, 07 Oct 2007 05:36:00 -0400 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on monty-python X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=SPF_PASS autolearn=failed version=3.1.0 Original-Received: from colin.muc.de ([193.149.48.1] helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IeSYG-0005Ls-BF for bug-cc-mode@gnu.org; Sun, 07 Oct 2007 05:35:56 -0400 Original-Received: (qmail 81461 invoked by uid 3782); 7 Oct 2007 09:35:51 -0000 Original-Received: from acm.muc.de (p57B1D6A0.dip.t-dialin.net [87.177.214.160]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Sun, 07 Oct 2007 11:35:48 +0200 Original-Received: (qmail 3032 invoked by uid 1000); 7 Oct 2007 09:40:25 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-Detected-Kernel: FreeBSD 4.6-4.9 X-Spam-Score: 1.0 (+) X-Spam-Report: Spam Filtering performed by sourceforge.net. See http://spamassassin.org/tag/ for more details. Report problems to http://sf.net/tracker/?func=add&group_id=1&atid=200001 1.0 FORGED_RCVD_HELO Received: contains a forged HELO X-BeenThere: cc-mode-help@lists.sourceforge.net X-Mailman-Version: 2.1.8 Precedence: list List-Id: "Bug reports, feature requests, and general talk about CC Mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: cc-mode-help-bounces@lists.sourceforge.net Errors-To: cc-mode-help-bounces@lists.sourceforge.net Xref: news.gmane.org gmane.emacs.cc-mode.general:4789 gmane.emacs.devel:80370 Archived-At: Hi, Stefan, On Sat, Oct 06, 2007 at 06:27:00PM -0400, Stefan Monnier wrote: > >> cc-vars uses a mix of old-style a new-style backquotes. > > I don't think it does. > The warning indicates that Emacs sees old-style backquotes, aqnd I'm > pretty sure there are new style backquotes as well, so I'm pretty sure > you're wrong. OK. I've played around with things a bit since yesterday. In particular, I've discovered the useful functions `read' and `backquote-process'. I'm begining to think you're right and I'm wrong. :-) > > He wouldn't knowingly have put in old-style BQs as late as 2001. > Maybe he did it knowingly: he's using nested backquotes and IIRC they > didn't always work correctly in older versions of Emacs when used with > new-style backquotes. Actually IIRC the problem was with nested > new-style commas (where the second would not be recognized as > new-style) which indeed do appear in that code. Ah. OK. That's sounds like a sound reason for not upgrading that code in cc-vars.el, if it's the case. (Or, for introducing yet another difference between the cc-vars.el in Emacs and the standalone CC Mode, which retains compatibility with older (X)Emacsen. :-( ) Probably I'll just scrap the old code and put in Thi's new version of the function instead (after testing it thoroughly). It looks a lot cleaner and easier to understand. > > I'm not sure whether the rules for nested backquotes are clearly laid > > out anywhere. > The problem is not about nesting but about new-style vs old-style: the > detailed rule about which is which is indeed only specified implicitly in > the source code. OK. > > I think they're formally ambiguous (i.e., RTFS). I tried > > replacing "`(` (radio" with both > > "`( (` (radio" (explicitly putting in an "old-style" BQ) > > , and > > "`` (radio" (replacing the alleged "old-style" BQ with a > > "new-style" one) > > , but each of these generated results different from the original > > (checked with macroexpand). > You need to fix the ,(, part accordingly. Ah! I'm still figuring out what ,(, actually means. > Thien-Thi might be a good start. Yes. He's already been very helpful. > > Who is the bytecomp expert, again? Could we possibly ask him about the > > semantics of `(` (radio ? > It's (\` (\` (radio I managed to get that late last night with (read "`(` (a b c))"). :-) Thanks for all the help! > Stefan -- Alan. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/