aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorChong Yidong2012-08-11 10:13:55 +0800
committerChong Yidong2012-08-11 10:13:55 +0800
commit5725bd2cc0e691dadc31bd958f210b1bbcf17c49 (patch)
treea8faec22f21eff83d918076adcc9c8c49c4cc820 /lisp
parent5723992258a8025e29ba9fcae923182fb5456426 (diff)
parent711f4590cddbc83c509c1c5e852ef4e528a39780 (diff)
downloademacs-5725bd2cc0e691dadc31bd958f210b1bbcf17c49.tar.gz
emacs-5725bd2cc0e691dadc31bd958f210b1bbcf17c49.zip
Merge from emacs-24; up to 2012-05-02T11:38:01Z!lekktu@gmail.com
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog15
-rw-r--r--lisp/emacs-lisp/autoload.el6
-rw-r--r--lisp/emacs-lisp/copyright.el9
-rw-r--r--lisp/files.el15
-rw-r--r--lisp/tutorial.el6
5 files changed, 38 insertions, 13 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c2e45204026..dc921213b42 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,18 @@
12012-08-10 Glenn Morris <rgm@gnu.org>
2
3 * emacs-lisp/copyright.el (copyright-update-directory): Logic fix.
4
5 * tutorial.el (help-with-tutorial):
6 * emacs-lisp/copyright.el (copyright-update-directory):
7 * emacs-lisp/autoload.el (autoload-find-generated-file)
8 (autoload-find-file): Disable local eval: (for insurance).
9
102012-08-07 Glenn Morris <rgm@gnu.org>
11
12 * files.el (hack-local-variables-filter): If an eval: form is not
13 known to be safe, and enable-local-variables is :safe, then ignore
14 the form totally, as is done for non-eval forms. (Bug#12155)
15
12012-08-10 Stefan Monnier <monnier@iro.umontreal.ca> 162012-08-10 Stefan Monnier <monnier@iro.umontreal.ca>
2 17
3 * emacs-lisp/rx.el (rx-constituents): Don't define as constant. 18 * emacs-lisp/rx.el (rx-constituents): Don't define as constant.
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el
index 3fc185dda25..e6e2d1e60e0 100644
--- a/lisp/emacs-lisp/autoload.el
+++ b/lisp/emacs-lisp/autoload.el
@@ -228,7 +228,8 @@ expression, in which case we want to handle forms differently."
228(defun autoload-find-generated-file () 228(defun autoload-find-generated-file ()
229 "Visit the autoload file for the current buffer, and return its buffer. 229 "Visit the autoload file for the current buffer, and return its buffer.
230If a buffer is visiting the desired autoload file, return it." 230If a buffer is visiting the desired autoload file, return it."
231 (let ((enable-local-variables :safe)) 231 (let ((enable-local-variables :safe)
232 (enable-local-eval nil))
232 ;; We used to use `raw-text' to read this file, but this causes 233 ;; We used to use `raw-text' to read this file, but this causes
233 ;; problems when the file contains non-ASCII characters. 234 ;; problems when the file contains non-ASCII characters.
234 (find-file-noselect 235 (find-file-noselect
@@ -382,7 +383,8 @@ which lists the file name and which functions are in it, etc."
382 (emacs-lisp-mode) 383 (emacs-lisp-mode)
383 (setq default-directory (file-name-directory file)) 384 (setq default-directory (file-name-directory file))
384 (insert-file-contents file nil) 385 (insert-file-contents file nil)
385 (let ((enable-local-variables :safe)) 386 (let ((enable-local-variables :safe)
387 (enable-local-eval nil))
386 (hack-local-variables)) 388 (hack-local-variables))
387 (current-buffer))) 389 (current-buffer)))
388 390
diff --git a/lisp/emacs-lisp/copyright.el b/lisp/emacs-lisp/copyright.el
index 8e96d95c5dd..c3616c6e490 100644
--- a/lisp/emacs-lisp/copyright.el
+++ b/lisp/emacs-lisp/copyright.el
@@ -362,10 +362,11 @@ If FIX is non-nil, run `copyright-fix-years' instead."
362 (dolist (file (directory-files directory t match nil)) 362 (dolist (file (directory-files directory t match nil))
363 (unless (file-directory-p file) 363 (unless (file-directory-p file)
364 (message "Updating file `%s'" file) 364 (message "Updating file `%s'" file)
365 (find-file file) 365 ;; FIXME we should not use find-file+save+kill.
366 (let ((inhibit-read-only t) 366 (let ((enable-local-variables :safe)
367 (enable-local-variables :safe) 367 (enable-local-eval nil))
368 copyright-query) 368 (find-file file))
369 (let ((inhibit-read-only t))
369 (if fix 370 (if fix
370 (copyright-fix-years) 371 (copyright-fix-years)
371 (copyright-update))) 372 (copyright-update)))
diff --git a/lisp/files.el b/lisp/files.el
index c5651135dc1..a7c9a7f7db4 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -3102,11 +3102,16 @@ DIR-NAME is the name of the associated directory. Otherwise it is nil."
3102 ;; Obey `enable-local-eval'. 3102 ;; Obey `enable-local-eval'.
3103 ((eq var 'eval) 3103 ((eq var 'eval)
3104 (when enable-local-eval 3104 (when enable-local-eval
3105 (push elt all-vars) 3105 (let ((safe (or (hack-one-local-variable-eval-safep
3106 (or (eq enable-local-eval t) 3106 (eval (quote val)))
3107 (hack-one-local-variable-eval-safep (eval (quote val))) 3107 ;; In case previously marked safe (bug#5636).
3108 (safe-local-variable-p var val) 3108 (safe-local-variable-p var val))))
3109 (push elt unsafe-vars)))) 3109 ;; If not safe and e-l-v = :safe, ignore totally.
3110 (when (or safe (not (eq enable-local-variables :safe)))
3111 (push elt all-vars)
3112 (or (eq enable-local-eval t)
3113 safe
3114 (push elt unsafe-vars))))))
3110 ;; Ignore duplicates (except `mode') in the present list. 3115 ;; Ignore duplicates (except `mode') in the present list.
3111 ((and (assq var all-vars) (not (eq var 'mode))) nil) 3116 ((and (assq var all-vars) (not (eq var 'mode))) nil)
3112 ;; Accept known-safe variables. 3117 ;; Accept known-safe variables.
diff --git a/lisp/tutorial.el b/lisp/tutorial.el
index e0e2a82fab9..64879e5cfd5 100644
--- a/lisp/tutorial.el
+++ b/lisp/tutorial.el
@@ -829,7 +829,8 @@ Run the Viper tutorial? "))
829 (if old-tut-file 829 (if old-tut-file
830 (progn 830 (progn
831 (insert-file-contents (tutorial--saved-file)) 831 (insert-file-contents (tutorial--saved-file))
832 (let ((enable-local-variables :safe)) 832 (let ((enable-local-variables :safe)
833 (enable-local-eval nil))
833 (hack-local-variables)) 834 (hack-local-variables))
834 ;; FIXME? What we actually want is to ignore dir-locals (?). 835 ;; FIXME? What we actually want is to ignore dir-locals (?).
835 (setq buffer-read-only nil) ; bug#11118 836 (setq buffer-read-only nil) ; bug#11118
@@ -848,7 +849,8 @@ Run the Viper tutorial? "))
848 (goto-char tutorial--point-before-chkeys) 849 (goto-char tutorial--point-before-chkeys)
849 (setq tutorial--point-before-chkeys (point-marker))) 850 (setq tutorial--point-before-chkeys (point-marker)))
850 (insert-file-contents (expand-file-name filename tutorial-directory)) 851 (insert-file-contents (expand-file-name filename tutorial-directory))
851 (let ((enable-local-variables :safe)) 852 (let ((enable-local-variables :safe)
853 (enable-local-eval nil))
852 (hack-local-variables)) 854 (hack-local-variables))
853 ;; FIXME? What we actually want is to ignore dir-locals (?). 855 ;; FIXME? What we actually want is to ignore dir-locals (?).
854 (setq buffer-read-only nil) ; bug#11118 856 (setq buffer-read-only nil) ; bug#11118