help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Byte-compile constants in a function


From: Stefan Monnier
Subject: Re: Byte-compile constants in a function
Date: Wed, 04 Jul 2012 09:26:06 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

> (defconst  tag-prompt ?>)
> (defun check (char) (eq char tag-prompt))

You can do

   (eval-when-compile
     (defconst tag-prompt ?>))
   
   (defun check (char) (eq char (eval-when-compile tag-prompt)))


-- Stefan


reply via email to

[Prev in Thread] Current Thread [Next in Thread]