From 4b35dd653d35ba95c4d304bee69b69d41301ec3b Mon Sep 17 00:00:00 2001 From: Katsumi Yamaoka Date: Thu, 11 May 2017 05:49:45 +0000 Subject: [PATCH] Kill modified buffers silently when quitting (bug#26862) * lisp/gnus/gnus-start.el (gnus-clear-system): Run do-auto-save to make sure that latest drafts are saved, and kill modified buffers silently. --- lisp/gnus/gnus-start.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index 90f3cb48c27..aaa8ab9a888 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el @@ -731,7 +731,13 @@ the first newsgroup." (kill-buffer (get-file-buffer (gnus-newsgroup-kill-file nil)))) (gnus-kill-buffer nntp-server-buffer) ;; Kill Gnus buffers. + (do-auto-save t) (dolist (buffer (gnus-buffers)) + (when (gnus-buffer-exists-p buffer) + (with-current-buffer buffer + (set-buffer-modified-p nil) + (when (local-variable-p 'kill-buffer-hook) + (setq kill-buffer-hook nil)))) (gnus-kill-buffer buffer)) ;; Remove Gnus frames. (gnus-kill-gnus-frames)) -- 2.39.2