mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-28 07:44:49 +00:00
org-in-archived-heading-p: Use ELEMENT arg more optimally
* lisp/org.el (org-in-archived-heading-p): Do not check for point position when ELEMENT is provided and use ELEMENT when checking archive status of ancestors.
This commit is contained in:
parent
30f1f187d1
commit
4c6595d2b4
@ -20747,7 +20747,7 @@ unless optional argument NO-INHERITANCE is non-nil.
|
||||
|
||||
Optional argument ELEMENT contains element at point."
|
||||
(cond
|
||||
((org-before-first-heading-p) nil)
|
||||
((and (not element) (org-before-first-heading-p)) nil)
|
||||
((if element
|
||||
(org-element-property :archivedp element)
|
||||
(let ((tags (org-get-tags element 'local)))
|
||||
@ -20757,7 +20757,7 @@ Optional argument ELEMENT contains element at point."
|
||||
(t
|
||||
(if (org-element--cache-active-p)
|
||||
(cl-some (lambda (el) (org-element-property :archivedp el))
|
||||
(org-element-lineage (org-element-at-point) nil t))
|
||||
(org-element-lineage (or element (org-element-at-point)) nil t))
|
||||
(save-excursion (and (org-up-heading-safe) (org-in-archived-heading-p)))))))
|
||||
|
||||
(defun org-at-comment-p nil
|
||||
|
Loading…
Reference in New Issue
Block a user