# HG changeset patch # User Glenn Morris # Date 1080153428 0 # Node ID 934d92d8b4960bdae41aed11089cbb8dd6dee4c1 # Parent f5c18c1f02ce18b6db927a1aa0c90b966f566e8c (calendar-set-mode-line): Use total available mode-line width, rather than frame-width. diff -r f5c18c1f02ce -r 934d92d8b496 lisp/calendar/calendar.el --- a/lisp/calendar/calendar.el Wed Mar 24 18:36:20 2004 +0000 +++ b/lisp/calendar/calendar.el Wed Mar 24 18:37:08 2004 +0000 @@ -1915,6 +1915,7 @@ font-lock-mode) (font-lock-fontify-buffer)) (and mark-holidays-in-calendar +;;; (calendar-date-is-legal-p today) ; useful for BC dates (mark-calendar-holidays) (sit-for 0)) (unwind-protect @@ -2933,7 +2934,10 @@ (defun calendar-set-mode-line (str) "Set mode line to STR, centered, surrounded by dashes." (setq mode-line-format - (calendar-string-spread (list str) ?- (frame-width)))) + (calendar-string-spread + (list str) ?- + ;; As per doc of window-width, total visible mode-line length. + (let ((edges (window-edges))) (- (nth 2 edges) (nth 0 edges)))))) (defun calendar-mod (m n) "Non-negative remainder of M/N with N instead of 0."