aboutsummaryrefslogtreecommitdiff
path: root/compat-30.el
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2024-12-16 10:35:00 +0100
committerDaniel Mendler <mail@daniel-mendler.de>2024-12-16 10:35:08 +0100
commitf1e9b67c749ef12fe526dbe183c5f10da492fc88 (patch)
tree9a88e3ca37225fcfc46201a5bbc682b687ff6f6a /compat-30.el
parent3626216e7665bfe20f41f9b3d6bbeb1a7de2b1a6 (diff)
compat-30: Rename trusted-content variable
Diffstat (limited to 'compat-30.el')
-rw-r--r--compat-30.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/compat-30.el b/compat-30.el
index 02ef426..33305e3 100644
--- a/compat-30.el
+++ b/compat-30.el
@@ -59,7 +59,7 @@ See also `find-buffer-visiting'."
;;;; Defined in files.el
-(compat-defvar trusted-files nil ;; <compat-tests:trusted-files>
+(compat-defvar trusted-content nil ;; <compat-tests:trusted-content>
"List of files and directories whose content we trust.
Be extra careful here since trusting means that Emacs might execute the
code contained within those files and directories without an explicit
@@ -79,7 +79,7 @@ all files, which opens a gaping security hole."
(compat-defun trusted-content-p () ;; <compat-tests:trusted-content-p>
"Return non-nil if we trust the contents of the current buffer.
Here, \"trust\" means that we are willing to run code found inside of it.
-See also `trusted-files'."
+See also `trusted-content'."
;; We compare with `buffer-file-truename' i.s.o `buffer-file-name'
;; to try and avoid marking as trusted a file that's merely accessed
;; via a symlink that happens to be inside a trusted dir.
@@ -88,14 +88,14 @@ See also `trusted-files'."
(with-demoted-errors "trusted-content-p: %S"
(let ((exists (file-exists-p buffer-file-truename)))
(or
- (eq trusted-files :all)
+ (eq trusted-content :all)
;; We can't avoid trusting the user's init file.
(if (and exists user-init-file)
(file-equal-p buffer-file-truename user-init-file)
(equal buffer-file-truename user-init-file))
(let ((file (abbreviate-file-name buffer-file-truename))
(trusted nil))
- (dolist (tf trusted-files)
+ (dolist (tf trusted-content)
(when (or (if exists (file-equal-p tf file) (equal tf file))
;; We don't use `file-in-directory-p' here, because
;; we want to err on the conservative side: "guilty