1
0
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:
Alan Mackenzie 2016-06-24 16:03:29 +00:00
parent 974a53bfbe
commit b120fbd6a4

View File

@ -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 ();