diff options
author | Andrea Corallo <akrl@sdf.org> | 2021-01-30 14:09:37 +0100 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2021-01-30 14:09:37 +0100 |
commit | a8b8d220b4fccaa812e85f9b2b3715593dc285ac (patch) | |
tree | 07051469f09277b1993eee37870059e3d0abf71e /lisp/emacs-lisp/unsafep.el | |
parent | b8d3ae78c54db7c7bb65d367a80f9be3d8744c48 (diff) | |
parent | ed2f2cc5577d5d9b61db7a5b61e93e79d678be41 (diff) | |
download | emacs-a8b8d220b4fccaa812e85f9b2b3715593dc285ac.tar.gz emacs-a8b8d220b4fccaa812e85f9b2b3715593dc285ac.tar.bz2 emacs-a8b8d220b4fccaa812e85f9b2b3715593dc285ac.zip |
Merge remote-tracking branch 'savannah/master' into native-comp
Diffstat (limited to 'lisp/emacs-lisp/unsafep.el')
-rw-r--r-- | lisp/emacs-lisp/unsafep.el | 9 |
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 |