# HG changeset patch # User Richard M. Stallman # Date 1144778329 0 # Node ID b47563345c032ff733c6a61ae7f27bb454a5434f # Parent 19030d5ea7fe5c298d4c23a102e9c7c3d3598938 (byte-compile-file): Bind enable-local-variables to :safe, and make normal-mode obey it. diff -r 19030d5ea7fe -r b47563345c03 lisp/emacs-lisp/bytecomp.el --- a/lisp/emacs-lisp/bytecomp.el Tue Apr 11 17:57:34 2006 +0000 +++ b/lisp/emacs-lisp/bytecomp.el Tue Apr 11 17:58:49 2006 +0000 @@ -1650,8 +1650,12 @@ ;; If they change the file name, then change it for the output also. (let ((buffer-file-name filename) (default-major-mode 'emacs-lisp-mode) + ;; Ignore unsafe local variables. + ;; We only care about a few of them for our purposes. + (enable-local-variables :safe) (enable-local-eval nil)) - (normal-mode) + ;; Arg of t means don't alter enable-local-variables. + (normal-mode t) (setq filename buffer-file-name)) ;; Set the default directory, in case an eval-when-compile uses it. (setq default-directory (file-name-directory filename)))