# HG changeset patch # User Chong Yidong # Date 1263070435 18000 # Node ID e96c7312f94c7259664415ddd70bda449e109c9b # Parent 7a2c06c2f19c8c6d7a048708e5d0574c2c1af21d 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 -r 7a2c06c2f19c -r e96c7312f94c lisp/ChangeLog --- a/lisp/ChangeLog Sat Jan 09 15:31:26 2010 -0500 +++ b/lisp/ChangeLog Sat Jan 09 15:53:55 2010 -0500 @@ -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 -r 7a2c06c2f19c -r e96c7312f94c lisp/progmodes/compile.el --- a/lisp/progmodes/compile.el Sat Jan 09 15:31:26 2010 -0500 +++ b/lisp/progmodes/compile.el Sat Jan 09 15:53:55 2010 -0500 @@ -603,7 +603,7 @@ (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