Mercurial > emacs
changeset 92907:d89709effe07
(displayed-year): Move declaration where needed.
(calendar-event-to-date, cal-tex-mouse-week, cal-tex-mouse-week-iso): Doc fix.
(calendar-mouse-goto-date): Move definition before use.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Fri, 14 Mar 2008 03:18:00 +0000 |
parents | 6bd4615496d3 |
children | add78113de9e |
files | lisp/calendar/cal-menu.el |
diffstat | 1 files changed, 10 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/calendar/cal-menu.el Fri Mar 14 03:15:21 2008 +0000 +++ b/lisp/calendar/cal-menu.el Fri Mar 14 03:18:00 2008 +0000 @@ -80,8 +80,6 @@ (declare-function calendar-print-chinese-date "cal-china" nil) (declare-function calendar-goto-date "cal-move" (date)) -(defvar displayed-year) - (defconst cal-menu-moon-menu '("Moon" ["Lunar Phases" calendar-phases-of-moon])) @@ -130,6 +128,8 @@ (calendar-month-name (car my2) 'abbrev) (cdr my2))))) +(defvar displayed-year) ; from generate-calendar + (defconst cal-menu-holidays-menu `("Holidays" ["For Cursor Date -" calendar-cursor-holidays @@ -228,12 +228,17 @@ (defun calendar-event-to-date (&optional error) "Date of last event. If event is not on a specific date, signals an error if optional parameter -ERROR is t, otherwise just returns nil." +ERROR is non-nil, otherwise just returns nil." (with-current-buffer (window-buffer (posn-window (event-start last-input-event))) (goto-char (posn-point (event-start last-input-event))) (calendar-cursor-to-date error))) +(defun calendar-mouse-goto-date (date) + "Goto DATE in the buffer specified by `last-input-event'." + (set-buffer (window-buffer (posn-window (event-start last-input-event)))) + (calendar-goto-date date)) + (defun calendar-mouse-sunrise/sunset () "Show sunrise/sunset times for mouse-selected date." (interactive) @@ -332,7 +337,7 @@ (defun cal-tex-mouse-week () "One page calendar for week indicated by cursor. -Holidays are included if `cal-tex-holidays' is t." +Holidays are included if `cal-tex-holidays' is non-nil." (interactive) (save-excursion (calendar-mouse-goto-date (calendar-event-to-date)) @@ -348,7 +353,7 @@ (defun cal-tex-mouse-week-iso () "One page calendar for week indicated by cursor. -Holidays are included if `cal-tex-holidays' is t." +Holidays are included if `cal-tex-holidays' is non-nil." (interactive) (save-excursion (calendar-mouse-goto-date (calendar-event-to-date)) @@ -478,11 +483,6 @@ (calendar-mouse-goto-date (calendar-event-to-date)) (calendar-print-chinese-date))) -(defun calendar-mouse-goto-date (date) - "Goto DATE in the buffer specified by `last-input-event'." - (set-buffer (window-buffer (posn-window (event-start last-input-event)))) - (calendar-goto-date date)) - (defun cal-menu-set-date-title (menu) "Convert date of last event to title suitable for MENU." (easy-menu-filter-return