]> code.delx.au - gnu-emacs/blobdiff - lisp/emacs-lisp/unsafep.el
Update copyright year to 2016
[gnu-emacs] / lisp / emacs-lisp / unsafep.el
index e61de23c34139ef84c0babeb72cf23003691be49..584684fefc93bebc2bb6c7dc5223312384763b39 100644 (file)
@@ -1,6 +1,6 @@
 ;;;; unsafep.el -- Determine whether a Lisp form is safe to evaluate
 
-;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2016 Free Software Foundation, Inc.
 
 ;; Author: Jonathan Yavner <jyavner@member.fsf.org>
 ;; Maintainer: Jonathan Yavner <jyavner@member.fsf.org>
@@ -101,15 +101,13 @@ in the parse.")
 (dolist (x '(;;Special forms
             and catch if or prog1 prog2 progn while unwind-protect
             ;;Safe subrs that have some side-effects
-            ding error message minibuffer-message random read-minibuffer
-            signal sleep-for string-match throw y-or-n-p yes-or-no-p
+            ding error random signal sleep-for string-match throw
             ;;Defsubst functions from subr.el
             caar cadr cdar cddr
             ;;Macros from subr.el
-            save-match-data unless when with-temp-message
+            save-match-data unless when
             ;;Functions from subr.el that have side effects
-            read-passwd split-string replace-regexp-in-string
-            play-sound-file))
+            split-string replace-regexp-in-string play-sound-file))
   (put x 'safe-function t))
 
 ;;;###autoload
@@ -204,6 +202,9 @@ UNSAFEP-VARS is a list of symbols with local bindings."
              (dolist (x (nthcdr 3 form))
                (setq reason (unsafep-progn (cdr x)))
                (if reason (throw 'unsafep reason))))))
+       ((eq fun '\`)
+       ;; Backquoted form - safe if its expansion is.
+       (unsafep (cdr (backquote-process (cadr form)))))
        (t
        ;;First unsafep-function call above wasn't nil, no special case applies
        reason)))))
@@ -260,5 +261,4 @@ If TO-BIND is t, check whether SYM is safe to bind."
             (local-variable-p sym)))
     `(global-variable ,sym))))
 
-;; arch-tag: 6216f98b-eb8f-467a-9c33-7a7644f50658
 ;;; unsafep.el ends here