From 96b02fa9a6edbc1f1feb5eddea332715679f200a Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Mon, 26 Jan 2015 19:45:45 +0100 Subject: [PATCH] org-element: Tiny refactoring * lisp/org-element.el (org-element-map): Reduce consing and improve readability at the price of a tiny code duplication. --- lisp/org-element.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lisp/org-element.el b/lisp/org-element.el index 4e5e131c1..6598c936f 100644 --- a/lisp/org-element.el +++ b/lisp/org-element.el @@ -4038,12 +4038,12 @@ looking into captions: (cond ((not value)) ((member kwd org-element-dual-keywords) - (dolist - (line (if (member kwd org-element-multiple-keywords) - (reverse value) - (list value))) - (funcall --walk-tree (cdr line)) - (funcall --walk-tree (car line)))) + (if (member kwd org-element-multiple-keywords) + (dolist (line (reverse value)) + (funcall --walk-tree (cdr line)) + (funcall --walk-tree (car line))) + (funcall --walk-tree (cdr value)) + (funcall --walk-tree (car value)))) ((member kwd org-element-multiple-keywords) (mapc --walk-tree (reverse value))) (t (funcall --walk-tree value))))))