From 6f57cb6d8141e35fee39ea31f08d4ce5cf6c51e5 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 29 Aug 2022 16:52:07 +0300 Subject: [PATCH] Fix point adjustment in recreated *Messages* buffers * lisp/startup.el (normal-top-level): Move setting of 'window-point-insertion-type' from here... * lisp/simple.el (messages-buffer-mode): ...to here. This is so any *Messages* buffers we create instead of the original one, if it's killed, will have the same type of the window-point marker. (Bug#57466) --- lisp/simple.el | 4 +++- lisp/startup.el | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index daacf697ff3..2512397b240 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -10431,7 +10431,9 @@ and setting it to nil." map)) (define-derived-mode messages-buffer-mode special-mode "Messages" - "Major mode used in the \"*Messages*\" buffer.") + "Major mode used in the \"*Messages*\" buffer." + ;; Make it easy to do like "tail -f". + (setq-local window-point-insertion-type t)) (defun messages-buffer () "Return the \"*Messages*\" buffer. diff --git a/lisp/startup.el b/lisp/startup.el index b0fbf7a34cd..50a8f491d8e 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -718,8 +718,6 @@ It is the default value of the variable `top-level'." (let ((dir default-directory)) (with-current-buffer "*Messages*" (messages-buffer-mode) - ;; Make it easy to do like "tail -f". - (setq-local window-point-insertion-type t) ;; Give *Messages* the same default-directory as *scratch*, ;; just to keep things predictable. (setq default-directory (or dir (expand-file-name "~/"))))) -- 2.39.2