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: Emanuel Berg
Subject: Re: remember all the little quits before you do the big quit :)
Date: Sun, 26 Aug 2018 23:08:45 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

hw wrote:

> Awesome! What is the minimum Emacs version
> for this to work? I asked for something like
> this a couple years ago and was told
> it's impossible.

Here is some other stuff for you to experiment
with if need be. The `require' below is to get
this, I think

(defun gnus-kill-if-runs ()
  (when (gnus-alive-p) (gnus-group-exit)) )

so here goes

;; This file: http://user.it.uu.se/~embe8573/emacs-init/quit.el

(require 'gnus-my)

(defun mute-kill-warnings ()
  (dolist (p (process-list))
    (set-process-query-on-exit-flag p nil) ))

(defun kill-everything ()
  (gnus-kill-if-runs)
  (mute-kill-warnings) )

(defun shutdown ()
  (interactive)
  (kill-everything)
  (shell-command "shut") )
(defalias 'shut 'shutdown)

(defun emacs-quit-no-confirm ()
  (interactive)
  (kill-everything)
  (save-buffers-kill-terminal t) ) ; silently save ... kill
(defalias 'quit       'emacs-quit-no-confirm)
(defalias 'quit-emacs 'emacs-quit-no-confirm)
(defalias 'emacs-quit 'emacs-quit-no-confirm)

;; (setq kill-emacs-hook nil)
(defun kill-emacs-hook-f ()
  (kill-everything) )
(add-hook 'kill-emacs-hook #'kill-emacs-hook-f)

(provide 'quit)

-- 
underground experts united
http://user.it.uu.se/~embe8573


reply via email to

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