ox-koma-letter: Fix a docstring
* contrib/lisp/ox-koma-letter.el (org-koma-letter--special-contents-as-macro): Fix docstring. Tiny refactoring.
This commit is contained in:
parent
e6f36cfe3a
commit
a0a8834f30
|
@ -465,27 +465,27 @@ return a string or nil."
|
||||||
(t value))))
|
(t value))))
|
||||||
|
|
||||||
(defun org-koma-letter--special-contents-as-macro
|
(defun org-koma-letter--special-contents-as-macro
|
||||||
(keywords &optional keep-newlines no-tag)
|
(keywords &optional keep-newlines no-tag)
|
||||||
"Process KEYWORDS members of `org-koma-letter-special-contents'.
|
"Process KEYWORDS members of `org-koma-letter-special-contents'.
|
||||||
KEYWORDS is a list of symbols. Return them as a string to be
|
KEYWORDS is a list of symbols. Return them as a string to be
|
||||||
formatted.
|
formatted.
|
||||||
|
|
||||||
The function is used for inserting content of special headings
|
The function is used for inserting content of special headings
|
||||||
such as PS.
|
such as PS.
|
||||||
|
|
||||||
If KEEP-NEWLINES is t newlines will not be removed. If NO-TAG is
|
If KEEP-NEWLINES is non-nil leading and trailing newlines are not
|
||||||
t the content in `org-koma-letter-special-contents' will not be
|
removed. If NO-TAG is non-nil the content in
|
||||||
wrapped in a macro named whatever the members of KEYWORDS are
|
`org-koma-letter-special-contents' are not wrapped in a macro
|
||||||
called."
|
named whatever the members of KEYWORDS are called."
|
||||||
(mapconcat
|
(mapconcat
|
||||||
#'(lambda (keyword)
|
(lambda (keyword)
|
||||||
(let* ((name (org-koma-letter--get-value keyword))
|
(let* ((name (org-koma-letter--get-value keyword))
|
||||||
(value (org-koma-letter--get-tagged-contents name)))
|
(value (org-koma-letter--get-tagged-contents name)))
|
||||||
(when value
|
(cond ((not value) nil)
|
||||||
(if no-tag (if keep-newlines value (org-trim value))
|
(no-tag (if keep-newlines value (org-trim value)))
|
||||||
(format "\\%s{%s}\n"
|
(t (format "\\%s{%s}\n"
|
||||||
name
|
name
|
||||||
(if keep-newlines value (org-trim value)))))))
|
(if keep-newlines value (org-trim value)))))))
|
||||||
keywords
|
keywords
|
||||||
""))
|
""))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue