Don't suggest to revert buffer from non-existing file
* lisp/files-x.el (modify-file-local-variable-message): Suggest to revert from the buffer's file only if that file exists; otherwise suggest 'normal-mode'. (Bug#64844)
This commit is contained in:
parent
f6e4e77d23
commit
142007b747
1 changed files with 4 additions and 1 deletions
|
@ -136,7 +136,10 @@ Intended to be used in the `interactive' spec of
|
|||
(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]")))))
|
||||
(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]"))))))
|
||||
|
||||
(defun modify-file-local-variable (variable value op &optional interactive)
|
||||
"Modify file-local VARIABLE in Local Variables depending on operation OP.
|
||||
|
|
Loading…
Add table
Reference in a new issue