Function: calendar-cursor-to-visible-date

calendar-cursor-to-visible-date is an autoloaded and byte-compiled function defined in cal-move.el.gz.

Signature

(calendar-cursor-to-visible-date DATE)

Documentation

Move the cursor to DATE that is on the screen.

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/cal-move.el.gz
;;;###cal-autoload
(defun calendar-cursor-to-visible-date (date)
  "Move the cursor to DATE that is on the screen."
  (let ((month (calendar-extract-month date))
        (day (calendar-extract-day date))
        (year (calendar-extract-year date)))
    (goto-char (point-min))
    (forward-line (+ calendar-first-date-row -1
                     (/ (+ day -1
                           (mod
                            (- (calendar-day-of-week (list month 1 year))
                               calendar-week-start-day)
                            7))
                        7)))
    (move-to-column (+ calendar-left-margin (1- calendar-day-digit-width)
                       (* calendar-month-width
                          (1+ (calendar-interval
                               displayed-month displayed-year month year)))
                       (* calendar-column-width
                          (mod
                           (- (calendar-day-of-week date)
                              calendar-week-start-day)
                           7))))))