1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

(timeclock-out): Signal an error if timeclock-last-event is nil.

This commit is contained in:
Eli Zaretskii 2001-11-03 15:50:05 +00:00
parent b2e92d3ea4
commit 9ca8a5a0ed
2 changed files with 7 additions and 0 deletions

View 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)

View 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