unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / 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

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).