[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: eval-when-compile vs defconst
From: |
Stuart D. Herring |
Subject: |
Re: eval-when-compile vs defconst |
Date: |
Mon, 13 Nov 2006 10:41:25 -0800 (PST) |
User-agent: |
SquirrelMail/1.4.6-7.el3.7lanl |
> (defvar ada-block-start-re
> (eval-when-compile
> (concat "\\<\\(" (regexp-opt '("begin" "declare" "else"
> "exception" "generic" "loop" "or"
> "private" "select" ))
> "\\|\\(\\(limited\\|abstract\\|tagged\\)[
> \t\n]+\\)*record\\)\\>"))
> "Regexp for keywords starting Ada blocks.")
>
> It would not be worth any extra complexity just to avoid one call to
> concat when the file is loaded. So even if eval-when-compile were not
> a no-op here, I'd say take it out.
Surely it's there to avoid calling (and loading) `regexp-opt' at load
time, and the concat is merely along for the ride? Unless the optimizer
already evaluates calls to `regexp-opt' on quoted lists, it seems useful
to me.
Davis
--
This product is sold by volume, not by mass. If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.
- eval-when-compile vs defconst, Stephen Leake, 2006/11/11
- 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 <=
- 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