emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org a2730b47fa 032/101: org-odt--paragraph-style: Use `


From: ELPA Syncer
Subject: [elpa] externals/org a2730b47fa 032/101: org-odt--paragraph-style: Use `org-element-lineage'
Date: Sat, 1 Jul 2023 09:59:03 -0400 (EDT)

branch: externals/org
commit a2730b47fa44a088dcee2149f2cb26e05f673563
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>

    org-odt--paragraph-style: Use `org-element-lineage'
---
 lisp/ox-odt.el | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el
index 62b2902f4f..280e25593b 100644
--- a/lisp/ox-odt.el
+++ b/lisp/ox-odt.el
@@ -2816,13 +2816,12 @@ information."
 (defun org-odt--paragraph-style (paragraph)
   "Return style of PARAGRAPH.
 Style is a symbol among `quoted', `centered' and nil."
-  (let ((up paragraph))
-    (while (and (setq up (org-element-property :parent up))
-               (not (org-element-type-p
-                    up '(center-block quote-block section)))))
-    (cl-case (org-element-type up)
-      (center-block 'centered)
-      (quote-block 'quoted))))
+  (cl-case (org-element-type
+            (org-element-lineage
+             paragraph
+             '(center-block quote-block section)))
+    (center-block 'center)
+    (quote-block 'quoted)))
 
 (defun org-odt--format-paragraph (paragraph contents info default center quote)
   "Format paragraph according to given styles.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]