diff options
| author | Richard M. Stallman <rms@gnu.org> | 2006-04-11 17:58:49 +0000 |
|---|---|---|
| committer | Richard M. Stallman <rms@gnu.org> | 2006-04-11 17:58:49 +0000 |
| commit | 88390711a7cc88a2f840c4c0981604b405ddecad (patch) | |
| tree | 2f7956d9024204f1ebda2b36b0a0cb01faea4593 /lisp/emacs-lisp/bytecomp.el | |
| parent | 16751eca9db245af85369ef8f9ffa8a830cd74aa (diff) | |
| download | emacs-88390711a7cc88a2f840c4c0981604b405ddecad.tar.gz | |
(byte-compile-file): Bind enable-local-variables to :safe,
and make normal-mode obey it.
Diffstat (limited to 'lisp/emacs-lisp/bytecomp.el')
| -rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 83620f3344f..da284e94548 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -1650,8 +1650,12 @@ The value is non-nil if there were no errors, nil if errors." ;; 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))) |
