summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-12-23 23:47:12 -0800
committerKaz Kylheku <kaz@kylheku.com>2019-12-23 23:47:12 -0800
commit615355c491210ae2fcf3ec65c894b5461f8919db (patch)
tree060d1a541a55ec8b95607392c79738c8447fe1b3 /txr.1
parent731c1ca2097fbf0779dd4bf644434cc7106f8a1e (diff)
downloadtxr-615355c491210ae2fcf3ec65c894b5461f8919db.tar.gz
txr-615355c491210ae2fcf3ec65c894b5461f8919db.tar.bz2
txr-615355c491210ae2fcf3ec65c894b5461f8919db.zip
doc: usage note for compile-update-file.
* txr.1: Document how compile-update-file can be used together with load to ensure that the compiled version of a file is loaded without unnecessary recompiling.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.116
1 files changed, 16 insertions, 0 deletions
diff --git a/txr.1 b/txr.1
index 67ef4363..0d7f560d 100644
--- a/txr.1
+++ b/txr.1
@@ -69565,6 +69565,22 @@ if it successfully compiles, similarly to
If compilation is skipped, the function returns
.codn nil .
+Note: the following idiom may be used to load a file, compiling it if
+necessary:
+
+.verb
+ (or (compile-update-file "file")
+ (load-file "file"))
+.brev
+
+However, note that it relies on the effect of compiling a source file being the
+same as the effect of loading the compiled file.
+This can only be true if the source file contains no
+.code compile-only
+or
+.code eval-only
+top-level forms.
+
.coNP Macro @ with-compilation-unit
.synb
.mets (with-compilation-unit << form *)