Index: man/calendar.texi =================================================================== RCS file: /cvsroot/emacs/emacs/man/calendar.texi,v retrieving revision 1.23 diff -u -r1.23 calendar.texi --- man/calendar.texi 19 Oct 2004 09:57:49 -0000 1.23 +++ man/calendar.texi 30 Nov 2004 14:57:31 -0000 @@ -291,7 +291,9 @@ @item C-c C-l Regenerate the calendar window (@code{redraw-calendar}). @item SPC -Scroll the next window (@code{scroll-other-window}). +Scroll the next window up (@code{scroll-other-window}). address@hidden DEL +Scroll the next window down (@code{scroll-other-window-down}). @item q Exit from calendar (@code{exit-calendar}). @end table @@ -314,8 +316,9 @@ @kindex SPC @r{(Calendar mode)} In Calendar mode, you can use @kbd{SPC} (@code{scroll-other-window}) -to scroll the other window. This is handy when you display a list of -holidays or diary entries in another window. +to scroll the other window up and @kbd{DEL} (@code{scroll-other-window-down}) +to scroll the other window down. This is handy when you display a list +of holidays or diary entries in another window. @kindex q @r{(Calendar mode)} @findex exit-calendar @@ -437,8 +440,8 @@ @findex list-calendar-holidays To get even more detailed information, use the @kbd{a} command, which displays a separate buffer containing a list of all holidays in the -current three-month range. You can use @key{SPC} in the calendar window -to scroll that list. +current three-month range. You can use @key{SPC} and @key{DEL} in the +calendar window to scroll that list up and down. @findex holidays The command @kbd{M-x holidays} displays the list of holidays for the @@ -861,7 +864,7 @@ @noindent Thus, the long count date 12.16.11.16.6 means 12 baktun, 16 katun, 11 tun, 16 uinal, and 6 kin. The Emacs calendar can handle Mayan long -count dates as early as 7.17.18.13.1, but no earlier. When you use the +count dates as early as 7.17.18.13.3, but no earlier. When you use the @kbd{g m l} command, type the Mayan long count date with the baktun, katun, tun, uinal, and kin separated by periods. @@ -1510,11 +1513,14 @@ @findex timeclock-in @findex timeclock-out address@hidden timeclock-change @findex timeclock-workday-remaining @findex timeclock-when-to-leave Use the @kbd{M-x timeclock-in} command when you start working on a project, and @kbd{M-x timeclock-out} command when you're done. Each -time you do this, it adds one time interval to the record of the project. +time you do this, it adds one time interval to the record of the +project. You can change to working on a different project with @kbd{M-x +timeclock-change}. Once you've collected data from a number of time intervals, you can use @kbd{M-x timeclock-workday-remaining} to see how much time is left to @@ -1529,12 +1535,13 @@ @code{t}, or invoke the @kbd{M-x timeclock-modeline-display} command. @vindex timeclock-ask-before-exiting - Terminating the current Emacs session might or might not mean that -you have stopped working on the project. If you'd like Emacs to ask -you about this, set the value of the variable address@hidden to @code{t} (via @kbd{M-x -customize}). By default, only an explicit @kbd{M-x timeclock-out} -tells Emacs that the current interval is over. + Terminating the current Emacs session might or might not mean that you +have stopped working on the project and, by default, Emacs queries this. +However, you can set the value of the variable address@hidden to @code{nil} (via @kbd{M-x +customize}) to avoid this behaviour; then, only an explicit @kbd{M-x +timeclock-out} or @kbd{M-x timeclock-change} will tell Emacs that the +current interval is over. @cindex @file{.timelog} file @vindex timeclock-file Index: man/ChangeLog =================================================================== RCS file: /cvsroot/emacs/emacs/man/ChangeLog,v retrieving revision 1.386 diff -u -r1.386 ChangeLog --- man/ChangeLog 29 Nov 2004 15:58:15 -0000 1.386 +++ man/ChangeLog 30 Nov 2004 14:57:31 -0000 @@ -1,3 +1,11 @@ +2004-11-30 Matt Hodges + + * calendar.texi (General Calendar): Document binding of + scroll-other-window-down. + (Mayan Calendar): Fixed earliest date. + (Time Intervals): Document timeclock-change. + (Time Intervals): Fix timeclock-ask-before-exiting documentation. + 2004-11-29 Reiner Steib * custom.texi (File Variables): Add `unibyte' and make it more Index: lisp/calendar/calendar.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/calendar/calendar.el,v retrieving revision 1.159 diff -u -r1.159 calendar.el --- lisp/calendar/calendar.el 4 Oct 2004 23:46:42 -0000 1.159 +++ lisp/calendar/calendar.el 30 Nov 2004 14:57:31 -0000 @@ -140,12 +140,25 @@ :prefix "calendar-" :group 'calendar) +(defconst calendar-buffer "*Calendar*" + "Name of the buffer used for the calendar.") ;;;###autoload (defcustom calendar-week-start-day 0 "*The day of the week on which a week in the calendar begins. -0 means Sunday (default), 1 means Monday, and so on." +0 means Sunday (default), 1 means Monday, and so on. + +If you change this variable directly after starting `calendar', +you should call `redraw-calendar' to update the calendar display +to reflect the change, otherwise movement commands will not work +correctly." :type 'integer + :set (lambda (sym val) + (set sym val) + (let ((buffer (get-buffer calendar-buffer))) + (when (buffer-live-p buffer) + (with-current-buffer buffer + (redraw-calendar))))) :group 'calendar) ;;;###autoload @@ -1303,9 +1316,6 @@ :type 'sexp :group 'holidays) -(defconst calendar-buffer "*Calendar*" - "Name of the buffer used for the calendar.") - (defconst holiday-buffer "*Holidays*" "Name of the buffer used for the displaying the holidays.") @@ -1572,6 +1582,11 @@ (const :tag "use current frame" nil)) :group 'calendar) +(defcustom calendar-minimum-window-height 8 + "Minimum height that the calendar window should use." + :type 'integer + :group 'calendar) + ;;;###autoload (defun calendar (&optional arg) "Choose between the one frame, two frame, or basic calendar displays. @@ -2032,28 +2047,33 @@ (or (not mon) (let ((offset (calendar-interval mon yr month year))) (and (<= offset 1) (>= offset -1))))) - (day-in-week (calendar-day-of-week today))) + (day-in-week (calendar-day-of-week today)) + (in-calendar-window (eq (window-buffer (selected-window)) + (get-buffer calendar-buffer)))) (update-calendar-mode-line) (if mon (generate-calendar mon yr) - (generate-calendar month year)) + (generate-calendar month year)) (calendar-cursor-to-visible-date (if today-visible today (list displayed-month 1 displayed-year))) (set-buffer-modified-p nil) - (if (or (one-window-p t) (/= (frame-width) (window-width))) - ;; Don't mess with the window size, but ensure that the first - ;; line is fully visible - (set-window-vscroll nil 0) - ;; Adjust the window to exactly fit the displayed calendar - (fit-window-to-buffer)) - (sit-for 0) + ;; Don't do any window-related stuff if we weren't called from a + ;; window displaying the calendar + (when in-calendar-window + (if (or (one-window-p t) (/= (frame-width) (window-width))) + ;; Don't mess with the window size, but ensure that the first + ;; line is fully visible + (set-window-vscroll nil 0) + ;; Adjust the window to exactly fit the displayed calendar + (fit-window-to-buffer nil nil calendar-minimum-window-height)) + (sit-for 0)) (if (and (boundp 'font-lock-mode) font-lock-mode) (font-lock-fontify-buffer)) (and mark-holidays-in-calendar ;;; (calendar-date-is-legal-p today) ; useful for BC dates (mark-calendar-holidays) - (sit-for 0)) + (when in-calendar-window (sit-for 0))) (unwind-protect (if mark-diary-entries-in-calendar (mark-diary-entries)) (if today-visible @@ -2067,7 +2087,7 @@ ;;; stands, almost all other calendar functions (eg holidays) would ;;; at best have unpredictable results for such dates. (if (< (+ month (* 12 (1- year))) 2) - (error "Months before February, 1 AD are not available")) + (error "Months before January, 1 AD cannot be displayed")) (setq displayed-month month displayed-year year) (erase-buffer) @@ -2222,6 +2242,7 @@ (define-key calendar-mode-map "S" 'calendar-sunrise-sunset) (define-key calendar-mode-map "M" 'calendar-phases-of-moon) (define-key calendar-mode-map " " 'scroll-other-window) + (define-key calendar-mode-map "\C-?" 'scroll-other-window-down) (define-key calendar-mode-map "\C-c\C-l" 'redraw-calendar) (define-key calendar-mode-map "." 'calendar-goto-today) (define-key calendar-mode-map "o" 'calendar-other-month) Index: lisp/ChangeLog =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/ChangeLog,v retrieving revision 1.6694 diff -u -r1.6694 ChangeLog --- lisp/ChangeLog 30 Nov 2004 11:07:29 -0000 1.6694 +++ lisp/ChangeLog 30 Nov 2004 14:57:33 -0000 @@ -1,3 +1,15 @@ +2004-11-30 Matt Hodges + + * calendar/calendar.el (calendar-buffer): Moved above + calendar-week-start-day. + (calendar-week-start-day): Doc fix. Added :set function. + (generate-calendar-window): Don't resize window if selected-window + is not displaying the calendar buffer. + (calendar-minimum-window-height): New variable. + (generate-calendar-window): Use it. + (calendar-mode-map): Bind DEL to scroll-other-window-down. + (generate-calendar): More precise error message. + 2004-11-30 Andre Spiegel * vc-hooks.el (vc-recompute-state): Moved here from vc.el.