From: Eli Zaretskii Date: Sat, 3 Nov 2001 15:50:05 +0000 (+0000) Subject: (timeclock-out): Signal an error if timeclock-last-event is nil. X-Git-Tag: ttn-vms-21-2-B4~18865 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9ca8a5a0ed3c42ef75d1fca3e457a78edbca1fe6;p=emacs.git (timeclock-out): Signal an error if timeclock-last-event is nil. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8fe3b20fae8..b8f44cf28bd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2001-11-03 Eli Zaretskii + + * calendar/timeclock.el (timeclock-out): Signal an error if + timeclock-last-event is nil. + 2001-11-02 Stefan Monnier * international/mule-diag.el (list-character-sets) 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