emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master b120fbd: Ensure hack-local-variables is run in a fu


From: Alan Mackenzie
Subject: [Emacs-diffs] master b120fbd: Ensure hack-local-variables is run in a fundamental mode buffer.
Date: Fri, 24 Jun 2016 16:04:52 +0000 (UTC)

branch: master
commit b120fbd6a40de657673bea7c3a630cf514b59310
Author: Alan Mackenzie <address@hidden>
Commit: Alan Mackenzie <address@hidden>

    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.
---
 src/buffer.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/buffer.c b/src/buffer.c
index b4b8304..8756cbb 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -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 ();



reply via email to

[Prev in Thread] Current Thread [Next in Thread]