diff options
-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`)))) |