Subject: 24.3.50; [PATCH] eww: ask confirmation before quitting
From: Kenjiro NAKAYAMA <[email-masked]>
To: [email-masked]
Date: Sun, 24 Nov 2013 23:12:47 +0900
List-Id: <debbugs-submit.debbugs.gnu.org>

eww should ask "yes or no" before quitting, since only "q" key to quit is
easy to mistake.

Signed-off-by: Kenjiro NAKAYAMA <[email-masked]>

        * net/eww.el (eww-quit): ask confirmation before quitting eww

---
 lisp/net/eww.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 86e0977..265f6c8 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -403,8 +403,10 @@ word(s) will be searched for via `eww-search-prefix'."
 (defun eww-quit ()
   "Exit the Emacs Web Wowser."
   (interactive)
-  (setq eww-history nil)
-  (kill-buffer (current-buffer)))
+  (if (y-or-n-p "quit eww? ")
+      (progn
+       (setq eww-history nil)
+       (kill-buffer (current-buffer)))))

 (defun eww-back-url ()
   "Go to the previously displayed page."
-- 
1.8.3.1