aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2006-04-11 17:58:58 +0000
committerRichard M. Stallman2006-04-11 17:58:58 +0000
commitaa9addfa93a58c52f368d7ccc2bbcd178bcb067c (patch)
tree238b3a46c3935e7cff34095c0d95b60bd65e0b3c
parenta5ce12c36abccb735ed79bef208c8a0936a618ca (diff)
downloademacs-aa9addfa93a58c52f368d7ccc2bbcd178bcb067c.tar.gz
emacs-aa9addfa93a58c52f368d7ccc2bbcd178bcb067c.zip
(byte-compile-file): Bind enable-local-variables to :safe,
and make normal-mode obey it.
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/emacs-lisp/bytecomp.el6
2 files changed, 15 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 52e2549235c..c965c89b76f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,13 @@
12006-04-11 Richard Stallman <rms@gnu.org>
2
3 * emacs-lisp/bytecomp.el (byte-compile-file):
4 Bind enable-local-variables to :safe, and make normal-mode obey it.
5
6 * files.el (enable-local-variables): Allow value :safe.
7 (normal-mode): Doc fix.
8 (hack-local-variables): Implement enable-local-variables = :safe.
9 (hack-local-variables-confirm): Don't prevent quitting.
10
12006-04-11 Stefan Monnier <monnier@iro.umontreal.ca> 112006-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
2 12
3 * loadhist.el (unload-feature): A bit of sanity check of 13 * loadhist.el (unload-feature): A bit of sanity check of
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."
1650 ;; If they change the file name, then change it for the output also. 1650 ;; If they change the file name, then change it for the output also.
1651 (let ((buffer-file-name filename) 1651 (let ((buffer-file-name filename)
1652 (default-major-mode 'emacs-lisp-mode) 1652 (default-major-mode 'emacs-lisp-mode)
1653 ;; Ignore unsafe local variables.
1654 ;; We only care about a few of them for our purposes.
1655 (enable-local-variables :safe)
1653 (enable-local-eval nil)) 1656 (enable-local-eval nil))
1654 (normal-mode) 1657 ;; Arg of t means don't alter enable-local-variables.
1658 (normal-mode t)
1655 (setq filename buffer-file-name)) 1659 (setq filename buffer-file-name))
1656 ;; Set the default directory, in case an eval-when-compile uses it. 1660 ;; Set the default directory, in case an eval-when-compile uses it.
1657 (setq default-directory (file-name-directory filename))) 1661 (setq default-directory (file-name-directory filename)))