From 3de77fb049a8ae6874fb8e00516f3270b27f0576 Mon Sep 17 00:00:00 2001 From: Patrick Winter Date: Tue, 9 Apr 2019 13:42:53 +0200 Subject: [PATCH] Replace read-from-minibuffer with yes-or-no-p No reason to reinvent the wheel. --- taskwarrior.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/taskwarrior.el b/taskwarrior.el index a29d044..94b8812 100644 --- a/taskwarrior.el +++ b/taskwarrior.el @@ -165,8 +165,8 @@ "Mark current task as done." (interactive) (let ((id (taskwarrior-id-at-point)) - (confirmation (read-from-minibuffer "Done [y/n]?: "))) - (when (string= confirmation "y") + (confirmation (yes-or-no-p "Done?"))) + (when confirmation (taskwarrior--shell-command "done" id) (taskwarrior-update-buffer)))) @@ -174,8 +174,8 @@ "Delete current task." (interactive) (let ((id (taskwarrior-id-at-point)) - (confirmation (read-from-minibuffer "Delete [y/n]?: "))) - (when (string= confirmation "y") + (confirmation (yes-or-no-p "Delete?"))) + (when confirmation (taskwarrior--shell-command "delete" id "" "" "yes") (taskwarrior-update-buffer))))