bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#9712: 24.0.50; doc about byte-compiling `defcustom'


From: Drew Adams
Subject: bug#9712: 24.0.50; doc about byte-compiling `defcustom'
Date: Sun, 9 Oct 2011 13:42:47 -0700

Put this in a file foo.el, and byte-compile the file:
 
(defcustom titi (eval-when-compile `(,(kbd "S-<tab>")))
  "jjjjjjjjjjjj"
  :type '(repeat sexp) :group 'edit)
 
(defvar toto (eval-when-compile `(,(kbd "S-<tab>")))
 "kkkkkkkkkk")
 
This is what the byte-compiled file shows:
 
#@14 jjjjjjjjjjjj
(custom-declare-variable 'titi '(eval-when-compile
  `(,(kbd "S-<tab>"))) '(#$ . 509) :type '(repeat sexp) :group 'edit)
#@12 kkkkkkkkkk
(defvar toto '([S-tab]) (#$ . 647))
 
Here's the bug (a doc bug), as I see it: Where in the doc is this
behavior described?  Where does it say that the STANDARD arg to
defcustom is not evaluated by the byte compiler, even when you use
`eval-when-compile'?
 
(elisp) Variable Definitions says this, but it's about all I can find:
 
"Evaluating the `defcustom' form evaluates STANDARD, but does not
necessarily install the standard value."
 
And of course the doc for `eval-when-compile', (elisp) `Eval During
Compile', says "The result of evaluation by the compiler becomes a
constant which appears in the compiled program."
 
I see it documented nowhere that the STANDARD arg to defcustom appears
unevaluated in byte-compiled code.
 
 
 
In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2011-09-19 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.5) --no-opt'
 





reply via email to

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