summaryrefslogtreecommitdiff
path: root/module/texinfo
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2011-08-23 18:00:02 +0200
committerAndy Wingo <wingo@pobox.com>2011-08-23 18:00:02 +0200
commit35c0f0672e76ee8cb0007f57b85a0d666365d5d1 (patch)
tree7ce66e657f97a0ca26b5fda561272e6ad2ac0eb8 /module/texinfo
parent31d5976931adf4bd7cd4b0b0cbcbf3b84335f4a1 (diff)
downloadguile-35c0f0672e76ee8cb0007f57b85a0d666365d5d1.tar.gz
module-stexi-documentation #:docs-resolver keyword arg
* module/texinfo/reflection.scm (module-stexi-documentation): Make #:docs-resolver a keyword argument. Provide back compat with docs-resolver as an optional argument, though.
Diffstat (limited to 'module/texinfo')
-rw-r--r--module/texinfo/reflection.scm9
1 files changed, 7 insertions, 2 deletions
diff --git a/module/texinfo/reflection.scm b/module/texinfo/reflection.scm
index a69436f89..d85f61239 100644
--- a/module/texinfo/reflection.scm
+++ b/module/texinfo/reflection.scm
@@ -288,11 +288,16 @@
(else (lp (cdr forms))))))
(define* (module-stexi-documentation sym-name
- #:optional (docs-resolver
- (lambda (name def) def)))
+ #:optional %docs-resolver
+ #:key (docs-resolver
+ (or %docs-resolver
+ (lambda (name def) def))))
"Return documentation for the module named @var{sym-name}. The
documentation will be formatted as @code{stexi}
(@pxref{texinfo,texinfo})."
+ (if %docs-resolver
+ (issue-deprecation-warning
+ "module-stexi-documentation: use #:docs-resolver instead of a positional argument."))
(let* ((commentary (and=> (module-commentary sym-name)
(lambda (x) (string-trim-both x #\newline))))
(stexi (string->stexi commentary))