diff options
| author | Dave Love | 2000-09-17 17:08:04 +0000 |
|---|---|---|
| committer | Dave Love | 2000-09-17 17:08:04 +0000 |
| commit | f7b37bae6335ecf7e696ba109482e195d67f0dec (patch) | |
| tree | f7252e4ad094cc360efdfbd5e4bf02ad442a24a6 | |
| parent | d4ff5db9b4265bd739b964e5e30f5f0110bbdb0b (diff) | |
| download | emacs-f7b37bae6335ecf7e696ba109482e195d67f0dec.tar.gz emacs-f7b37bae6335ecf7e696ba109482e195d67f0dec.zip | |
(scroll-calendar-left)
(scroll-calendar-right): Make arg optional (for active mode line).
| -rw-r--r-- | lisp/calendar/cal-move.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/calendar/cal-move.el b/lisp/calendar/cal-move.el index c7d163982ac..f0dca007a58 100644 --- a/lisp/calendar/cal-move.el +++ b/lisp/calendar/cal-move.el | |||
| @@ -86,11 +86,12 @@ Movement is forward is ARG is negative." | |||
| 86 | (interactive "p") | 86 | (interactive "p") |
| 87 | (calendar-forward-month (* -12 arg))) | 87 | (calendar-forward-month (* -12 arg))) |
| 88 | 88 | ||
| 89 | (defun scroll-calendar-left (arg) | 89 | (defun scroll-calendar-left (&optional arg) |
| 90 | "Scroll the displayed calendar left by ARG months. | 90 | "Scroll the displayed calendar left by ARG months. |
| 91 | If ARG is negative the calendar is scrolled right. Maintains the relative | 91 | If ARG is negative the calendar is scrolled right. Maintains the relative |
| 92 | position of the cursor with respect to the calendar as well as possible." | 92 | position of the cursor with respect to the calendar as well as possible." |
| 93 | (interactive "p") | 93 | (interactive "p") |
| 94 | (unless arg (setq arg 1)) | ||
| 94 | (calendar-cursor-to-nearest-date) | 95 | (calendar-cursor-to-nearest-date) |
| 95 | (let ((old-date (calendar-cursor-to-date)) | 96 | (let ((old-date (calendar-cursor-to-date)) |
| 96 | (today (calendar-current-date))) | 97 | (today (calendar-current-date))) |
| @@ -106,12 +107,12 @@ position of the cursor with respect to the calendar as well as possible." | |||
| 106 | (t (list month 1 year))))))) | 107 | (t (list month 1 year))))))) |
| 107 | (run-hooks 'calendar-move-hook)) | 108 | (run-hooks 'calendar-move-hook)) |
| 108 | 109 | ||
| 109 | (defun scroll-calendar-right (arg) | 110 | (defun scroll-calendar-right (&optional arg) |
| 110 | "Scroll the displayed calendar window right by ARG months. | 111 | "Scroll the displayed calendar window right by ARG months. |
| 111 | If ARG is negative the calendar is scrolled left. Maintains the relative | 112 | If ARG is negative the calendar is scrolled left. Maintains the relative |
| 112 | position of the cursor with respect to the calendar as well as possible." | 113 | position of the cursor with respect to the calendar as well as possible." |
| 113 | (interactive "p") | 114 | (interactive "p") |
| 114 | (scroll-calendar-left (- arg))) | 115 | (scroll-calendar-left (- (or arg 1)))) |
| 115 | 116 | ||
| 116 | (defun scroll-calendar-left-three-months (arg) | 117 | (defun scroll-calendar-left-three-months (arg) |
| 117 | "Scroll the displayed calendar window left by 3*ARG months. | 118 | "Scroll the displayed calendar window left by 3*ARG months. |