]> git.eshelyaron.com Git - emacs.git/commit
* lisp/calendar/timeclock.el: Use lexical-binding
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 9 Oct 2018 02:33:22 +0000 (22:33 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 9 Oct 2018 02:33:22 +0000 (22:33 -0400)
commit333f0bfe766185c66952c6fbd4796c6bb97c868d
tree0fc63cae1bac3c940ba388ea73522c96d8093c8c
parentcf1ebfa055fcd0749aa4ed2fc4c399470b9eb3de
* lisp/calendar/timeclock.el: Use lexical-binding

Require cl-lib.  Remove redundant :group args.
(timeclock-status-string): Avoid 'setq'.
(timeclock-ask-for-project, timeclock-ask-for-reason):
Completionu tables can be simple lists of strings.
(timeclock-read-moment): Doesn't deserve to be defsubst (most of the
others don't either, admittedly).
(timeclock-entry): New type.
(timeclock-entry-begin, timeclock-entry-end, timeclock-entry-project)
(timeclock-entry-comment): Define via 'cl-defstruct'.
(timeclock-entry-list-projects, timeclock-day-list-projects):
Avoid add-to-list on lexical vars.
(timeclock-day-list): Use 'push'.
(timeclock-log-data): Use 'pcase'.
(timeclock-mean): Simplify.
(timeclock-generate-report): Use dotimes.
lisp/calendar/timeclock.el