From 8c2bf7c691a4dc155ddd0dced91286a4cbe7e87d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 13 Dec 2015 06:28:38 -0500 Subject: [PATCH] Don't y/n on quit if there are no buffers open --- core/core.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/core.el b/core/core.el index 6bbb7d858..cd67c7273 100644 --- a/core/core.el +++ b/core/core.el @@ -15,7 +15,10 @@ (when window-system (setq confirm-kill-emacs - (lambda (_) (y-or-n-p ">> Gee, I dunno Brain... Are you sure?")))) + (lambda (_) + (if (narf/get-real-buffers) + (y-or-n-p ">> Gee, I dunno Brain... Are you sure?") + t)))) (setq-default ad-redefinition-action 'accept ; silence the advised function warnings