Variable: calendar-mode-line-format
calendar-mode-line-format is a customizable variable defined in
calendar.el.gz.
Value
Large value
(#("<" 0 1
(keymap
(keymap
(mode-line keymap
(mouse-1 . calendar-scroll-right)))
mouse-face mode-line-highlight help-echo "mouse-1: previous month"))
"Calendar"
#("? info / o other / . today" 0 6
(help-echo "mouse-1: read Info on Calendar" mouse-face mode-line-highlight keymap
(keymap
(mode-line keymap
(mouse-1 . calendar-goto-info-node))))
9 16
(help-echo "mouse-1: choose another month" mouse-face mode-line-highlight keymap
(keymap
(mode-line keymap
(mouse-1 . calendar-other-month))))
19 26
(help-echo "mouse-1: go to today's date" mouse-face mode-line-highlight keymap
(keymap
(mode-line keymap
(mouse-1 . calendar-goto-today)))))
(calendar-date-string
(calendar-current-date)
t)
#(">" 0 1
(keymap
(keymap
(mode-line keymap
(mouse-1 . calendar-scroll-left)))
mouse-face mode-line-highlight help-echo "mouse-1: next month")))
Documentation
If non-nil, the mode line of the calendar buffer.
This is a list of items that evaluate to strings. The elements
are evaluated and concatenated, evenly separated by blanks.
During evaluation, the variable date is available as the date
nearest the cursor (or today's date if that fails). To update
the mode-line as the cursor moves, add
calendar-update-mode-line to calendar-move-hook.
If nil, do not modify the mode line at all.
Here is an example that has the Hebrew date, the day number/days remaining in the year, and the ISO week/year numbers:
(list
""
'(calendar-hebrew-date-string date)
'(let* ((year (calendar-extract-year date))
(d (calendar-day-number date))
(days-remaining
(- (calendar-day-number (list 12 31 year)) d)))
(format "%d/%d" d days-remaining))
'(let* ((d (calendar-absolute-from-gregorian date))
(iso-date (calendar-iso-from-absolute d)))
(format "ISO week %d of %d"
(calendar-extract-month iso-date)
(calendar-extract-year iso-date)))
""))
Probably introduced at or before Emacs version 25.1.
Source Code
;; Defined in /usr/src/emacs/lisp/calendar/calendar.el.gz
;; After calendar-mode-map.
(defcustom calendar-mode-line-format
(list
(calendar-mode-line-entry 'calendar-scroll-right "previous month" "<")
"Calendar"
(concat
(calendar-mode-line-entry 'calendar-goto-info-node "read Info on Calendar"
nil "info")
" / "
(calendar-mode-line-entry 'calendar-other-month "choose another month"
nil "other")
" / "
(calendar-mode-line-entry 'calendar-goto-today "go to today's date"
nil "today"))
'(calendar-date-string (calendar-current-date) t)
(calendar-mode-line-entry 'calendar-scroll-left "next month" ">"))
"If non-nil, the mode line of the calendar buffer.
This is a list of items that evaluate to strings. The elements
are evaluated and concatenated, evenly separated by blanks.
During evaluation, the variable `date' is available as the date
nearest the cursor (or today's date if that fails). To update
the mode-line as the cursor moves, add
`calendar-update-mode-line' to `calendar-move-hook'.
If nil, do not modify the mode line at all.
Here is an example that has the Hebrew date, the day number/days
remaining in the year, and the ISO week/year numbers:
(list
\"\"
\\='(calendar-hebrew-date-string date)
\\='(let* ((year (calendar-extract-year date))
(d (calendar-day-number date))
(days-remaining
(- (calendar-day-number (list 12 31 year)) d)))
(format \"%d/%d\" d days-remaining))
\\='(let* ((d (calendar-absolute-from-gregorian date))
(iso-date (calendar-iso-from-absolute d)))
(format \"ISO week %d of %d\"
(calendar-extract-month iso-date)
(calendar-extract-year iso-date)))
\"\"))"
:risky t
:type 'sexp
:group 'calendar)