[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-29 ccc188fcf98 04/11: * lisp/files.el (untrusted-content): New var
From: |
Eli Zaretskii |
Subject: |
emacs-29 ccc188fcf98 04/11: * lisp/files.el (untrusted-content): New variable. |
Date: |
Sun, 24 Mar 2024 09:47:25 -0400 (EDT) |
branch: emacs-29
commit ccc188fcf98ad9166ee551fac9d94b2603c3a51b
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Eli Zaretskii <eliz@gnu.org>
* lisp/files.el (untrusted-content): New variable.
The new variable is to be used when buffer contents comes from untrusted
source.
---
lisp/files.el | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/lisp/files.el b/lisp/files.el
index c0d26b2343c..5536af014f6 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -695,6 +695,14 @@ Also see the `permanently-enabled-local-variables'
variable."
Some modes may wish to set this to nil to prevent directory-local
settings being applied, but still respect file-local ones.")
+(defvar-local untrusted-content nil
+ "Non-nil means that current buffer originated from an untrusted source.
+Email clients and some other modes may set this non-nil to mark the
+buffer contents as untrusted.
+
+This variable might be subject to change without notice.")
+(put 'untrusted-content 'permanent-local t)
+
;; This is an odd variable IMO.
;; You might wonder why it is needed, when we could just do:
;; (setq-local enable-local-variables nil)
- emacs-29 updated (e95a8622263 -> ae8f815613c), Eli Zaretskii, 2024/03/24
- emacs-29 3221d8d4611 02/11: * admin/authors.el (authors-aliases): Add ignored authors., Eli Zaretskii, 2024/03/24
- emacs-29 937b9042ad7 05/11: * lisp/gnus/mm-view.el (mm-display-inline-fontify): Mark contents untrusted., Eli Zaretskii, 2024/03/24
- emacs-29 befa9fcaae2 03/11: org-macro--set-templates: Prevent code evaluation, Eli Zaretskii, 2024/03/24
- emacs-29 0dab0c0d688 09/11: Bump Emacs version to 29.3, Eli Zaretskii, 2024/03/24
- emacs-29 2bc865ace05 07/11: org-file-contents: Consider all remote files unsafe, Eli Zaretskii, 2024/03/24
- emacs-29 ccc188fcf98 04/11: * lisp/files.el (untrusted-content): New variable.,
Eli Zaretskii <=
- emacs-29 6f9ea396f49 06/11: org-latex-preview: Add protection when `untrusted-content' is non-nil, Eli Zaretskii, 2024/03/24
- emacs-29 ff6cc3d2cf0 10/11: * lisp/ldefs-boot.el: Regenerate., Eli Zaretskii, 2024/03/24
- emacs-29 7a5d7be52c5 08/11: org--confirm-resource-safe: Fix prompt when prompting in non-file Org buffers, Eli Zaretskii, 2024/03/24
- emacs-29 8d8253f8991 01/11: * etc/NEWS: Update for Emacs 29.3, Eli Zaretskii, 2024/03/24
- emacs-29 ae8f815613c 11/11: Update files for Emacs 29.3, Eli Zaretskii, 2024/03/24