diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2017-06-14 23:07:44 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2017-06-14 23:07:44 +0200 |
commit | ad0312cde22dfa0a79fc328739dfcc75e29fcd3a (patch) | |
tree | ce1bc87d187d271372bb8f2ba8a411a6f84db6f8 | |
parent | c7be9d9ad5420b99032ac91ec90db88c6d4e6922 (diff) | |
parent | 17382722db541dffcc1a631a6e88f167e61fa0bf (diff) | |
download | org-mode-ad0312cde22dfa0a79fc328739dfcc75e29fcd3a.tar.gz |
Merge branch 'maint'
-rw-r--r-- | lisp/ox-texinfo.el | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/lisp/ox-texinfo.el b/lisp/ox-texinfo.el index 6ea772c..fd721a7 100644 --- a/lisp/ox-texinfo.el +++ b/lisp/ox-texinfo.el @@ -989,24 +989,23 @@ contextual information." (defun org-texinfo-keyword (keyword _contents info) "Transcode a KEYWORD element from Org to Texinfo. CONTENTS is nil. INFO is a plist holding contextual information." - (let ((key (org-element-property :key keyword)) - (value (org-texinfo--sanitize-content - (org-element-property :value keyword)))) - (cond - ((string= key "TEXINFO") value) - ((string= key "CINDEX") (format "@cindex %s" value)) - ((string= key "FINDEX") (format "@findex %s" value)) - ((string= key "KINDEX") (format "@kindex %s" value)) - ((string= key "PINDEX") (format "@pindex %s" value)) - ((string= key "TINDEX") (format "@tindex %s" value)) - ((string= key "VINDEX") (format "@vindex %s" value)) - ((string= key "TOC") - (cond ((string-match-p "\\<tables\\>" value) - (concat "@listoffloats " - (org-export-translate "Table" :utf-8 info))) - ((string-match-p "\\<listings\\>" value) - (concat "@listoffloats " - (org-export-translate "Listing" :utf-8 info)))))))) + (let* ((raw-value (org-element-property :value keyword)) + (value (org-texinfo--sanitize-content raw-value))) + (pcase (org-element-property :key keyword) + ("TEXINFO" raw-value) + ("CINDEX" (format "@cindex %s" value)) + ("FINDEX" (format "@findex %s" value)) + ("KINDEX" (format "@kindex %s" value)) + ("PINDEX" (format "@pindex %s" value)) + ("TINDEX" (format "@tindex %s" value)) + ("VINDEX" (format "@vindex %s" value)) + ("TOC" + (cond ((string-match-p "\\<tables\\>" value) + (concat "@listoffloats " + (org-export-translate "Table" :utf-8 info))) + ((string-match-p "\\<listings\\>" value) + (concat "@listoffloats " + (org-export-translate "Listing" :utf-8 info)))))))) ;;;; Line Break |