all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* eval-when-compile vs defconst
@ 2006-11-11 14:39 Stephen Leake
  2006-11-11 17:01 ` Bob Rogers
  2006-11-12  5:14 ` Richard Stallman
  0 siblings, 2 replies; 11+ messages in thread
From: Stephen Leake @ 2006-11-11 14:39 UTC (permalink / raw)


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

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

end of thread, other threads:[~2006-11-14 12:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-11 14:39 eval-when-compile vs defconst Stephen Leake
2006-11-11 17:01 ` Bob Rogers
2006-11-11 17:03   ` Bob Rogers
2006-11-12  5:14 ` Richard Stallman
2006-11-12 14:29   ` Stephen Leake
2006-11-12 19:06     ` Markus Triska
2006-11-13  9:43     ` Richard Stallman
2006-11-13 18:41       ` Stuart D. Herring
2006-11-13 18:46         ` Markus Triska
2006-11-13 20:18         ` Stefan Monnier
2006-11-14 12:27         ` Richard Stallman

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.