chronometrist-query-stop - use aand

This commit is contained in:
contrapunctus 2020-12-21 04:02:57 +05:30
parent 16de1e0837
commit 2ca6c60bf2
1 changed files with 4 additions and 5 deletions

View File

@ -248,11 +248,10 @@ Argument _FS-EVENT is ignored."
(defun chronometrist-query-stop ()
"Ask the user if they would like to clock out."
(let ((task (chronometrist-backend-current-task chronometrist-backend-current)))
(and task
(yes-or-no-p (format "Stop tracking time for %s? " task))
(chronometrist-out))
t))
(aand (chronometrist-backend-current-task chronometrist-backend-current)
(yes-or-no-p (format "Stop tracking time for %s? " it))
(chronometrist-out))
t)
(defun chronometrist-in (task &optional _prefix)
"Clock in to TASK; record current time in `chronometrist-file'.