unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#9712: 24.0.50; doc about byte-compiling `defcustom'
@ 2011-10-09 20:42 Drew Adams
  2011-10-10 13:27 ` Drew Adams
  2011-10-11  2:17 ` Stefan Monnier
  0 siblings, 2 replies; 10+ messages in thread
From: Drew Adams @ 2011-10-09 20:42 UTC (permalink / raw)
  To: 9712

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\x1f
(custom-declare-variable 'titi '(eval-when-compile
  `(,(kbd "S-<tab>"))) '(#$ . 509) :type '(repeat sexp) :group 'edit)
#@12 kkkkkkkkkk\x1f
(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'
 






^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-10-11 14:35 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-09 20:42 bug#9712: 24.0.50; doc about byte-compiling `defcustom' Drew Adams
2011-10-10 13:27 ` Drew Adams
2011-10-10 15:53   ` Drew Adams
2011-10-10 22:38     ` Drew Adams
2011-10-11  2:17 ` Stefan Monnier
2011-10-11  4:51   ` Drew Adams
2011-10-11  5:09     ` Stefan Monnier
2011-10-11  5:40       ` Drew Adams
2011-10-11 12:48         ` Stefan Monnier
2011-10-11 14:35           ` Drew Adams

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).