mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-22 10:26:20 +00:00
Ensure hack-local-variables is run in a fundamental mode buffer.
This fixes bug #23827. * src/buffer.c (set-buffer-major-mode): Run `fundamental-mode' when the buffer gets set to that mode, so that `run-mode-hooks', and thus `hack-local-variables' get run.
This commit is contained in:
parent
974a53bfbe
commit
b120fbd6a4
@ -1984,7 +1984,9 @@ the current buffer's major mode. */)
|
||||
function = BVAR (current_buffer, major_mode);
|
||||
}
|
||||
|
||||
if (NILP (function) || EQ (function, Qfundamental_mode))
|
||||
if (NILP (function)) /* If function is `fundamental-mode', allow it to run
|
||||
so that `run-mode-hooks' and thus
|
||||
`hack-local-variables' get run. */
|
||||
return Qnil;
|
||||
|
||||
count = SPECPDL_INDEX ();
|
||||
|
Loading…
Reference in New Issue
Block a user