[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
eval-when-compile vs defconst
From: |
Stephen Leake |
Subject: |
eval-when-compile vs defconst |
Date: |
Sat, 11 Nov 2006 09:39:32 -0500 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (windows-nt) |
I ran across this construct in ada-mode.el:
(eval-when-compile
(defconst ada-95-string-keywords
'("abstract" "aliased" "protected" "requeue" "tagged" "until")
"List of keywords new in Ada 95.
Used to define `ada-*-keywords'."))
Is there any point to the 'eval-when-compile'? Help for
eval-when-compile says;
Like `progn', but evaluates the body at compile time if you're
compiling. Thus, the result of the body appears to the compiler as
a quoted constant. In interpreted code, this is entirely
equivalent to `progn'.
Since the body is already a quoted constant, this seems redundant. I
suspect the eval-when-compile is left over from a previous version
when functions where used to build the string.
But I'm not familiar with all of the nuances of byte-compiling, so I
thought I'd ask.
--
-- Stephe
- eval-when-compile vs defconst,
Stephen Leake <=
- eval-when-compile vs defconst, Bob Rogers, 2006/11/11
- Re: eval-when-compile vs defconst, Richard Stallman, 2006/11/12
- Re: eval-when-compile vs defconst, Stephen Leake, 2006/11/12
- Re: eval-when-compile vs defconst, Markus Triska, 2006/11/12
- Re: eval-when-compile vs defconst, Richard Stallman, 2006/11/13
- Re: eval-when-compile vs defconst, Stuart D. Herring, 2006/11/13
- Re: eval-when-compile vs defconst, Stefan Monnier, 2006/11/13
- Re: eval-when-compile vs defconst, Markus Triska, 2006/11/14
- Re: eval-when-compile vs defconst, Richard Stallman, 2006/11/14