diff options
author | Eli Zaretskii <eliz@gnu.org> | 2023-03-04 12:16:51 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2023-03-04 12:16:51 +0200 |
commit | ea5fd375bb2656562f57325b3d5c6fd17f6b2e72 (patch) | |
tree | 0187968b52903fc0b1a952489ce7251fa168f445 /doc/emacs/modes.texi | |
parent | 4c16fd3a51286e1b1685bfb28e0cd6ae2358c37d (diff) | |
download | emacs-ea5fd375bb2656562f57325b3d5c6fd17f6b2e72.tar.gz |
Fix documentation of 'normal-mode' in buffers that don't visit files
* lisp/files.el (normal-mode):
* lisp/subr.el (run-mode-hooks):
* doc/emacs/modes.texi (Choosing Modes): Mention the caveat with
'normal-mode' in buffers not visiting files. (Bug#61925)
* lisp/files.el (hack-local-variables): Doc fix.
Diffstat (limited to 'doc/emacs/modes.texi')
-rw-r--r-- | doc/emacs/modes.texi | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/doc/emacs/modes.texi b/doc/emacs/modes.texi index 0e4b15fb514..d2f96af0b55 100644 --- a/doc/emacs/modes.texi +++ b/doc/emacs/modes.texi @@ -473,9 +473,12 @@ specify which mode you prefer. If you have changed the major mode of a buffer, you can return to the major mode Emacs would have chosen automatically, by typing @kbd{M-x normal-mode}. This is the same function that -@code{find-file} calls to choose the major mode. It also processes -the file's @samp{-*-} line or local variables list (if any). -@xref{File Variables}. +@code{find-file} calls to choose the major mode. If the buffer is +visiting a file, this command also processes the file's @samp{-*-} +line and file-local variables list (if any). @xref{File Variables}. +If the buffer doesn't visit a file, the command processes only the +major mode specification, if any, in the @samp{-*-} line and in the +file-local variables list. @vindex change-major-mode-with-file-name The commands @kbd{C-x C-w} and @code{set-visited-file-name} change to |