emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: byte compiling defcustom


From: Dan Nicolaescu
Subject: Re: byte compiling defcustom
Date: Sun, 18 Nov 2007 10:04:18 -0800

Luc Teirlinck <address@hidden> 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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]