# HG changeset patch # User Eli Zaretskii # Date 1004802493 0 # Node ID 526c9b7941f5d0b8d447817ca3b11072536c97f1 # Parent 8cb4d744ae0d52aa9cc66c042da7e15d44ca1d79 (timeclock-out): Signal an error if timeclock-last-event is nil. diff -r 8cb4d744ae0d -r 526c9b7941f5 lisp/calendar/timeclock.el --- a/lisp/calendar/timeclock.el Sat Nov 03 15:08:36 2001 +0000 +++ b/lisp/calendar/timeclock.el Sat Nov 03 15:48:13 2001 +0000 @@ -370,6 +370,8 @@ 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