[COMMIT] If STRING is constant, call regexp-quote at compile time.
Stephen J. Turnbull
stephen at xemacs.org
Fri Oct 30 21:52:34 EDT 2009
Aidan Kehoe writes:
> A small thing, I admit, but it’s nice to endorse this practice.
Two comments on the poor documentation of this feature:
If you want to endorse it, document it, please. Definitely requires a
comment in the Lispref, maybe in the docstring. What you've done so
far is more along the lines of "idiots will do this, so make sure
there's no run-time cost."
I wasted five minutes reviewing this before I realized it was a
no-brainer. A subject like "Optimize regexp-quote: apply to constant
strings at compile time" would have made it much clearer what is being
done, and why.
More information about the XEmacs-Patches