From: John Wiegley <jwiegley@gmail.com>
To: ding@gnus.org
Subject: Proposed code to cleanup gnus on Emacs exit
Date: Tue, 23 Aug 2011 12:12:52 -0500 [thread overview]
Message-ID: <m24o18vyp7.fsf@gmail.com> (raw)
I'm a bit surprised Gnus doesn't do this already: This code will make sure
that when you exit Emacs, and Gnus is running, that everything gets cleaned up
as it should:
--8<---------------cut here---------------start------------->8---
;;; Cleanup all Gnus buffers on exit
(defun exit-gnus-on-exit ()
(if (and (fboundp 'gnus-group-exit)
(gnus-alive-p))
(with-current-buffer (get-buffer "*Group*")
(let (gnus-interactive-exit)
(gnus-group-exit)))))
(add-hook 'kill-emacs-hook 'exit-gnus-on-exit)
--8<---------------cut here---------------end--------------->8---
John
next reply other threads:[~2011-08-23 17:12 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-23 17:12 John Wiegley [this message]
2011-09-10 22:20 ` Lars Magne Ingebrigtsen
2011-09-11 0:42 ` John Wiegley
2011-09-11 1:09 ` Richard Riley
2011-09-29 8:32 ` Ted Zlatanov
2011-09-29 21:55 ` John Wiegley
2011-10-06 21:23 ` Lars Magne Ingebrigtsen
2011-10-06 22:26 ` Dave Abrahams
2011-10-06 22:33 ` Lars Magne Ingebrigtsen
2011-10-06 23:54 ` John Wiegley
2011-10-07 3:00 ` Dave Abrahams
2011-10-07 19:48 ` Dan Christensen
2011-10-07 20:22 ` Dave Abrahams
2011-10-08 6:14 ` Steinar Bang
2011-10-07 20:48 ` Michael Cook
2011-10-07 23:19 ` Richard Riley
2011-10-07 1:10 ` Dan Christensen
2011-10-08 9:59 ` Reiner Steib
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m24o18vyp7.fsf@gmail.com \
--to=jwiegley@gmail.com \
--cc=ding@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).