aboutsummaryrefslogtreecommitdiffhomepage
path: root/emacs
diff options
context:
space:
mode:
authorGravatar Servilio Afre Puentes <servilio@gmail.com>2013-06-07 16:55:57 -0400
committerGravatar David Bremner <bremner@debian.org>2013-06-08 20:37:35 -0300
commit486340e28ea9d0ac3ed3e7dc463a67ddb2d7d061 (patch)
tree96e026725cb17504bc1f40ac42af08d8787d6275 /emacs
parente2f30a2b32392cb8ca50d9eb1bbaa13abe74253d (diff)
emacs: hello: ask confirmation for clearing recent searches
The button to clear the recent searches in notmuch-hello is easy to press accidentally while moving around the, clearing potentially useful searches with no way of recovering them.
Diffstat (limited to 'emacs')
-rw-r--r--emacs/notmuch-hello.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index c1c6f4b4..1ad1beaf 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -599,8 +599,9 @@ Complete list of currently available key bindings:
(widget-insert "Recent searches: ")
(widget-create 'push-button
:notify (lambda (&rest ignore)
- (setq notmuch-search-history nil)
- (notmuch-hello-update))
+ (when (y-or-n-p "Are you sure you want to clear the searches? ")
+ (setq notmuch-search-history nil)
+ (notmuch-hello-update)))
"clear")
(widget-insert "\n\n")
(let ((start (point)))