+(defun modify-file-local-variable-message (variable value op)
+ (let* ((not-value (make-symbol ""))
+ (old-value (cond ((eq variable 'mode)
+ major-mode)
+ ((eq variable 'coding)
+ buffer-file-coding-system)
+ (t (if (and (symbolp variable)
+ (boundp variable))
+ (symbol-value variable)
+ not-value))))
+ (new-value (if (eq op 'delete)
+ (cond ((eq variable 'mode)
+ (default-value 'major-mode))
+ ((eq variable 'coding)
+ (default-value 'buffer-file-coding-system))
+ (t (if (and (symbolp variable)
+ (default-boundp variable))
+ (default-value variable)
+ not-value)))
+ (cond ((eq variable 'mode)
+ (let ((string (format "%S" value)))
+ (if (string-match-p "-mode\\'" string)
+ value
+ (intern (concat string "-mode")))))
+ (t value)))))
+ (when (or (eq old-value not-value)
+ (eq new-value not-value)
+ (not (equal old-value new-value)))
+ (message "%s" (substitute-command-keys
+ "For this change to take effect revisit file using \\[revert-buffer]")))))
+
+(defun modify-file-local-variable (variable value op &optional interactive)