comparison lisp/calendar/calendar.el @ 8262:676fd590cc41

(calendar-goto-today): Renamed from calendar-current-month.
author Richard M. Stallman <rms@gnu.org>
date Sat, 16 Jul 1994 19:38:18 +0000
parents 1c621b9896c0
children 34db69f96583
comparison
equal deleted inserted replaced
8261:3eab4db14a5d 8262:676fd590cc41
1503 (define-key calendar-mode-map "gmnt" 'calendar-next-tzolkin-date) 1503 (define-key calendar-mode-map "gmnt" 'calendar-next-tzolkin-date)
1504 (define-key calendar-mode-map "S" 'calendar-sunrise-sunset) 1504 (define-key calendar-mode-map "S" 'calendar-sunrise-sunset)
1505 (define-key calendar-mode-map "M" 'calendar-phases-of-moon) 1505 (define-key calendar-mode-map "M" 'calendar-phases-of-moon)
1506 (define-key calendar-mode-map " " 'scroll-other-window) 1506 (define-key calendar-mode-map " " 'scroll-other-window)
1507 (define-key calendar-mode-map "\C-c\C-l" 'redraw-calendar) 1507 (define-key calendar-mode-map "\C-c\C-l" 'redraw-calendar)
1508 (define-key calendar-mode-map "." 'calendar-current-month) 1508 (define-key calendar-mode-map "." 'calendar-goto-today)
1509 (define-key calendar-mode-map "o" 'calendar-other-month) 1509 (define-key calendar-mode-map "o" 'calendar-other-month)
1510 (define-key calendar-mode-map "q" 'exit-calendar) 1510 (define-key calendar-mode-map "q" 'exit-calendar)
1511 (define-key calendar-mode-map "a" 'list-calendar-holidays) 1511 (define-key calendar-mode-map "a" 'list-calendar-holidays)
1512 (define-key calendar-mode-map "h" 'calendar-cursor-holidays) 1512 (define-key calendar-mode-map "h" 'calendar-cursor-holidays)
1513 (define-key calendar-mode-map "x" 'mark-calendar-holidays) 1513 (define-key calendar-mode-map "x" 'mark-calendar-holidays)
1555 1555
1556 (defvar calendar-mode-line-format 1556 (defvar calendar-mode-line-format
1557 (list 1557 (list
1558 (substitute-command-keys "\\<calendar-mode-map>\\[scroll-calendar-left]") 1558 (substitute-command-keys "\\<calendar-mode-map>\\[scroll-calendar-left]")
1559 "Calendar" 1559 "Calendar"
1560 (substitute-command-keys "\\<calendar-mode-map>\\[describe-calendar-mode] help/\\[calendar-other-month] other/\\[calendar-current-month] today") 1560 (substitute-command-keys "\\<calendar-mode-map>\\[describe-calendar-mode] help/\\[calendar-other-month] other/\\[calendar-goto-today] today")
1561 '(calendar-date-string (calendar-current-date) t) 1561 '(calendar-date-string (calendar-current-date) t)
1562 (substitute-command-keys "\\<calendar-mode-map>\\[scroll-calendar-right]")) 1562 (substitute-command-keys "\\<calendar-mode-map>\\[scroll-calendar-right]"))
1563 "The mode line of the calendar buffer.") 1563 "The mode line of the calendar buffer.")
1564 1564
1565 (defun calendar-mode () 1565 (defun calendar-mode ()
1599 1599
1600 The commands for calendar movement are: 1600 The commands for calendar movement are:
1601 1601
1602 \\[scroll-calendar-right] scroll one month right \\[scroll-calendar-left] scroll one month left 1602 \\[scroll-calendar-right] scroll one month right \\[scroll-calendar-left] scroll one month left
1603 \\[scroll-calendar-right-three-months] scroll 3 months right \\[scroll-calendar-left-three-months] scroll 3 months left 1603 \\[scroll-calendar-right-three-months] scroll 3 months right \\[scroll-calendar-left-three-months] scroll 3 months left
1604 \\[calendar-current-month] display current month \\[calendar-other-month] display another month 1604 \\[calendar-goto-today] display current month \\[calendar-other-month] display another month
1605 1605
1606 Whenever it makes sense, the above commands take prefix arguments that 1606 Whenever it makes sense, the above commands take prefix arguments that
1607 multiply their affect. For convenience, the digit keys and the minus sign 1607 multiply their affect. For convenience, the digit keys and the minus sign
1608 are bound to digit-argument, so they need not be prefixed with ESC. 1608 are bound to digit-argument, so they need not be prefixed with ESC.
1609 1609
1852 (if h-buffer (bury-buffer h-buffer)) 1852 (if h-buffer (bury-buffer h-buffer))
1853 (set-buffer diary-buffer) 1853 (set-buffer diary-buffer)
1854 (set-buffer-modified-p nil) 1854 (set-buffer-modified-p nil)
1855 (bury-buffer diary-buffer)))))) 1855 (bury-buffer diary-buffer))))))
1856 1856
1857 (defun calendar-current-month () 1857 (defun calendar-goto-today ()
1858 "Reposition the calendar window so the current date is visible." 1858 "Reposition the calendar window so the current date is visible."
1859 (interactive) 1859 (interactive)
1860 (let ((today (calendar-current-date)));; The date might have changed. 1860 (let ((today (calendar-current-date)));; The date might have changed.
1861 (if (not (calendar-date-is-visible-p today)) 1861 (if (not (calendar-date-is-visible-p today))
1862 (generate-calendar-window) 1862 (generate-calendar-window)