summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/unsafep.el
diff options
context:
space:
mode:
authorYuuki Harano <masm+github@masm11.me>2021-01-30 23:37:19 +0900
committerYuuki Harano <masm+github@masm11.me>2021-01-30 23:37:19 +0900
commit50c76b844bc79309b4f5d9e28a2386b9a6f735b7 (patch)
tree29f8273d8afccae1f16b723c36548cee150cb0bc /lisp/emacs-lisp/unsafep.el
parent563a0d94c379292bd88e83f18560ed21c497cea9 (diff)
parent96f20120c97a0a329fff81a0cc3747082a8a2c55 (diff)
downloademacs-50c76b844bc79309b4f5d9e28a2386b9a6f735b7.tar.gz
emacs-50c76b844bc79309b4f5d9e28a2386b9a6f735b7.tar.bz2
emacs-50c76b844bc79309b4f5d9e28a2386b9a6f735b7.zip
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtk
Diffstat (limited to 'lisp/emacs-lisp/unsafep.el')
-rw-r--r--lisp/emacs-lisp/unsafep.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/unsafep.el b/lisp/emacs-lisp/unsafep.el
index f46d9c77eae..d52a6c796db 100644
--- a/lisp/emacs-lisp/unsafep.el
+++ b/lisp/emacs-lisp/unsafep.el
@@ -1,4 +1,4 @@
-;;;; unsafep.el -- Determine whether a Lisp form is safe to evaluate
+;;;; unsafep.el -- Determine whether a Lisp form is safe to evaluate -*- lexical-binding: t; -*-
;; Copyright (C) 2002-2021 Free Software Foundation, Inc.
@@ -129,15 +129,16 @@ in the parse.")
(put x 'safe-function t))
;;;###autoload
-(defun unsafep (form &optional unsafep-vars)
+(defun unsafep (form &optional vars)
"Return nil if evaluating FORM couldn't possibly do any harm.
Otherwise result is a reason why FORM is unsafe.
-UNSAFEP-VARS is a list of symbols with local bindings."
+VARS is a list of symbols with local bindings like `unsafep-vars'."
(catch 'unsafep
(if (or (eq safe-functions t) ;User turned off safety-checking
(atom form)) ;Atoms are never unsafe
(throw 'unsafep nil))
- (let* ((fun (car form))
+ (let* ((unsafep-vars vars)
+ (fun (car form))
(reason (unsafep-function fun))
arg)
(cond