Commit d519ea8a authored by Glenn Morris's avatar Glenn Morris
Browse files

(calendar-set-mode-line): Use total available mode-line width, rather

than frame-width.
parent 359bff67
......@@ -1915,6 +1915,7 @@ Or, for optional MON, YR."
(and mark-holidays-in-calendar
;;; (calendar-date-is-legal-p today) ; useful for BC dates
(sit-for 0))
......@@ -2933,7 +2934,10 @@ Defaults to today's date if DATE is not given."
(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))))
(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."
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment