summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2017-06-14 23:07:04 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2017-06-14 23:07:04 +0200
commit17382722db541dffcc1a631a6e88f167e61fa0bf (patch)
tree47dab93e847d5ff3340ee524513e760b6d031c8b
parenta6212899531cbd2ed10907609550247d822bcad1 (diff)
downloadorg-mode-17382722db541dffcc1a631a6e88f167e61fa0bf.tar.gz
ox-texinfo: Fix last commit
* lisp/ox-texinfo.el (org-texinfo-keyword): Fix last commit. Do not escape raw #+TEXINFO value.
-rw-r--r--lisp/ox-texinfo.el35
1 files changed, 17 insertions, 18 deletions
diff --git a/lisp/ox-texinfo.el b/lisp/ox-texinfo.el
index d69a304..c0b5e60 100644
--- a/lisp/ox-texinfo.el
+++ b/lisp/ox-texinfo.el
@@ -968,24 +968,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