[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Byte-compile constants in a function
From: |
José A . Romero L . |
Subject: |
Re: Byte-compile constants in a function |
Date: |
Tue, 3 Jul 2012 13:26:13 -0700 (PDT) |
User-agent: |
G2/1.0 |
W dniu wtorek, 3 lipca 2012 18:57:12 UTC+2 użytkownik Joe Riel napisał:
> Is there a way to define constant/macros so that the value is expanded
> during byte-compilation of a function that uses them?
(...)
How about defining an inlined function that returns the constant
you need?
(defsubst tag-prompt () ?>)
then:
(defun check (char) (eq char (tag-prompt)))
a quick look at the byte-compiled code shows that the value
of (tag-prompt) is indeed inlined.
Cheers,
--
José A. Romero L.
escherdragon at gmail
"We who cut mere stones must always be envisioning cathedrals."
(Quarry worker's creed)