diff options
Diffstat (limited to 'gnus.org')
-rw-r--r-- | gnus.org | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -12,6 +12,28 @@ (defvar jao-gnus-use-nnml nil) (defvar jao-gnus-use-maildirs nil) #+end_src +* Startup and kill + #+begin_src emacs-lisp + ;;;;; close gnus when closing emacs, but ask when exiting + (setq gnus-interactive-exit t) + + (defun jao-gnus-started-hook () + (add-hook 'before-kill-emacs-hook 'gnus-group-exit)) + + (add-hook 'gnus-started-hook 'jao-gnus-started-hook) + + (defun jao-gnus-after-exiting-hook () + (remove-hook 'before-kill-emacs-hook 'gnus-group-exit)) + + (add-hook 'gnus-after-exiting-gnus-hook 'jao-gnus-after-exiting-hook) + + ;; define a wrapper around the save-buffers-kill-emacs + ;; to run the new hook before: + (defadvice save-buffers-kill-emacs + (before my-save-buffers-kill-emacs activate) + "Install hook when emacs exits before emacs asks to save this and that." + (run-hooks 'before-kill-emacs-hook)) + #+end_src * Looks *** Verbosity #+begin_src emacs-lisp |