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

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

bug#15965: 24.3.50; [PATCH] eww: ask confirmation before quitting


From: Kenjiro NAKAYAMA
Subject: bug#15965: 24.3.50; [PATCH] eww: ask confirmation before quitting
Date: Sun, 24 Nov 2013 23:12:47 +0900
User-agent: mu4e 0.9.9.6pre2; emacs 24.3.50.2

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

Signed-off-by: Kenjiro NAKAYAMA <knakayam@redhat.com>

        * 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





reply via email to

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