From: "Drew Adams" <drew.adams@oracle.com>
To: 9712@debbugs.gnu.org
Subject: bug#9712: 24.0.50; doc about byte-compiling `defcustom'
Date: Sun, 9 Oct 2011 13:42:47 -0700 [thread overview]
Message-ID: <F53B306DF56A443A953E84CE5AFA8D33@us.oracle.com> (raw)
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'
next reply other threads:[~2011-10-09 20:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-09 20:42 Drew Adams [this message]
2011-10-10 13:27 ` bug#9712: 24.0.50; doc about byte-compiling `defcustom' 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=F53B306DF56A443A953E84CE5AFA8D33@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=9712@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).