branch: externals/org
commit 244bc7d174739ecd8079cfbc8cb12ba9e1e5930c
Author: Ihor Radchenko <[email protected]>
Commit: Ihor Radchenko <[email protected]>

    org-element-cache-map: Improve compiled function check
    
    * lisp/org-element.el (org-element-cache-map): Do not try to
    byte-compile subroutines and natively compiled functions.
---
 lisp/org-element.el | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lisp/org-element.el b/lisp/org-element.el
index ebde90d..75e8409 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -7102,6 +7102,12 @@ of FUNC.  Changes to elements made in FUNC will also 
alter the cache."
                  ;; Byte-compile FUNC making sure that it is as performant
                  ;; as it could be.
                  (func (if (or (byte-code-function-p func)
+                               (and (symbolp func)
+                                    (subrp (symbol-function func)))
+                               (and (symbolp func)
+                                    (native-comp-available-p)
+                                    (fboundp 'subr-native-elisp-p)
+                                    (subr-native-elisp-p (symbol-function 
func)))
                                ;; FIXME: Working around bug
                                ;; 
https://list.orgmode.org/87tuha62rq.fsf@localhost/T/#t
                                ;; Byte-compilation in

Reply via email to