emacs-diffs
[Top][All Lists]
Advanced

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

master 6f57cb6d81: Fix point adjustment in recreated *Messages* buffers


From: Eli Zaretskii
Subject: master 6f57cb6d81: Fix point adjustment in recreated *Messages* buffers
Date: Mon, 29 Aug 2022 09:52:58 -0400 (EDT)

branch: master
commit 6f57cb6d8141e35fee39ea31f08d4ce5cf6c51e5
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    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 daacf697ff..2512397b24 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 b0fbf7a34c..50a8f491d8 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 "~/")))))



reply via email to

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