projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2c8e7eb
)
Better eval-when-compile example in manual
author
Mattias Engdegård
<mattiase@acm.org>
Thu, 25 Apr 2024 09:33:25 +0000
(11:33 +0200)
committer
Mattias Engdegård
<mattiase@acm.org>
Thu, 25 Apr 2024 09:39:21 +0000
(11:39 +0200)
* doc/lispref/compile.texi (Eval During Compile):
`regexp-opt` makes for a poor example because as a pure function it
doesn't need `eval-when-compile` for constant inputs.
doc/lispref/compile.texi
patch
|
blob
|
history
diff --git
a/doc/lispref/compile.texi
b/doc/lispref/compile.texi
index 00602198da521fc7364e7acd96c28a500fdc4fbd..08e824d27816f34b2e699944d129ff2c0bea9f73 100644
(file)
--- a/
doc/lispref/compile.texi
+++ b/
doc/lispref/compile.texi
@@
-334,8
+334,8
@@
If you have a constant that needs some calculation to produce,
@code{eval-when-compile} can do that at compile-time. For example,
@lisp
-(defvar
my-regexp
- (eval-when-compile (
regexp-opt '("aaa" "aba" "abb"
))))
+(defvar
gauss-schoolboy-problem
+ (eval-when-compile (
apply #'+ (number-sequence 1 100
))))
@end lisp
@cindex macros, at compile time