diff options
author | Ludovic Courtès | 2008-01-21 10:39:49 +0100 |
---|---|---|
committer | Ludovic Courtès | 2008-01-21 10:39:49 +0100 |
commit | a348f167d4f15d37f5a0a2df856f8f76d5726792 (patch) | |
tree | 0fe712f9887cde9234e8aa85928ccf5540c2d1dd /src/guile/skribilo/utils/syntax.scm | |
parent | 390afd31ccb548a2c2cb87906bdb6026fc64fa3e (diff) | |
download | skribilo-a348f167d4f15d37f5a0a2df856f8f76d5726792.tar.gz skribilo-a348f167d4f15d37f5a0a2df856f8f76d5726792.tar.lz skribilo-a348f167d4f15d37f5a0a2df856f8f76d5726792.zip |
Small fixes making Guile-Lint happier.
* src/guile/skribilo/utils/syntax.scm (unless, when): Don't use `begin'
if EXPRS contains a single expression.
* src/guile/skribilo/writer.scm (copy-markup-writer): Properly handle
NEW-ENGINE, working around `lambda*' deficiencies.
Diffstat (limited to 'src/guile/skribilo/utils/syntax.scm')
-rw-r--r-- | src/guile/skribilo/utils/syntax.scm | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/guile/skribilo/utils/syntax.scm b/src/guile/skribilo/utils/syntax.scm index adf4297..3c58fb8 100644 --- a/src/guile/skribilo/utils/syntax.scm +++ b/src/guile/skribilo/utils/syntax.scm @@ -1,6 +1,6 @@ ;;; syntax.scm -- Syntactic candy for Skribilo modules. ;;; -;;; Copyright 2005, 2006, 2007 Ludovic Courtès <ludovic.courtes@laas.fr> +;;; Copyright 2005, 2006, 2007, 2008 Ludovic Courtès <ludo@gnu.org> ;;; ;;; ;;; This program is free software; you can redistribute it and/or modify @@ -72,10 +72,16 @@ (lambda () ,expr2))) (define-macro (unless condition . exprs) - `(if (not ,condition) (begin ,@exprs))) + `(if (not ,condition) + ,(if (null? (cdr exprs)) + (car exprs) + `(begin ,@exprs)))) (define-macro (when condition . exprs) - `(if ,condition (begin ,@exprs))) + `(if ,condition + ,(if (null? (cdr exprs)) + (car exprs) + `(begin ,@exprs)))) ;;; @@ -93,6 +99,9 @@ (ngettext msg msgplural n %skribilo-text-domain)) -;;; arch-tag: 9a0e0638-64f0-480a-ab19-49e8bfcbcd9b +;;; Local Variables: +;;; mode: scheme +;;; coding: latin-1 +;;; End: ;;; syntax.scm ends here |