Subject: Re: bug#9820: 24.0.90; Behaviour of add-file-local-variable

From: Stefan Monnier <[email-masked]>
Date: Fri, 21 Oct 2011 13:39:51 -0400

> === modified file 'lisp/files-x.el'
> --- lisp/files-x.el	2011-04-19 13:44:55 +0000
> +++ lisp/files-x.el	2011-10-21 14:04:22 +0000
> @@ -214,7 +214,11 @@ (defun add-file-local-variable (variable
>    (interactive
>     (let ((variable (read-file-local-variable "Add file-local variable")))
>       (list variable (read-file-local-variable-value variable))))
> -  (modify-file-local-variable variable value 'add-or-replace))
> +  (modify-file-local-variable variable value 'add-or-replace)
> +  (when (and (called-interactively-p 'interactive)
> +	     (symbolp variable) (boundp variable)
> +	     (not (equal (symbol-value variable) value)))
> +    (message "Revisit file to make this change take effect")))

Please pass use an optional `interactive' arg instead
of called-interactively-p.
You might even want to pass that arg down to modify-file-local-variable
so as to avoid duplicating the test and message.

        Stefan