Next: New Major Mode, Up: File Modes [Index]
If you have changed the major mode of a buffer, you can return to the major
mode Emacs would have chosen automatically, by typing ‘M-x normal-mode’. This
is the same function that find-file
calls to choose the major mode. It also
processes the file’s ‘-*-’ line or local variables list (if any).
normal-mode
CommandChoose the major mode for this buffer automatically. Also sets up any specified local variables of the file or its directory. Uses the visited file name, the ‘-*-’ line, and the local variables spec.
The command ‘M-x normal-mode’, when used interactively, always obeys file
local variable specifications and the ‘-*-’ line, and ignores the variable
enable-local-variable
.
enable-local-variables
is ignored if you run normal-mode
interactively,
from Lisp without specifying the optional argument ‘FIND-FILE’.
enable-local-variables
VariableControl use of local variables in files you visit. The value can be
(default) A value of t means file local variables specifications are obeyed if all the specified variable values are safe; if any values are not safe, Emacs queries you, once, whether to set them all.
means always ignore the file local variables.
means set the safe variables, and ignore the rest.
means set all variables, whether safe or not.
Any other value means always query you once whether to set them all.
This variable also controls use of major modes specified in a ‘-*-’ line.
Next: New Major Mode, Up: File Modes [Index]