From: Chong Yidong Date: Sat, 9 Jan 2010 20:53:55 +0000 (-0500) Subject: Fix compile-command's safe-local-variable condition. X-Git-Tag: emacs-pretest-23.1.92~65 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fa7b5f7b98eed1babf0820f08400a04c4c461517;p=emacs.git Fix compile-command's safe-local-variable condition. * progmodes/compile.el: Don't treat compile-command as safe if compilation-read-command might be nil (Bug#4218). --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 70874a9c2fb..22f561f8ef8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-01-09 Chong Yidong + + * progmodes/compile.el: Don't treat compile-command as safe if + compilation-read-command might be nil (Bug#4218). + 2010-01-09 Jan Djärv * startup.el (command-line-1): Use orig-argi to check for ignored X and diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index cb2b8986f22..6b2b30edb96 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -603,7 +603,7 @@ You might also use mode hooks to specify it in certain modes, like this: (file-name-sans-extension buffer-file-name))))))" :type 'string :group 'compilation) -;;;###autoload(put 'compile-command 'safe-local-variable 'stringp) +;;;###autoload(put 'compile-command 'safe-local-variable (lambda (a) (and (stringp a) (or (not (boundp 'compilation-read-command)) compilation-read-command)))) ;;;###autoload (defcustom compilation-disable-input nil