Function: calendar-month-edges
calendar-month-edges is a byte-compiled function defined in
calendar.el.gz.
Signature
(calendar-month-edges SEGMENT)
Documentation
Compute the month edge columns for month SEGMENT.
Returns a list (LEFT FIRST LAST RIGHT), where LEFT is the leftmost column associated with a month, FIRST and LAST are the first and last columns with day digits in, and LAST is the rightmost column.
Source Code
;; Defined in /usr/src/emacs/lisp/calendar/calendar.el.gz
(defun calendar-month-edges (segment)
"Compute the month edge columns for month SEGMENT.
Returns a list (LEFT FIRST LAST RIGHT), where LEFT is the
leftmost column associated with a month, FIRST and LAST are the
first and last columns with day digits in, and LAST is the
rightmost column."
;; The leftmost column with a digit in it in this month segment.
(let* ((first (+ calendar-left-margin
(* segment calendar-month-width)))
;; The rightmost column with a digit in it in this month segment.
(last (+ first (1- calendar-month-digit-width)))
(left (if (eq segment 0)
0
(+ calendar-left-margin
(* segment calendar-month-width)
(- (/ calendar-intermonth-spacing 2)))))
;; The rightmost edge of this month segment, dividing the
;; space between months in two.
(right (+ calendar-left-margin
(* (1+ segment) calendar-month-width)
(- (/ calendar-intermonth-spacing 2)))))
(list left first last right)))