From 7aacaf15a2ec7d17e75d94b902fa895d7d196026 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 9 Aug 2012 23:53:52 -0700 Subject: [PATCH] Disable local eval: in some places * tutorial.el (help-with-tutorial): * emacs-lisp/copyright.el (copyright-update-directory): * emacs-lisp/autoload.el (autoload-find-generated-file) (autoload-find-file): Disable local eval: (for insurance). --- lisp/ChangeLog | 7 +++++++ lisp/emacs-lisp/autoload.el | 6 ++++-- lisp/emacs-lisp/copyright.el | 1 + lisp/tutorial.el | 6 ++++-- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7d61d9d69b..92afc1ab85 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2012-08-10 Glenn Morris + + * tutorial.el (help-with-tutorial): + * emacs-lisp/copyright.el (copyright-update-directory): + * emacs-lisp/autoload.el (autoload-find-generated-file) + (autoload-find-file): Disable local eval: (for insurance). + 2012-08-07 Glenn Morris * files.el (hack-local-variables-filter): If an eval: form is not diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index 5af666b9de..e8dd9e8d1b 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -201,7 +201,8 @@ or macro definition or a defcustom)." (defun autoload-find-generated-file () "Visit the autoload file for the current buffer, and return its buffer. If a buffer is visiting the desired autoload file, return it." - (let ((enable-local-variables :safe)) + (let ((enable-local-variables :safe) + (enable-local-eval nil)) ;; We used to use `raw-text' to read this file, but this causes ;; problems when the file contains non-ASCII characters. (find-file-noselect @@ -355,7 +356,8 @@ which lists the file name and which functions are in it, etc." (emacs-lisp-mode) (setq default-directory (file-name-directory file)) (insert-file-contents file nil) - (let ((enable-local-variables :safe)) + (let ((enable-local-variables :safe) + (enable-local-eval nil)) (hack-local-variables)) (current-buffer))) diff --git a/lisp/emacs-lisp/copyright.el b/lisp/emacs-lisp/copyright.el index 09b456b54b..0da5b2abbb 100644 --- a/lisp/emacs-lisp/copyright.el +++ b/lisp/emacs-lisp/copyright.el @@ -366,6 +366,7 @@ If FIX is non-nil, run `copyright-fix-years' instead." (find-file file) (let ((inhibit-read-only t) (enable-local-variables :safe) + (enable-local-eval nil) copyright-query) (if fix (copyright-fix-years) diff --git a/lisp/tutorial.el b/lisp/tutorial.el index b512700f5b..e43c878a17 100644 --- a/lisp/tutorial.el +++ b/lisp/tutorial.el @@ -830,7 +830,8 @@ Run the Viper tutorial? ")) (if old-tut-file (progn (insert-file-contents (tutorial--saved-file)) - (let ((enable-local-variables :safe)) + (let ((enable-local-variables :safe) + (enable-local-eval nil)) (hack-local-variables)) ;; FIXME? What we actually want is to ignore dir-locals (?). (setq buffer-read-only nil) ; bug#11118 @@ -849,7 +850,8 @@ Run the Viper tutorial? ")) (goto-char tutorial--point-before-chkeys) (setq tutorial--point-before-chkeys (point-marker))) (insert-file-contents (expand-file-name filename tutorial-directory)) - (let ((enable-local-variables :safe)) + (let ((enable-local-variables :safe) + (enable-local-eval nil)) (hack-local-variables)) ;; FIXME? What we actually want is to ignore dir-locals (?). (setq buffer-read-only nil) ; bug#11118 -- 2.20.1