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

From: Stefan Monnier <[email-masked]>
Date: Sat, 15 Jun 2013 20:50:15 -0400

> -	  (insert (format "%s%S: %S%s\n" prefix variable value suffix)))))))
> +	  (insert (format "%s%S: %S%s\n" prefix variable value suffix)))
> +
> +	(when (and interactive
> +		   (not (and (symbolp variable)
> +			     (boundp variable)
> +			     (equal (symbol-value variable) value))))
> +	  (message "%s" (substitute-command-keys
> +			 "For this change to take effect revisit file using \\[revert-buffer]"))))))))

Looks good, thanks.

> -	  (unless (eq (char-after) ?\s) (insert " "))))))))
> +	  (unless (eq (char-after) ?\s) (insert " "))))))
> +
> +    (when (and interactive
> +	       (not (and (symbolp variable)
> +			 (boundp variable)
> +			 (equal (symbol-value variable) value))))
> +      (message "%s" (substitute-command-keys
> +		     "For this change to take effect revisit file using \\[revert-buffer]")))))

But please eliminate this code duplication.

        Stefan