From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.emacs.devel Subject: Re: Old-style backquotes in cc-vars.el Date: Sat, 06 Oct 2007 23:46:54 +0200 Message-ID: <87sl4nkjap.fsf@ambire.localdomain> References: <20071006163101.GA2565@muc.de> <87y7egjdr6.fsf@ambire.localdomain> <20071006205118.GA21218@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1191707328 10318 80.91.229.12 (6 Oct 2007 21:48:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 6 Oct 2007 21:48:48 +0000 (UTC) Cc: bug-cc-mode@gnu.org, Peter Dyballa , Martin Stjernholm , Stefan Monnier , emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 06 23:48:44 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IeHVs-0004ZY-7R for ged-emacs-devel@m.gmane.org; Sat, 06 Oct 2007 23:48:44 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IeHVn-0000RE-Lz for ged-emacs-devel@m.gmane.org; Sat, 06 Oct 2007 17:48:39 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IeHVl-0000Q7-1c for emacs-devel@gnu.org; Sat, 06 Oct 2007 17:48:37 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IeHVi-0000Pu-M8 for emacs-devel@gnu.org; Sat, 06 Oct 2007 17:48:35 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IeHVi-0000Pr-Gs for emacs-devel@gnu.org; Sat, 06 Oct 2007 17:48:34 -0400 Original-Received: from ppp-56-36.21-151.libero.it ([151.21.36.56] helo=ambire.localdomain) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IeHVc-0001ms-Ts; Sat, 06 Oct 2007 17:48:29 -0400 Original-Received: from ttn by ambire.localdomain with local (Exim 4.63) (envelope-from ) id 1IeHU6-0000Q5-80; Sat, 06 Oct 2007 23:46:54 +0200 In-Reply-To: <20071006205118.GA21218@muc.de> (Alan Mackenzie's message of "Sat\, 6 Oct 2007 20\:51\:18 +0000") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) X-Detected-Kernel: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:80353 Archived-At: () Alan Mackenzie () Sat, 6 Oct 2007 20:51:18 +0000 Can you explain to me what it is doing? If so, please do! :-) it (or rather, the funky fragment in question) is converting the given `:type FOO', mined out of the rest `args', to an aggregate `:type (radio STYLE (PREAMBLE FOO))'. `radio' means choose one of the following exclusively. STYLE stands for the choice where the value is taken from some style setting (you probably know more about this than i do). PREAMBLE is optionally prepended to FOO; that is, if FOO contains :tag or :value, the respective 2-list component is ignored. finally, the recomposed :type 2-list is spliced back into `args', the value of which should be valid spec for `custom-declare-variable'. > (type (eval (list 'identity (plist-get args :type)))) It doesn't quite work - (car type) bombs, because type is 'integer, not a list. I'll figure out, though. drat, i knew i forgot something. please try this, instead: > (typ (eval (list 'identity (plist-get args :type)))) > (type (if (consp typ) typ (list typ))) here we ensure `type' is consp rather than trying to handle non-consp `type'. thi