summaryrefslogtreecommitdiff
path: root/src/guile/skribilo/writer.scm
diff options
context:
space:
mode:
authorLudovic Courtès2008-01-21 10:39:49 +0100
committerLudovic Courtès2008-01-21 10:39:49 +0100
commita348f167d4f15d37f5a0a2df856f8f76d5726792 (patch)
tree0fe712f9887cde9234e8aa85928ccf5540c2d1dd /src/guile/skribilo/writer.scm
parent390afd31ccb548a2c2cb87906bdb6026fc64fa3e (diff)
downloadskribilo-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/writer.scm')
-rw-r--r--src/guile/skribilo/writer.scm14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/guile/skribilo/writer.scm b/src/guile/skribilo/writer.scm
index 9c00f82..90b8ff3 100644
--- a/src/guile/skribilo/writer.scm
+++ b/src/guile/skribilo/writer.scm
@@ -1,7 +1,7 @@
;;; writer.scm -- Markup writers.
;;;
+;;; Copyright 2005, 2006, 2008 Ludovic Courtès <ludo@gnu.org>
;;; Copyright 2003, 2004 Erick Gallesio - I3S-CNRS/ESSI <eg@essi.fr>
-;;; Copyright 2005, 2006 Ludovic Courtès <ludovic.courtes@laas.fr>
;;;
;;;
;;; This program is free software; you can redistribute it and/or modify
@@ -122,7 +122,7 @@
(action 'unspecified)
(after #f)
#:rest engine)
- ;;; FIXME: `lambda*' sucks and fails when both optional arguments and
+ ;;; XXX: `lambda*' sucks and fails when both optional arguments and
;;; keyword arguments are used together. In particular, if ENGINE is not
;;; specified by the caller but other keyword arguments are specified, it
;;; will consider the value of ENGINE to be the first keyword found.
@@ -236,14 +236,20 @@
'())))))))
-(define* (copy-markup-writer markup old-engine :optional new-engine
+(define* (copy-markup-writer markup old-engine ;; #:optional new-engine
:key (predicate 'unspecified)
(class 'unspecified)
(options 'unspecified)
(validate 'unspecified)
(before 'unspecified)
(action 'unspecified)
- (after 'unspecified))
+ (after 'unspecified)
+ :rest args)
+ (define new-engine
+ ;; XXX: Work around `lambda*' suckingness (see `markup-writer').
+ (and (not (null? args))
+ (car args)))
+
(let ((old (markup-writer-get markup old-engine))
(new-engine (or new-engine old-engine)))
(markup-writer markup new-engine