From 17f25e76c9d133226bddee6a77fe65a2fed5e8fe Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 4 Aug 2013 23:49:37 -0700 Subject: [PATCH] * lisp/calendar/calendar.el (calendar-generate-month): Fix for calendar-column-width != 1 + calendar-day-digit-width. --- lisp/ChangeLog | 5 +++++ lisp/calendar/calendar.el | 19 ++++++++++--------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0c4240c9075..f7dbcfd3a27 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-08-05 Glenn Morris + + * calendar/calendar.el (calendar-generate-month): + Fix for calendar-column-width != 1 + calendar-day-digit-width. + 2013-08-05 Juanma Barranquero * desktop.el (desktop-clear): Use new name of sort predicate. diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 20a8684e387..00c6404af7c 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -1544,15 +1544,16 @@ line." (dotimes (i last) (setq day (1+ i)) ;; TODO should numbers be left-justified, centered...? - (insert (format (format "%%%dd%%s" calendar-day-digit-width) day - (make-string - (- calendar-column-width calendar-day-digit-width) ?\s))) - ;; 'date property prevents intermonth text confusing re-searches. - ;; (Tried intangible, it did not really work.) - (set-text-properties - (- (point) (1+ calendar-day-digit-width)) (1- (point)) - `(mouse-face highlight help-echo ,(eval calendar-date-echo-text) - date t)) + (insert (propertize + (format (format "%%%dd" calendar-day-digit-width) day) + 'mouse-face 'highlight + 'help-echo (eval calendar-date-echo-text) + ;; 'date property prevents intermonth text confusing + ;; re-searches. (Tried intangible, it did not + ;; really work.) + 'date t) + (make-string + (- calendar-column-width calendar-day-digit-width) ?\s)) (when (and (zerop (mod (+ day blank-days) 7)) (/= day last)) (calendar-ensure-newline) -- 2.39.2