org-export: Minor fixes
* contrib/lisp/org-export.el (org-export-creator-string): Check for `org-version' being bound before using it. (org-export-get-inbuffer-options): Use `org-element-restriction'.
This commit is contained in:
parent
d73db66a38
commit
00cc5d5cef
|
@ -308,7 +308,9 @@ If the value is `comment' insert it as a comment."
|
||||||
(const :tag "Insert the sentence" t)))
|
(const :tag "Insert the sentence" t)))
|
||||||
|
|
||||||
(defcustom org-export-creator-string
|
(defcustom org-export-creator-string
|
||||||
(format "Generated by Org mode %s in Emacs %s." org-version emacs-version)
|
(format "Generated by Org mode %s in Emacs %s."
|
||||||
|
(if (boundp 'org-version) org-version "(Unknown)")
|
||||||
|
emacs-version)
|
||||||
"String to insert at the end of the generated document."
|
"String to insert at the end of the generated document."
|
||||||
:group 'org-export-general
|
:group 'org-export-general
|
||||||
:type '(string :tag "Creator string"))
|
:type '(string :tag "Creator string"))
|
||||||
|
@ -1055,10 +1057,7 @@ Assume buffer is in Org mode. Narrowing, if any, is ignored."
|
||||||
(t
|
(t
|
||||||
(list
|
(list
|
||||||
key
|
key
|
||||||
(let ((restr
|
(let ((restr (org-element-restriction 'macro)))
|
||||||
(cdr
|
|
||||||
(assq 'macro
|
|
||||||
org-element-object-restrictions))))
|
|
||||||
(org-element-parse-secondary-string
|
(org-element-parse-secondary-string
|
||||||
;; If user explicitly asks for
|
;; If user explicitly asks for
|
||||||
;; a newline, be sure to preserve it
|
;; a newline, be sure to preserve it
|
||||||
|
@ -1126,8 +1125,7 @@ Assume buffer is in Org mode. Narrowing, if any, is ignored."
|
||||||
(plist-put
|
(plist-put
|
||||||
plist prop
|
plist prop
|
||||||
(org-element-parse-secondary-string
|
(org-element-parse-secondary-string
|
||||||
value
|
value (org-element-restriction 'keyword)))))))
|
||||||
(cdr (assq 'keyword org-element-string-restrictions))))))))
|
|
||||||
org-element-parsed-keywords))
|
org-element-parsed-keywords))
|
||||||
;; 3. Return final value.
|
;; 3. Return final value.
|
||||||
plist)))
|
plist)))
|
||||||
|
|
Loading…
Reference in New Issue