Function: calendar-update-mode-line
calendar-update-mode-line is a byte-compiled function defined in
calendar.el.gz.
Signature
(calendar-update-mode-line)
Documentation
Update the calendar mode line with the current date and date style.
Source Code
;; Defined in /usr/src/emacs/lisp/calendar/calendar.el.gz
(defun calendar-update-mode-line ()
"Update the calendar mode line with the current date and date style."
(if (and calendar-mode-line-format
(bufferp (get-buffer calendar-buffer)))
(with-current-buffer calendar-buffer
(let ((start (- calendar-left-margin 2)))
(calendar-dlet ((date (condition-case nil
(calendar-cursor-to-nearest-date)
(error (calendar-current-date)))))
(setq mode-line-format
(concat (make-string (max 0 (+ start
(- (car (window-inside-edges))
(car (window-edges)))))
?\s)
(calendar-string-spread
calendar-mode-line-format
?\s (- calendar-right-margin (1- start)))))))
(force-mode-line-update))))