Commit 5c3d0cf7 authored by Lars Ingebrigtsen's avatar Lars Ingebrigtsen

Fix previous message.el point-restoring fix

* lisp/gnus/message.el (message-send-and-exit): Restore window
point before burying buffer so we actually bury the buffer.
parent c97c7bb2
Pipeline #4157 failed with stage
in 66 minutes and 2 seconds
...@@ -4138,17 +4138,16 @@ It should typically alter the sending method in some way or other." ...@@ -4138,17 +4138,16 @@ It should typically alter the sending method in some way or other."
(actions message-exit-actions)) (actions message-exit-actions))
(when (and (message-send arg) (when (and (message-send arg)
(buffer-live-p buf)) (buffer-live-p buf))
(message-bury buf)
(if message-kill-buffer-on-exit (if message-kill-buffer-on-exit
(kill-buffer buf)) (kill-buffer buf)
;; Restore the point in the message buffer.
(save-window-excursion
(switch-to-buffer buf)
(set-window-point nil position)
(set-marker position nil))
(message-bury buf))
(message-do-actions actions) (message-do-actions actions)
t) t)))
;; Restore the point in the message buffer.
(when (buffer-live-p buf)
(save-window-excursion
(switch-to-buffer buf)
(set-window-point nil position)
(set-marker position nil)))))
(defun message-dont-send () (defun message-dont-send ()
"Don't send the message you have been editing. "Don't send the message you have been editing.
......
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