From: Dave Love Date: Sun, 17 Sep 2000 17:08:04 +0000 (+0000) Subject: (scroll-calendar-left) X-Git-Tag: emacs-pretest-21.0.90~1561 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f7b37bae6335ecf7e696ba109482e195d67f0dec;p=emacs.git (scroll-calendar-left) (scroll-calendar-right): Make arg optional (for active mode line). --- 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." (interactive "p") (calendar-forward-month (* -12 arg))) -(defun scroll-calendar-left (arg) +(defun scroll-calendar-left (&optional arg) "Scroll the displayed calendar left by ARG months. If ARG is negative the calendar is scrolled right. Maintains the relative position of the cursor with respect to the calendar as well as possible." (interactive "p") + (unless arg (setq arg 1)) (calendar-cursor-to-nearest-date) (let ((old-date (calendar-cursor-to-date)) (today (calendar-current-date))) @@ -106,12 +107,12 @@ position of the cursor with respect to the calendar as well as possible." (t (list month 1 year))))))) (run-hooks 'calendar-move-hook)) -(defun scroll-calendar-right (arg) +(defun scroll-calendar-right (&optional arg) "Scroll the displayed calendar window right by ARG months. If ARG is negative the calendar is scrolled left. Maintains the relative position of the cursor with respect to the calendar as well as possible." (interactive "p") - (scroll-calendar-left (- arg))) + (scroll-calendar-left (- (or arg 1)))) (defun scroll-calendar-left-three-months (arg) "Scroll the displayed calendar window left by 3*ARG months.