diff options
author | Nicolas Goaziou <n.goaziou@gmail.com> | 2012-08-22 17:45:18 +0200 |
---|---|---|
committer | Nicolas Goaziou <n.goaziou@gmail.com> | 2012-08-22 17:45:18 +0200 |
commit | 436c2a0794cb719834bce82c4194bd0a544a401e (patch) | |
tree | 78e9e554de5a4c4152e2259514a9a6acde97250f /contrib | |
parent | cd9ce4b9141366b9c2364a96d26b1ec3da6a3c61 (diff) |
org-e-beamer: Do not normalize empty arguments
* contrib/lisp/org-e-beamer.el (org-e-beamer--normalize-argument): Do
not normalize empty arguments.
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/lisp/org-e-beamer.el | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/contrib/lisp/org-e-beamer.el b/contrib/lisp/org-e-beamer.el index a579bd708..85a04821c 100644 --- a/contrib/lisp/org-e-beamer.el +++ b/contrib/lisp/org-e-beamer.el @@ -227,19 +227,20 @@ TYPE is a symbol among the following: `action' Return ARGUMENT within angular brackets. `defaction' Return ARGUMENT within both square and angular brackets. `option' Return ARGUMENT within square brackets." - (case type - (action (if (string-match "\\`<.*>\\'" argument) argument - (format "<%s>" argument))) - (defaction (cond - ((string-match "\\`\\[<.*>\\]\\'" argument) argument) - ((string-match "\\`<.*>\\'" argument) - (format "[%s]" argument)) - ((string-match "\\`\\[\\(.*\\)\\]\\'" argument) - (format "[<%s>]" (match-string 1 argument))) - (t (format "[<%s>]" argument)))) - (option (if (string-match "\\`\\[.*\\]\\'" argument) argument - (format "[%s]" argument))) - (otherwise argument))) + (if (not (string-match "\\S-" argument)) "" + (case type + (action (if (string-match "\\`<.*>\\'" argument) argument + (format "<%s>" argument))) + (defaction (cond + ((string-match "\\`\\[<.*>\\]\\'" argument) argument) + ((string-match "\\`<.*>\\'" argument) + (format "[%s]" argument)) + ((string-match "\\`\\[\\(.*\\)\\]\\'" argument) + (format "[<%s>]" (match-string 1 argument))) + (t (format "[<%s>]" argument)))) + (option (if (string-match "\\`\\[.*\\]\\'" argument) argument + (format "[%s]" argument))) + (otherwise argument)))) (defun org-e-beamer--element-has-overlay-p (element) "Non-nil when ELEMENT has an overlay specified. |