branch: externals/org
commit f4df8b06d2a744bc1f2e1f5eaa024ea5784e63f1
Merge: cb36b1627d 7fac67e2e0
Author: Ihor Radchenko <yanta...@posteo.net>
Commit: Ihor Radchenko <yanta...@posteo.net>

    Merge branch 'bugfix'
---
 lisp/org.el | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/lisp/org.el b/lisp/org.el
index 78e8c06922..f8669f3f7b 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -16241,7 +16241,16 @@ fragments in the buffer."
   (interactive "P")
   (cond
    ((not (display-graphic-p)) nil)
-   ((and untrusted-content (not org--latex-preview-when-risky)) nil)
+   ((and
+     ;; Since Emacs 30, prefer `trusted-content-p' API.
+     (not (fboundp 'trusted-content-p))
+     untrusted-content
+     (not org--latex-preview-when-risky))
+    nil)
+   ((and (fboundp 'trusted-content-p) ; Available since Emacs 30
+         (not (trusted-content-p))
+         (not org--latex-preview-when-risky))
+    nil)
    ;; Clear whole buffer.
    ((equal arg '(64))
     (org-clear-latex-preview (point-min) (point-max))

Reply via email to