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:
Jambunathan K 2012-04-22 13:33:31 +05:30
parent d73db66a38
commit 00cc5d5cef
1 changed files with 5 additions and 7 deletions

View File

@ -308,7 +308,9 @@ If the value is `comment' insert it as a comment."
(const :tag "Insert the sentence" t)))
(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."
:group 'org-export-general
:type '(string :tag "Creator string"))
@ -1055,10 +1057,7 @@ Assume buffer is in Org mode. Narrowing, if any, is ignored."
(t
(list
key
(let ((restr
(cdr
(assq 'macro
org-element-object-restrictions))))
(let ((restr (org-element-restriction 'macro)))
(org-element-parse-secondary-string
;; If user explicitly asks for
;; 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 prop
(org-element-parse-secondary-string
value
(cdr (assq 'keyword org-element-string-restrictions))))))))
value (org-element-restriction 'keyword)))))))
org-element-parsed-keywords))
;; 3. Return final value.
plist)))