summaryrefslogtreecommitdiff
path: root/module/texinfo
diff options
context:
space:
mode:
Diffstat (limited to 'module/texinfo')
-rw-r--r--module/texinfo/docbook.scm12
-rw-r--r--module/texinfo/serialize.scm17
2 files changed, 25 insertions, 4 deletions
diff --git a/module/texinfo/docbook.scm b/module/texinfo/docbook.scm
index 72779263a..c5a8d659f 100644
--- a/module/texinfo/docbook.scm
+++ b/module/texinfo/docbook.scm
@@ -1,6 +1,6 @@
;;;; (texinfo docbook) -- translating sdocbook into stexinfo
;;;;
-;;;; Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+;;;; Copyright (C) 2009, 2010, 2012 Free Software Foundation, Inc.
;;;; Copyright (C) 2007, 2009 Andy Wingo <wingo at pobox dot com>
;;;;
;;;; This library is free software; you can redistribute it and/or
@@ -89,14 +89,20 @@ a number of generic rules for transforming docbook into texinfo."
`(item ,@body))))
. ,(lambda (tag . body)
`(itemize ,@body)))
+ (acronym . ,(lambda (tag . body)
+ `(acronym (% (acronym . ,body)))))
(term . ,detag-one)
(informalexample . ,detag-one)
(section . ,identity)
(subsection . ,identity)
(subsubsection . ,identity)
(ulink . ,(lambda (tag attrs . body)
- `(uref (% ,(assq 'url (cdr attrs))
- (title ,@body)))))
+ (cond
+ ((assq 'url (cdr attrs))
+ => (lambda (url)
+ `(uref (% ,url (title ,@body)))))
+ (else
+ (car body)))))
(*text* . ,detag-one)
(*default* . ,(lambda (tag . body)
(let ((subst (assq tag tag-replacements)))
diff --git a/module/texinfo/serialize.scm b/module/texinfo/serialize.scm
index 6a32d2346..1436ad5f9 100644
--- a/module/texinfo/serialize.scm
+++ b/module/texinfo/serialize.scm
@@ -1,6 +1,6 @@
;;;; (texinfo serialize) -- rendering stexinfo as texinfo
;;;;
-;;;; Copyright (C) 2009 Free Software Foundation, Inc.
+;;;; Copyright (C) 2009, 2012 Free Software Foundation, Inc.
;;;; Copyright (C) 2003,2004,2009 Andy Wingo <wingo at pobox dot com>
;;;;
;;;; This library is free software; you can redistribute it and/or
@@ -98,6 +98,20 @@
","))
"{" command "@" accum))
+(define (inline-text-args exp lp command type formals args accum)
+ (list* "}"
+ (if (not args) ""
+ (apply
+ append
+ (list-intersperse
+ (map
+ (lambda (x) (append-map (lambda (x) (lp x '())) (reverse x)))
+ (drop-while not
+ (map (lambda (x) (assq-ref args x))
+ (reverse formals))))
+ '(","))))
+ "{" command "@" accum))
+
(define (serialize-text-args lp formals args)
(apply
append
@@ -202,6 +216,7 @@
`((EMPTY-COMMAND . ,empty-command)
(INLINE-TEXT . ,inline-text)
(INLINE-ARGS . ,inline-args)
+ (INLINE-TEXT-ARGS . ,inline-text-args)
(EOL-TEXT . ,eol-text)
(EOL-TEXT-ARGS . ,eol-text-args)
(INDEX . ,eol-text-args)