org-element: Tiny refactoring
* lisp/org-element.el (org-element-map): Reduce consing and improve readability at the price of a tiny code duplication.
This commit is contained in:
parent
30b0c09275
commit
96b02fa9a6
|
@ -4038,12 +4038,12 @@ looking into captions:
|
||||||
(cond
|
(cond
|
||||||
((not value))
|
((not value))
|
||||||
((member kwd org-element-dual-keywords)
|
((member kwd org-element-dual-keywords)
|
||||||
(dolist
|
(if (member kwd org-element-multiple-keywords)
|
||||||
(line (if (member kwd org-element-multiple-keywords)
|
(dolist (line (reverse value))
|
||||||
(reverse value)
|
(funcall --walk-tree (cdr line))
|
||||||
(list value)))
|
(funcall --walk-tree (car line)))
|
||||||
(funcall --walk-tree (cdr line))
|
(funcall --walk-tree (cdr value))
|
||||||
(funcall --walk-tree (car line))))
|
(funcall --walk-tree (car value))))
|
||||||
((member kwd org-element-multiple-keywords)
|
((member kwd org-element-multiple-keywords)
|
||||||
(mapc --walk-tree (reverse value)))
|
(mapc --walk-tree (reverse value)))
|
||||||
(t (funcall --walk-tree value))))))
|
(t (funcall --walk-tree value))))))
|
||||||
|
|
Loading…
Reference in New Issue