Mercurial > emacs
changeset 6050:afc731c614d3
(kill-emacs-query-functions): New variable.
(save-buffers-kill-emacs): Use it.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 24 Feb 1994 04:00:41 +0000 |
parents | 32df2b4d67cf |
children | 0b144d967f30 |
files | lisp/files.el |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/files.el Thu Feb 24 03:25:46 1994 +0000 +++ b/lisp/files.el Thu Feb 24 04:00:41 1994 +0000 @@ -2000,6 +2000,9 @@ (concat (file-name-as-directory file) ".") file))))))) +(defvar kill-emacs-query-functions nil + "Functions to call with no arguments to query about killing Emacs.") + (defun save-buffers-kill-emacs (&optional arg) "Offer to save each buffer, then kill this Emacs process. With prefix arg, silently save all file-visiting buffers, then kill." @@ -2023,6 +2026,13 @@ (setq processes (cdr processes))) (or (not active) (yes-or-no-p "Active processes exist; kill them and exit anyway? ")))) + ;; Query the user for other things, perhaps. + (let ((functions kill-emacs-query-functions) + (yes t)) + (while (and functions yes) + (setq yes (and yes (funcall (car functions)))) + (setq functions (cdr functions))) + yes) (kill-emacs))) (define-key ctl-x-map "\C-f" 'find-file)