all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Byte-compile constants in a function
@ 2012-07-03 16:57 Joe Riel
  0 siblings, 0 replies; 5+ messages in thread
From: Joe Riel @ 2012-07-03 16:57 UTC (permalink / raw)
  To: help-gnu-emacs

Is there a way to define constant/macros so that the value is expanded
during byte-compilation of a function that uses them?

For example, I want to do

(defconst  tag-prompt ?>)

(defun check (char) (eq char tag-prompt))

where the byte-compilation of check is the same as that of

(defun check (char) (eq char ?>))

-- 
Joe Riel




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

end of thread, other threads:[~2012-07-05  2:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.3953.1341335828.855.help-gnu-emacs@gnu.org>
2012-07-03 20:26 ` Byte-compile constants in a function José A. Romero L.
2012-07-04  6:07   ` Joe Riel
2012-07-04 13:26 ` Stefan Monnier
2012-07-05  2:42   ` Joe Riel
2012-07-03 16:57 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.