From: "Stuart D. Herring" <herring@lanl.gov>
Cc: Stephen Leake <stephen_leake@member.fsf.org>, emacs-devel@gnu.org
Subject: Re: eval-when-compile vs defconst
Date: Mon, 13 Nov 2006 10:41:25 -0800 (PST) [thread overview]
Message-ID: <58171.128.165.123.18.1163443285.squirrel@webmail.lanl.gov> (raw)
In-Reply-To: <E1GjYM0-0007ct-8T@fencepost.gnu.org>
> (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.
next prev parent reply other threads:[~2006-11-13 18:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2006-11-13 18:46 ` Markus Triska
2006-11-13 20:18 ` Stefan Monnier
2006-11-14 12:27 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=58171.128.165.123.18.1163443285.squirrel@webmail.lanl.gov \
--to=herring@lanl.gov \
--cc=emacs-devel@gnu.org \
--cc=stephen_leake@member.fsf.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.