[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 791ea50528 3/3: * lisp/org-element.el (org-element-
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 791ea50528 3/3: * lisp/org-element.el (org-element--cache-active-p): Fix compiler warning |
Date: |
Wed, 28 Sep 2022 00:57:59 -0400 (EDT) |
branch: externals/org
commit 791ea50528df55bac110fe5e2731af056989bedb
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>
* lisp/org-element.el (org-element--cache-active-p): Fix compiler warning
Using `defsubst' here is impractical because some code above does call
`org-element--cache-active-p'. Moving would trigger major refactoring
for little gain. Hence, move back to using simple `defun' until we
modularize lisp/org-element.el better.
Reported-by: No Wayman <iarchivedmywholelife@gmail.com>
Link: https://orgmode.org/list/874jws2v87.fsf@gmail.com
---
lisp/org-element.el | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lisp/org-element.el b/lisp/org-element.el
index fbaa0270ea..a1311a29d4 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -5679,7 +5679,12 @@ This function assumes `org-element--headline-cache' is a
valid AVL tree."
;;;; Tools
-(defsubst org-element--cache-active-p (&optional
called-from-cache-change-func-p)
+;; FIXME: Ideally, this should be inlined to avoid overheads, but
+;; inlined functions should be declared before the code that uses them
+;; and some code above does use `org-element--cache-active-p'. Moving this
+;; declaration on top would require restructuring the whole cache
+;; section.
+(defun org-element--cache-active-p (&optional called-from-cache-change-func-p)
"Non-nil when cache is active in current buffer."
(and org-element-use-cache
org-element--cache