From 3fdd9dff099ca46625c2d922f4f43a33e9b22335 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 29 Jan 2008 19:00:15 +0100 Subject: doc: Tiny improvements of the `manual' module. * doc/modules/skribilo/documentation/manual.scm (disp): Use `resolve' and test that engine, rather than raw `(engine-format? "xxx")'. (compiler-options): Issue a warning if an option is not documented. --- doc/modules/skribilo/documentation/manual.scm | 42 ++++++++++++++++----------- 1 file changed, 25 insertions(+), 17 deletions(-) (limited to 'doc') diff --git a/doc/modules/skribilo/documentation/manual.scm b/doc/modules/skribilo/documentation/manual.scm index 90a0c68..8e4f121 100644 --- a/doc/modules/skribilo/documentation/manual.scm +++ b/doc/modules/skribilo/documentation/manual.scm @@ -221,22 +221,23 @@ ;* disp ... */ ;*---------------------------------------------------------------------*/ (define-markup (disp :rest opts :key (verb #f) (line #f) (bg *disp-color*)) - (cond ((engine-format? "latex") - (if verb - (pre (the-body opts)) - (the-body opts))) - ((engine-format? "lout") - (! "\n@ID { $1 } # disp\n" - (if verb - (pre (the-body opts)) - (the-body opts)))) - (else - (center - (frame :margin 5 :border 0 :width *prgm-width* - (color :margin 5 :width 100. :bg bg - (if verb - (pre (the-body opts)) - (the-body opts)))))))) + (resolve (lambda (n e env) + (cond ((engine-format? "latex" e) + (if verb + (pre (the-body opts)) + (the-body opts))) + ((engine-format? "lout" e) + (! "\n@ID { $1 } # disp\n" + (if verb + (pre (the-body opts)) + (the-body opts)))) + (else + (center + (frame :margin 5 :border 0 :width *prgm-width* + (color :margin 5 :width 100. :bg bg + (if verb + (pre (the-body opts)) + (the-body opts)))))))))) ;*---------------------------------------------------------------------*/ ;* keyword ... */ @@ -452,5 +453,12 @@ (option-required-arg? option)) (cadr doc) (car doc)) - "")))) + (let ((msg (string-append "missing description " + "for compiler option `" + (or (and short-name + (string short-name)) + (car long-names)) + "'"))) + (skribe-warning 1 msg) + ""))))) options)))) -- cgit v1.2.3