aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorGlenn Morris2004-03-24 18:37:08 +0000
committerGlenn Morris2004-03-24 18:37:08 +0000
commitd519ea8a53b5786891c628f2cd338a6e0fb88a47 (patch)
tree52a213ba88327e23003dfd710f93204039a9fd3e /lisp
parent359bff6712a073903ad77086637bb125dd0342e5 (diff)
downloademacs-d519ea8a53b5786891c628f2cd338a6e0fb88a47.tar.gz
emacs-d519ea8a53b5786891c628f2cd338a6e0fb88a47.zip
(calendar-set-mode-line): Use total available mode-line width, rather
than frame-width.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/calendar/calendar.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el
index c1277ca5132..0d38563e637 100644
--- a/lisp/calendar/calendar.el
+++ b/lisp/calendar/calendar.el
@@ -1915,6 +1915,7 @@ Or, for optional MON, YR."
1915 font-lock-mode) 1915 font-lock-mode)
1916 (font-lock-fontify-buffer)) 1916 (font-lock-fontify-buffer))
1917 (and mark-holidays-in-calendar 1917 (and mark-holidays-in-calendar
1918;;; (calendar-date-is-legal-p today) ; useful for BC dates
1918 (mark-calendar-holidays) 1919 (mark-calendar-holidays)
1919 (sit-for 0)) 1920 (sit-for 0))
1920 (unwind-protect 1921 (unwind-protect
@@ -2933,7 +2934,10 @@ Defaults to today's date if DATE is not given."
2933(defun calendar-set-mode-line (str) 2934(defun calendar-set-mode-line (str)
2934 "Set mode line to STR, centered, surrounded by dashes." 2935 "Set mode line to STR, centered, surrounded by dashes."
2935 (setq mode-line-format 2936 (setq mode-line-format
2936 (calendar-string-spread (list str) ?- (frame-width)))) 2937 (calendar-string-spread
2938 (list str) ?-
2939 ;; As per doc of window-width, total visible mode-line length.
2940 (let ((edges (window-edges))) (- (nth 2 edges) (nth 0 edges))))))
2937 2941
2938(defun calendar-mod (m n) 2942(defun calendar-mod (m n)
2939 "Non-negative remainder of M/N with N instead of 0." 2943 "Non-negative remainder of M/N with N instead of 0."