diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-12-23 23:47:12 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-12-23 23:47:12 -0800 |
commit | f7b00e965ed511db69767f8ecd71945c4089c1ed (patch) | |
tree | 060d1a541a55ec8b95607392c79738c8447fe1b3 | |
parent | 7f1828019fb25e9e77e6a88a639cd25a553ad390 (diff) | |
download | txr-f7b00e965ed511db69767f8ecd71945c4089c1ed.tar.gz txr-f7b00e965ed511db69767f8ecd71945c4089c1ed.tar.bz2 txr-f7b00e965ed511db69767f8ecd71945c4089c1ed.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.
-rw-r--r-- | txr.1 | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -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 *) |