diff options
| author | Glenn Morris | 2003-07-11 13:15:05 +0000 |
|---|---|---|
| committer | Glenn Morris | 2003-07-11 13:15:05 +0000 |
| commit | 145570df042cad0c95dc18fb50288b979dfad8d2 (patch) | |
| tree | 87d25171ef2cf9806d09357e309d5d8ae6655b9e | |
| parent | a272755fb8ab3765505a5df19d0498433e75d343 (diff) | |
| download | emacs-145570df042cad0c95dc18fb50288b979dfad8d2.tar.gz emacs-145570df042cad0c95dc18fb50288b979dfad8d2.zip | |
Minor commentary changes.
(timeclock-relative, timeclock-ask-before-exiting)
(timeclock-use-display-time): Doc changes.
(timeclock-modeline-display): Give a message if
`timeclock-use-display-time' is non-nil but `display-time-mode' is not
active.
| -rw-r--r-- | lisp/calendar/timeclock.el | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/lisp/calendar/timeclock.el b/lisp/calendar/timeclock.el index c2682b8449a..f4b68764d0d 100644 --- a/lisp/calendar/timeclock.el +++ b/lisp/calendar/timeclock.el | |||
| @@ -33,11 +33,11 @@ | |||
| 33 | ;; Use `timeclock-in' when you start on a project, and `timeclock-out' | 33 | ;; Use `timeclock-in' when you start on a project, and `timeclock-out' |
| 34 | ;; when you're done. Once you've collected some data, you can use | 34 | ;; when you're done. Once you've collected some data, you can use |
| 35 | ;; `timeclock-workday-remaining' to see how much time is left to be | 35 | ;; `timeclock-workday-remaining' to see how much time is left to be |
| 36 | ;; worked today (assuming a typical average of 8 hours a day), and | 36 | ;; worked today (where `timeclock-workday' specifies the length of the |
| 37 | ;; `timeclock-when-to-leave' which will calculate when you're free. | 37 | ;; working day), and `timeclock-when-to-leave' to calculate when you're free. |
| 38 | 38 | ||
| 39 | ;; You'll probably want to bind the timeclock commands to some handy | 39 | ;; You'll probably want to bind the timeclock commands to some handy |
| 40 | ;; keystrokes. At the moment, C-x t is unused in Emacs 20: | 40 | ;; keystrokes. At the moment, C-x t is unused: |
| 41 | ;; | 41 | ;; |
| 42 | ;; (require 'timeclock) | 42 | ;; (require 'timeclock) |
| 43 | ;; | 43 | ;; |
| @@ -99,8 +99,8 @@ For example, if the length of a normal workday is eight hours, and you | |||
| 99 | work four hours on Monday, then the amount of time \"remaining\" on | 99 | work four hours on Monday, then the amount of time \"remaining\" on |
| 100 | Tuesday is twelve hours -- relative to an averaged work period of | 100 | Tuesday is twelve hours -- relative to an averaged work period of |
| 101 | eight hours -- or eight hours, non-relative. So relative time takes | 101 | eight hours -- or eight hours, non-relative. So relative time takes |
| 102 | into account any discrepancy of time under-worked or overworked on | 102 | into account any discrepancy of time under-worked or over-worked on |
| 103 | previous days." | 103 | previous days. This only affects the timeclock modeline display." |
| 104 | :type 'boolean | 104 | :type 'boolean |
| 105 | :group 'timeclock) | 105 | :group 'timeclock) |
| 106 | 106 | ||
| @@ -132,7 +132,8 @@ that day has a different length from the norm." | |||
| 132 | :group 'timeclock) | 132 | :group 'timeclock) |
| 133 | 133 | ||
| 134 | (defcustom timeclock-ask-before-exiting t | 134 | (defcustom timeclock-ask-before-exiting t |
| 135 | "*If non-nil, ask if the user wants to clock out before exiting Emacs." | 135 | "*If non-nil, ask if the user wants to clock out before exiting Emacs. |
| 136 | This variable only has an effect if set with \\[customize]." | ||
| 136 | :set (lambda (symbol value) | 137 | :set (lambda (symbol value) |
| 137 | (if value | 138 | (if value |
| 138 | (add-hook 'kill-emacs-query-functions 'timeclock-query-out) | 139 | (add-hook 'kill-emacs-query-functions 'timeclock-query-out) |
| @@ -154,9 +155,10 @@ The advantage to this is that it means one less timer has to be set | |||
| 154 | running amok in Emacs' process space. The disadvantage is that it | 155 | running amok in Emacs' process space. The disadvantage is that it |
| 155 | requires you to have `display-time' running. If you don't want to use | 156 | requires you to have `display-time' running. If you don't want to use |
| 156 | `display-time', but still want the modeline to show how much time is | 157 | `display-time', but still want the modeline to show how much time is |
| 157 | left, set this variable to nil. You will need to restart Emacs (or | 158 | left, set this variable to nil. Changing the value of this variable |
| 158 | toggle the function `timeclock-modeline-display') for the change to | 159 | while timeclock information is being displayed in the modeline has no |
| 159 | take effect." | 160 | effect. You should call the function `timeclock-modeline-display' with |
| 161 | a positive argument to force an update." | ||
| 160 | :set (lambda (symbol value) | 162 | :set (lambda (symbol value) |
| 161 | (let ((currently-displaying | 163 | (let ((currently-displaying |
| 162 | (and (boundp 'timeclock-modeline-display) | 164 | (and (boundp 'timeclock-modeline-display) |
| @@ -248,7 +250,7 @@ each day.") | |||
| 248 | This value is not accurate enough to be useful by itself. Rather, | 250 | This value is not accurate enough to be useful by itself. Rather, |
| 249 | call `timeclock-workday-elapsed', to determine how much time has been | 251 | call `timeclock-workday-elapsed', to determine how much time has been |
| 250 | worked so far today. Also, if `timeclock-relative' is nil, this value | 252 | worked so far today. Also, if `timeclock-relative' is nil, this value |
| 251 | will be the same as `timeclock-discrepancy'.") | 253 | will be the same as `timeclock-discrepancy'.") ; ? gm |
| 252 | 254 | ||
| 253 | (defvar timeclock-last-period nil | 255 | (defvar timeclock-last-period nil |
| 254 | "Integer representing the number of seconds in the last period. | 256 | "Integer representing the number of seconds in the last period. |
| @@ -297,7 +299,9 @@ display (non-nil means on)." | |||
| 297 | (progn | 299 | (progn |
| 298 | ;; Update immediately so there is a visible change | 300 | ;; Update immediately so there is a visible change |
| 299 | ;; on calling this function. | 301 | ;; on calling this function. |
| 300 | (if display-time-mode (timeclock-update-modeline)) | 302 | (if display-time-mode (timeclock-update-modeline) |
| 303 | (message "Activate `display-time-mode' to see \ | ||
| 304 | timeclock information")) | ||
| 301 | (add-hook 'display-time-hook 'timeclock-update-modeline)) | 305 | (add-hook 'display-time-hook 'timeclock-update-modeline)) |
| 302 | (setq timeclock-update-timer | 306 | (setq timeclock-update-timer |
| 303 | (run-at-time nil 60 'timeclock-update-modeline)))) | 307 | (run-at-time nil 60 'timeclock-update-modeline)))) |