diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2023-10-13 13:49:29 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2023-10-13 13:49:29 -0700 |
commit | 3fb78aa6158134497c17e5288a8ee9af64d1fac0 (patch) | |
tree | 712f4c390e4e857e5db721ed5ecf894568429273 | |
parent | 353a3958e42d52862a48b5871a8acedcbf04eaf6 (diff) | |
download | mnpgr-3fb78aa6158134497c17e5288a8ee9af64d1fac0.tar.gz mnpgr-3fb78aa6158134497c17e5288a8ee9af64d1fac0.tar.bz2 mnpgr-3fb78aa6158134497c17e5288a8ee9af64d1fac0.zip |
Support compiling.
-rwxr-xr-x | mnpgr.tl | 23 |
1 files changed, 12 insertions, 11 deletions
@@ -31,15 +31,16 @@ (@else (output-text else :norm)))) (output-text "\n" :norm))))) -(ensure-dir mnpgr-dir) +(compile-only ;; I.e. do not execute these forms during compilation + (ensure-dir mnpgr-dir) -(match @(or `@page(@section)` ;; for "man whatever" - `@page\\.@section`) ;; for "man -l file.1" - (getenv "MAN_PN") - (with-resources ((rendered-file (path-cat mnpgr-dir `@page.@section`) - (remove-path rendered-file))) - (with-stream (s (open-file rendered-file "w")) - (let ((ofilt (make-overstrike-filter (lambda (str) (put-string str s))))) - (whilet ((line (get-line))) - [ofilt line]))) - (sh `vim +'@{vim-commands}' '@{rendered-file}' < /dev/tty`))) + (match @(or `@page(@section)` ;; for "man whatever" + `@page\\.@section`) ;; for "man -l file.1" + (getenv "MAN_PN") + (with-resources ((rendered-file (path-cat mnpgr-dir `@page.@section`) + (remove-path rendered-file))) + (with-stream (s (open-file rendered-file "w")) + (let ((ofilt (make-overstrike-filter (lambda (str) (put-string str s))))) + (whilet ((line (get-line))) + [ofilt line]))) + (sh `vim +'@{vim-commands}' '@{rendered-file}' < /dev/tty`)))) |