Function: calendar-column-to-segment

calendar-column-to-segment is a byte-compiled function defined in calendar.el.gz.

Signature

(calendar-column-to-segment)

Documentation

Convert current column to calendar month "segment".

The left-most month returns 0, the next right 1, and so on.

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/calendar.el.gz
(defun calendar-column-to-segment ()
  "Convert current column to calendar month \"segment\".
The left-most month returns 0, the next right 1, and so on."
  (let ((col (max 0 (+ (current-column)
                       (/ calendar-intermonth-spacing 2)
                       (- calendar-left-margin)))))
    (/ col (+ (* 7 calendar-column-width) calendar-intermonth-spacing))))