help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: remember all the little quits before you do the big quit :)


From: Andy Moreton
Subject: Re: remember all the little quits before you do the big quit :)
Date: Thu, 23 Aug 2018 17:28:00 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt)

On Thu 23 Aug 2018, Hikaru Ichijyo wrote:

> It would be nice if Emacs would give options on shutdown to terminate
> Lisp applications in the same fashion it checks for unsaved buffers and
> subordinate Unix processes.  I know there are probably ways people have
> hacked together solutions for this in their ~/.emacs files (and I'd love
> to see them, if anybody wants to post snippets), but it just seems like
> if Emacs is taking the effort to warn me of things I need to take care
> of before shutdown, it shouldn't be forgetting about its own running
> applications just because they're not OS processes.

I have this snippet in .gnus to do that:

  (defun ajm-kill-emacs-exit-gnus ()
    (when (gnus-alive-p)
      (with-current-buffer (get-buffer "*Group*")
        (let ((gnus-expert-user t)
              (gnus-interactive-exit 'quiet))
          (gnus-group-exit)))))
  (add-hook 'kill-emacs-hook #'ajm-kill-emacs-exit-gnus))


HTH,

    AndyM




reply via email to

[Prev in Thread] Current Thread [Next in Thread]