all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Docstring prevents constant from being fully byte-compiled
@ 2013-03-11  6:26 Joe Riel
  0 siblings, 0 replies; only message in thread
From: Joe Riel @ 2013-03-11  6:26 UTC (permalink / raw)
  To: Help GNU Emacs

Byte-compile the following (Emacs 23.3.1)

(defconst A "A")
(defconst B "B")
(defconst AB1
  (concat constA constB))
(defconst AB2
  (concat constA constB)
  "docstring")

I get

(byte-code "\303\bB\x10\304\305!\210\306\bB\x10\307\310!\210\311\bB\x10\312	\nP!\207" [current-load-list constA constB A (lambda (#1=#:defconst-tmp-var) (defconst A #1#)) "A" B (lambda (#2=#:defconst-tmp-var) (defconst B #2#)) "B" AB1 (lambda (#3=#:defconst-tmp-var) (defconst AB1 #3#))] 3)
#@11 docstring\x1f
(defconst AB2 (concat constA constB) (#$ . 800))

Note that AB2 retains the original (non-byte-compiled) definition, while AB1 does not.  
Is that actually the case?  Is AB2 byte-compiled, or not?
Why does the presence of the docstring make a difference?


-- 
Joe Riel




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-03-11  6:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-11  6:26 Docstring prevents constant from being fully byte-compiled Joe Riel

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.