aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorAlan Mackenzie2016-06-24 16:03:29 +0000
committerAlan Mackenzie2016-06-24 16:03:29 +0000
commitb120fbd6a40de657673bea7c3a630cf514b59310 (patch)
tree05f39dadd395a34e52f2b6a62718771046dae60b /src/buffer.c
parent974a53bfbe5a19326d2473012996ffd81ec91630 (diff)
downloademacs-b120fbd6a40de657673bea7c3a630cf514b59310.tar.gz
emacs-b120fbd6a40de657673bea7c3a630cf514b59310.zip
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.
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/buffer.c b/src/buffer.c
index b4b83043f36..8756cbbbd7d 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1984,7 +1984,9 @@ the current buffer's major mode. */)
1984 function = BVAR (current_buffer, major_mode); 1984 function = BVAR (current_buffer, major_mode);
1985 } 1985 }
1986 1986
1987 if (NILP (function) || EQ (function, Qfundamental_mode)) 1987 if (NILP (function)) /* If function is `fundamental-mode', allow it to run
1988 so that `run-mode-hooks' and thus
1989 `hack-local-variables' get run. */
1988 return Qnil; 1990 return Qnil;
1989 1991
1990 count = SPECPDL_INDEX (); 1992 count = SPECPDL_INDEX ();