diff options
author | Bastien <bzg@gnu.org> | 2018-10-21 05:23:05 +0200 |
---|---|---|
committer | Bastien <bzg@gnu.org> | 2018-10-21 05:23:05 +0200 |
commit | d70131e32192713567d1f6a48c5f9f36bf06d6de (patch) | |
tree | 800678b8812beec8241931b6a133fcbb3ea8eecf | |
parent | f4785b0a19cee4a579eba9045afdf486bc4a6a5d (diff) | |
parent | 4a2e7c8db9463e7c85ae81256f551e56ef4abd05 (diff) | |
download | org-mode-d70131e32192713567d1f6a48c5f9f36bf06d6de.tar.gz |
Merge branch 'master' of code.orgmode.org:bzg/org-mode
-rw-r--r-- | lisp/ox-beamer.el | 49 |
1 files changed, 25 insertions, 24 deletions
diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el index a6a7eba..dc03693 100644 --- a/lisp/ox-beamer.el +++ b/lisp/ox-beamer.el @@ -424,9 +424,8 @@ used as a communication channel." (let* ((beamer-opt (org-element-property :BEAMER_OPT headline)) (options ;; Collect nonempty options from default value and - ;; headline's properties. Also add a label for - ;; links. - (cl-remove-if-not 'org-string-nw-p + ;; headline's properties. + (cl-remove-if-not #'org-string-nw-p (append (org-split-string (plist-get info :beamer-frame-default-options) ",") @@ -436,29 +435,31 @@ used as a communication channel." ;; them. (and (string-match "^\\[?\\(.*\\)\\]?$" beamer-opt) (match-string 1 beamer-opt)) - ",")) - ;; Provide an automatic label for the frame - ;; unless the user specified one. Also refrain - ;; from labeling `allowframebreaks' frames; this - ;; is not allowed by beamer. - (unless (and beamer-opt - (or (string-match "\\(^\\|,\\)label=" beamer-opt) - (string-match "allowframebreaks" beamer-opt))) - (list - (let ((label (org-beamer--get-label headline info))) - ;; Labels containing colons need to be - ;; wrapped within braces. - (format (if (string-match-p ":" label) - "label={%s}" - "label=%s") - label)))))))) + ","))))) + (fragile + ;; Add "fragile" option if necessary. + (and fragilep + (not (member "fragile" options)) + (list "fragile"))) + (label + ;; Provide an automatic label for the frame unless + ;; the user specified one. Also refrain from + ;; labeling `allowframebreaks' frames; this is not + ;; allowed by Beamer. + (and (not (member "allowframebreaks" options)) + (not (cl-some (lambda (s) (string-match-p "^label=" s)) + options)) + (list + (let ((label (org-beamer--get-label headline info))) + ;; Labels containing colons need to be + ;; wrapped within braces. + (format (if (string-match-p ":" label) + "label={%s}" + "label=%s") + label)))))) ;; Change options list into a string. (org-beamer--normalize-argument - (mapconcat - 'identity - (if (or (not fragilep) (member "fragile" options)) options - (cons "fragile" options)) - ",") + (mapconcat #'identity (append label fragile options) ",") 'option)) ;; Title. (let ((env (org-element-property :BEAMER_ENV headline))) |