]> git.eshelyaron.com Git - emacs.git/commitdiff
(timeclock-out): Signal an error if timeclock-last-event is nil.
authorEli Zaretskii <eliz@gnu.org>
Sat, 3 Nov 2001 15:50:05 +0000 (15:50 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sat, 3 Nov 2001 15:50:05 +0000 (15:50 +0000)
lisp/ChangeLog
lisp/calendar/timeclock.el

index 8fe3b20fae86c6320011781b4fbd4125d165455d..b8f44cf28bdc1fbe53809572e7153de467d2255c 100644 (file)
@@ -1,3 +1,8 @@
+2001-11-03  Eli Zaretskii  <eliz@is.elta.co.il>
+
+       * calendar/timeclock.el (timeclock-out): Signal an error if
+       timeclock-last-event is nil.
+
 2001-11-02  Stefan Monnier  <monnier@cs.yale.edu>
 
        * international/mule-diag.el (list-character-sets)
index e570f9bf2f77a4285ae946e2e4598c56aeb7a27f..a7f3c73d32d8ad46962a24fb7b86037a30951bd6 100644 (file)
@@ -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