Function: modify-file-local-variable-message
modify-file-local-variable-message is a byte-compiled function defined
in files-x.el.gz.
Signature
(modify-file-local-variable-message VARIABLE VALUE OP)
Source Code
;; Defined in /usr/src/emacs/lisp/files-x.el.gz
(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
(if (and (stringp buffer-file-name)
(file-exists-p buffer-file-name))
"For this change to take effect revisit file using \\[revert-buffer]"
"For this change to take effect use \\[normal-mode]"))))))