diff options
| author | Glenn Morris | 2008-03-14 03:18:20 +0000 |
|---|---|---|
| committer | Glenn Morris | 2008-03-14 03:18:20 +0000 |
| commit | 6cd61ebd91f7f72ce55c6445884c46d3af926a21 (patch) | |
| tree | 269cac33d002148b379a0657a3ffa748431c7e66 | |
| parent | 5424a53095d61527075da3c5e7986117efb1c5b7 (diff) | |
| download | emacs-6cd61ebd91f7f72ce55c6445884c46d3af926a21.tar.gz emacs-6cd61ebd91f7f72ce55c6445884c46d3af926a21.zip | |
(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.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/calendar/cal-menu.el | 20 |
2 files changed, 15 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1d93d1f7f3d..8d6618a3938 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -29,6 +29,11 @@ | |||
| 29 | (french-calendar-day-name-array, french-calendar-special-days-array): | 29 | (french-calendar-day-name-array, french-calendar-special-days-array): |
| 30 | Add doc strings. | 30 | Add doc strings. |
| 31 | 31 | ||
| 32 | * calendar/cal-menu.el (displayed-year): Move declaration where needed. | ||
| 33 | (calendar-event-to-date, cal-tex-mouse-week, cal-tex-mouse-week-iso): | ||
| 34 | Doc fix. | ||
| 35 | (calendar-mouse-goto-date): Move definition before use. | ||
| 36 | |||
| 32 | * calendar/cal-persia.el (calendar-goto-persian-date): Doc fix. | 37 | * calendar/cal-persia.el (calendar-goto-persian-date): Doc fix. |
| 33 | 38 | ||
| 34 | * calendar/diary-lib.el (mark-diary-entries): Move some constant | 39 | * calendar/diary-lib.el (mark-diary-entries): Move some constant |
diff --git a/lisp/calendar/cal-menu.el b/lisp/calendar/cal-menu.el index fffe0b3d462..e87e4729eb3 100644 --- a/lisp/calendar/cal-menu.el +++ b/lisp/calendar/cal-menu.el | |||
| @@ -80,8 +80,6 @@ | |||
| 80 | (declare-function calendar-print-chinese-date "cal-china" nil) | 80 | (declare-function calendar-print-chinese-date "cal-china" nil) |
| 81 | (declare-function calendar-goto-date "cal-move" (date)) | 81 | (declare-function calendar-goto-date "cal-move" (date)) |
| 82 | 82 | ||
| 83 | (defvar displayed-year) | ||
| 84 | |||
| 85 | (defconst cal-menu-moon-menu | 83 | (defconst cal-menu-moon-menu |
| 86 | '("Moon" | 84 | '("Moon" |
| 87 | ["Lunar Phases" calendar-phases-of-moon])) | 85 | ["Lunar Phases" calendar-phases-of-moon])) |
| @@ -130,6 +128,8 @@ | |||
| 130 | (calendar-month-name (car my2) 'abbrev) | 128 | (calendar-month-name (car my2) 'abbrev) |
| 131 | (cdr my2))))) | 129 | (cdr my2))))) |
| 132 | 130 | ||
| 131 | (defvar displayed-year) ; from generate-calendar | ||
| 132 | |||
| 133 | (defconst cal-menu-holidays-menu | 133 | (defconst cal-menu-holidays-menu |
| 134 | `("Holidays" | 134 | `("Holidays" |
| 135 | ["For Cursor Date -" calendar-cursor-holidays | 135 | ["For Cursor Date -" calendar-cursor-holidays |
| @@ -228,12 +228,17 @@ POSITION and MENU are passed to `x-popup-menu'." | |||
| 228 | (defun calendar-event-to-date (&optional error) | 228 | (defun calendar-event-to-date (&optional error) |
| 229 | "Date of last event. | 229 | "Date of last event. |
| 230 | If event is not on a specific date, signals an error if optional parameter | 230 | If event is not on a specific date, signals an error if optional parameter |
| 231 | ERROR is t, otherwise just returns nil." | 231 | ERROR is non-nil, otherwise just returns nil." |
| 232 | (with-current-buffer | 232 | (with-current-buffer |
| 233 | (window-buffer (posn-window (event-start last-input-event))) | 233 | (window-buffer (posn-window (event-start last-input-event))) |
| 234 | (goto-char (posn-point (event-start last-input-event))) | 234 | (goto-char (posn-point (event-start last-input-event))) |
| 235 | (calendar-cursor-to-date error))) | 235 | (calendar-cursor-to-date error))) |
| 236 | 236 | ||
| 237 | (defun calendar-mouse-goto-date (date) | ||
| 238 | "Goto DATE in the buffer specified by `last-input-event'." | ||
| 239 | (set-buffer (window-buffer (posn-window (event-start last-input-event)))) | ||
| 240 | (calendar-goto-date date)) | ||
| 241 | |||
| 237 | (defun calendar-mouse-sunrise/sunset () | 242 | (defun calendar-mouse-sunrise/sunset () |
| 238 | "Show sunrise/sunset times for mouse-selected date." | 243 | "Show sunrise/sunset times for mouse-selected date." |
| 239 | (interactive) | 244 | (interactive) |
| @@ -332,7 +337,7 @@ is non-nil." | |||
| 332 | 337 | ||
| 333 | (defun cal-tex-mouse-week () | 338 | (defun cal-tex-mouse-week () |
| 334 | "One page calendar for week indicated by cursor. | 339 | "One page calendar for week indicated by cursor. |
| 335 | Holidays are included if `cal-tex-holidays' is t." | 340 | Holidays are included if `cal-tex-holidays' is non-nil." |
| 336 | (interactive) | 341 | (interactive) |
| 337 | (save-excursion | 342 | (save-excursion |
| 338 | (calendar-mouse-goto-date (calendar-event-to-date)) | 343 | (calendar-mouse-goto-date (calendar-event-to-date)) |
| @@ -348,7 +353,7 @@ The printed output will be on two pages." | |||
| 348 | 353 | ||
| 349 | (defun cal-tex-mouse-week-iso () | 354 | (defun cal-tex-mouse-week-iso () |
| 350 | "One page calendar for week indicated by cursor. | 355 | "One page calendar for week indicated by cursor. |
| 351 | Holidays are included if `cal-tex-holidays' is t." | 356 | Holidays are included if `cal-tex-holidays' is non-nil." |
| 352 | (interactive) | 357 | (interactive) |
| 353 | (save-excursion | 358 | (save-excursion |
| 354 | (calendar-mouse-goto-date (calendar-event-to-date)) | 359 | (calendar-mouse-goto-date (calendar-event-to-date)) |
| @@ -478,11 +483,6 @@ EVENT is the event that invoked this command." | |||
| 478 | (calendar-mouse-goto-date (calendar-event-to-date)) | 483 | (calendar-mouse-goto-date (calendar-event-to-date)) |
| 479 | (calendar-print-chinese-date))) | 484 | (calendar-print-chinese-date))) |
| 480 | 485 | ||
| 481 | (defun calendar-mouse-goto-date (date) | ||
| 482 | "Goto DATE in the buffer specified by `last-input-event'." | ||
| 483 | (set-buffer (window-buffer (posn-window (event-start last-input-event)))) | ||
| 484 | (calendar-goto-date date)) | ||
| 485 | |||
| 486 | (defun cal-menu-set-date-title (menu) | 486 | (defun cal-menu-set-date-title (menu) |
| 487 | "Convert date of last event to title suitable for MENU." | 487 | "Convert date of last event to title suitable for MENU." |
| 488 | (easy-menu-filter-return | 488 | (easy-menu-filter-return |