Gnus development mailing list
 help / color / mirror / Atom feed
* Proposed code to cleanup gnus on Emacs exit
@ 2011-08-23 17:12 John Wiegley
  2011-09-10 22:20 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 18+ messages in thread
From: John Wiegley @ 2011-08-23 17:12 UTC (permalink / raw)
  To: ding

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




^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2011-10-08  9:59 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-23 17:12 Proposed code to cleanup gnus on Emacs exit John Wiegley
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

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