Function: calendar-forward-day
calendar-forward-day is an autoloaded, interactive and byte-compiled
function defined in cal-move.el.gz.
Signature
(calendar-forward-day ARG)
Documentation
Move the cursor forward ARG days.
Moves backward if ARG is negative.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/calendar/cal-move.el.gz
;;;###cal-autoload
(defun calendar-forward-day (arg)
"Move the cursor forward ARG days.
Moves backward if ARG is negative."
(interactive "p")
(unless (zerop arg)
(let* ((cursor-date (or (calendar-cursor-to-date)
(progn
(if (> arg 0) (setq arg (1- arg)))
(calendar-cursor-to-nearest-date))))
(new-cursor-date
(calendar-gregorian-from-absolute
(+ (calendar-absolute-from-gregorian cursor-date) arg)))
(month (calendar-extract-month new-cursor-date))
(year (calendar-extract-year new-cursor-date)))
;; Put the new month on the screen, if needed.
(unless (calendar-date-is-visible-p new-cursor-date)
;; The next line gives smoother scrolling (i.e. making the new
;; month appear at the edge).
(calendar--show-month-at-edge month year arg))
;; Go to the new date.
(calendar-cursor-to-visible-date new-cursor-date)))
(run-hooks 'calendar-move-hook))