From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Re: byte compiling defcustom Date: Sun, 18 Nov 2007 10:04:18 -0800 Message-ID: References: <200711171647.lAHGlHqH024027@jane.dms.auburn.edu> <200711172032.lAHKWhgx025030@jane.dms.auburn.edu> <200711172041.lAHKf2SG025058@jane.dms.auburn.edu> <200711180413.lAI4DLF8025958@jane.dms.auburn.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1195409174 3993 80.91.229.12 (18 Nov 2007 18:06:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 18 Nov 2007 18:06:14 +0000 (UTC) Cc: monnier@iro.umontreal.ca, rms@gnu.org, emacs-devel@gnu.org To: Luc Teirlinck Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 18 19:06:19 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 1ItoWy-0006VY-GT for ged-emacs-devel@m.gmane.org; Sun, 18 Nov 2007 19:06:04 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ItoWl-0004VL-8N for ged-emacs-devel@m.gmane.org; Sun, 18 Nov 2007 13:05:51 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ItoWh-0004St-Ke for emacs-devel@gnu.org; Sun, 18 Nov 2007 13:05:47 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ItoWh-0004Ry-2F for emacs-devel@gnu.org; Sun, 18 Nov 2007 13:05:47 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ItoWg-0004Ro-PW for emacs-devel@gnu.org; Sun, 18 Nov 2007 13:05:46 -0500 Original-Received: from oogie-boogie.ics.uci.edu ([128.195.1.41]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1ItoWd-0007mZ-E3; Sun, 18 Nov 2007 13:05:43 -0500 Original-Received: from mothra.ics.uci.edu (mothra.ics.uci.edu [128.195.6.93]) by oogie-boogie.ics.uci.edu (8.13.6/8.13.6) with ESMTP id lAII4IAI002117; Sun, 18 Nov 2007 10:04:18 -0800 (PST) In-Reply-To: <200711180413.lAI4DLF8025958@jane.dms.auburn.edu> (Luc Teirlinck's message of "Sat, 17 Nov 2007 22:13:21 -0600 (CST)") Original-Lines: 33 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@ics.uci.edu X-detected-kernel: by monty-python.gnu.org: Solaris 9 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:83547 Archived-At: Luc Teirlinck writes: > >From my previous message: > > On second thought, I now believe that I misunderstood and that it > should _not_ represent a problem, as long as the uncompiled value is > stored in the `standard-value' property. > > But then again, I assume that byte-compiling the defcustom could store > byte code in that property. Anyway, easy enough to check for anybody > having the patch already installed: > > Load the compiled version of: > > (defcustom stupid (if t (+ 1 1)) "Silly doc.") > > Then do: > > (get 'stupid 'standard-value) > > Which should return: > > ((if t (+ 1 1))) This returns (2). And I would argue that this is the right thing to do for _this_ example. If the result is a constant, then it is better for the user to see the constant, not lisp gobbledygook. Now, is there a situation where showing a lisp expression is the desired thing? Any examples in the emacs sources? Without any examples I am inclined to believe that showing users lisp code defeats one of the purposes of defcustom: not having to write lisp to customize behavior.