From: Ihor Radchenko Date: Thu, 16 Jun 2022 01:28:27 +0000 (+0800) Subject: org-element-map: Avoid repetitive `plist-get' call X-Git-Tag: emacs-29.0.90~1447^2~1711 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4f37a3b299bcec71a0e9bdd84b7b226494006fe4;p=emacs.git org-element-map: Avoid repetitive `plist-get' call * lisp/org/org-element.el (org-element-map): Do not call `(plist-get info :ignore-list)' on every iteration. --- diff --git a/lisp/org/org-element.el b/lisp/org/org-element.el index 9db1406b3fb..20b5b030392 100644 --- a/lisp/org/org-element.el +++ b/lisp/org/org-element.el @@ -4391,6 +4391,7 @@ looking into captions: ;; every element it encounters. (and (not (eq category 'elements)) (setq category 'elements)))))))) + (--ignore-list (plist-get info :ignore-list)) --acc) (letrec ((--walk-tree (lambda (--data) @@ -4400,7 +4401,7 @@ looking into captions: (cond ((not --data)) ;; Ignored element in an export context. - ((and info (memq --data (plist-get info :ignore-list)))) + ((and info (memq --data --ignore-list))) ;; List of elements or objects. ((not --type) (mapc --walk-tree --data)) ;; Unconditionally enter parse trees.