File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed
Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+ % -*- mode: CLWEB -*-
2+ \noinx
3+ \def\CLWEB{{ \tt CLWEB}}
4+
5+ @* \CLWEB\ commands.
6+
7+ @l
8+ @e
9+ ( require "REPL ")
10+ @e
11+ ( in- package "REPL ")
12+
13+ @ We sneakily import the external symbols of the \CLWEB\ package so that we
14+ don't get warnings when the {\tt REPL} package is redefined; some compilers
15+ complain when the |use-list| of a package changes, which it would if we just
16+ just said |(use-package "CLWEB")|.
17+
18+ @l
19+ @e
20+ (eval-when (:compile-toplevel :load-toplevel :execute)
21+ (require "CLWEB")
22+ (do-external-symbols (symbol (find-package "CLWEB"))
23+ (import symbol)))
24+
25+ @ The commands are just trivial wrappers around the top-level \CLWEB\
26+ functions.
27+
28+ @l
29+ (define-simple-file-command lw
30+ (:documentation "Load a web."
31+ :prompt "Load web: "
32+ :function load-web))
33+
34+ (define-simple-file-command tf
35+ (:documentation "Tangle a web."
36+ :prompt "Tangle web: "
37+ :function tangle-file))
38+
39+ (define-simple-file-command we
40+ (:documentation "Weave a web."
41+ :prompt "Weave web: "
42+ :function weave))
43+
44+ (defcmd wt ((pathname (read-pathname-argument ' we "Weave & TeX web: ")))
45+ "Weave and then TeX a web."
46+ ( let (( tex- file ( clweb:weave pathname)))
47+ ( when tex- file
48+ ( run "tex " tex- file ))))
You can’t perform that action at this time.
0 commit comments