1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-15 17:00:26 +00:00

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.
This commit is contained in:
Katsumi Yamaoka 2017-05-11 05:49:45 +00:00
parent 7df0777945
commit 4b35dd653d

View File

@ -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))