Commit b120fbd6 authored by Alan Mackenzie's avatar Alan Mackenzie
Browse files

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.
parent 974a53bf
......@@ -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 ();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment