summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2001-11-03 15:48:13 +0000
committerEli Zaretskii <eliz@gnu.org>2001-11-03 15:48:13 +0000
commit00edf69539727c50b8fc8b7e7f360a9b9d69eb61 (patch)
tree410bb0f06ceecf838e0786a31024c07f83df54e6
parentdcef0def586cbc464381f7ef066587f4f4ea1852 (diff)
downloademacs-00edf69539727c50b8fc8b7e7f360a9b9d69eb61.tar.gz
(timeclock-out): Signal an error if timeclock-last-event is nil.
-rw-r--r--lisp/calendar/timeclock.el2
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/calendar/timeclock.el b/lisp/calendar/timeclock.el
index e570f9bf2f7..a7f3c73d32d 100644
--- a/lisp/calendar/timeclock.el
+++ b/lisp/calendar/timeclock.el
@@ -370,6 +370,8 @@ FIND-REASON is non-nil -- or the user calls `timeclock-out'
interactively -- call the function `timeclock-get-reason-function' to
discover the reason."
(interactive "P")
+ (or timeclock-last-event
+ (error "You haven't clocked in!"))
(if (equal (downcase (car timeclock-last-event)) "o")
(error "You've already clocked out!")
(timeclock-log