Variable: calendar-intermonth-text

calendar-intermonth-text is a customizable variable defined in calendar.el.gz.

Value

nil

Documentation

Text to display in the space to the left of each calendar month.

Can be nil, a fixed string, or a Lisp expression that returns a string. When the expression is evaluated, the variables day, month and year are integers appropriate for the first day in each week. Will be truncated to the smaller of calendar-left-margin and calendar-intermonth-spacing. The last character is forced to be a space. For example, to display the ISO week numbers:

  (setq calendar-week-start-day 1
        calendar-intermonth-text
        '(propertize
          (format "%2d"
                  (car
                   (calendar-iso-from-absolute
                    (calendar-absolute-from-gregorian (list month day year)))))
          'font-lock-face 'font-lock-function-name-face))

See also calendar-intermonth-header.

This variable was added, or its default value changed, in Emacs 23.1.

View in manual

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/calendar.el.gz
(defcustom calendar-intermonth-text nil
  "Text to display in the space to the left of each calendar month.
Can be nil, a fixed string, or a Lisp expression that returns a string.
When the expression is evaluated, the variables `day', `month' and `year'
are integers appropriate for the first day in each week.
Will be truncated to the smaller of `calendar-left-margin' and
`calendar-intermonth-spacing'.  The last character is forced to be a space.
For example, to display the ISO week numbers:

  (setq calendar-week-start-day 1
        calendar-intermonth-text
        \\='(propertize
          (format \"%2d\"
                  (car
                   (calendar-iso-from-absolute
                    (calendar-absolute-from-gregorian (list month day year)))))
          \\='font-lock-face \\='font-lock-function-name-face))

See also `calendar-intermonth-header'."
  :group 'calendar
  :initialize 'custom-initialize-default
  :risky t
  :set (lambda (sym val)
         (set sym val)
         (calendar-redraw))
  :type '(choice (const :value nil :tag "Nothing")
                 (string :tag "Fixed string")
                 (sexp :value
                       (propertize
                        (format "%2d"
                                (car
                                 (calendar-iso-from-absolute
                                  (calendar-absolute-from-gregorian
                                   (list month day year)))))
                        'font-lock-face 'font-lock-function-name-face)))
  :version "23.1")