From 4809602f3733c84a6b3d671992e8e24560765d53 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 26 May 2016 06:51:36 -0700 Subject: Check manual for .cblk/.cble pairing. * checkman.txr (check-cblk): New pattern function, hooked into main scan. * txr.1: Fixed four instances of .cblk closed by .cblk instead of .cble. --- checkman.txr | 16 ++++++++++++++++ txr.1 | 8 ++++---- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/checkman.txr b/checkman.txr index 9d9a20a9..8d7b8327 100644 --- a/checkman.txr +++ b/checkman.txr @@ -78,6 +78,20 @@ @ (end) @(end) @;; +@;; Check .cblk/.cble pairing +@;; +@(define check-cblk ()) +.cblk +@ (assert bad ln `.cblk not closed`) +@ (repeat :gap 0) +@ (none) +.cblk +@ (end) +@ (until :mandatory) +.cble +@ (end) +@(end) +@;; @;; Main @;; @(bind errors 0) @@ -90,6 +104,8 @@ @ (check-func) @ (or) @ (check-code) +@ (or) +@ (check-cblk) @ (end) @ (catch bad (line msg)) @ (do (inc errors) diff --git a/txr.1 b/txr.1 index be6a04a8..51d6c1df 100644 --- a/txr.1 +++ b/txr.1 @@ -21154,7 +21154,7 @@ This is different from the behavior of .cblk .meti >> [ sequence 0..t] -.cblk +.cble or .cblk .meti (sub < sequence 0 t) @@ -27268,7 +27268,7 @@ evaluated and inserted into the resulting structure. The syntax .cblk .meti (qquote (unquote << form )) -.cblk +.cble is equivalent to .metn form : the @@ -32088,7 +32088,7 @@ Contrast the previous example with: (let ((rest "0")) `rest: @@rest`) -> ;; error: no such function or operator: sys:var -.cblk +.cble Under the .code op @@ -32202,7 +32202,7 @@ according to the following equivalence: (ado form ...) <--> (apf (do form ...)) (ido form ...) <--> (ipf (do form ...)) -.cblk +.cble See also: the .code apf -- cgit v1.2.3