* lisp/calendar/calendar.el (calendar-generate-month):
authorGlenn Morris <rgm@gnu.org>
Mon, 5 Aug 2013 06:49:37 +0000 (23:49 -0700)
committerGlenn Morris <rgm@gnu.org>
Mon, 5 Aug 2013 06:49:37 +0000 (23:49 -0700)
Fix for calendar-column-width != 1 + calendar-day-digit-width.

lisp/ChangeLog
lisp/calendar/calendar.el

index 0c4240c..f7dbcfd 100644 (file)
@@ -1,3 +1,8 @@
+2013-08-05  Glenn Morris  <rgm@gnu.org>
+
+       * calendar/calendar.el (calendar-generate-month):
+       Fix for calendar-column-width != 1 + calendar-day-digit-width.
+
 2013-08-05  Juanma Barranquero  <lekktu@gmail.com>
 
        * desktop.el (desktop-clear): Use new name of sort predicate.
index 20a8684..00c6404 100644 (file)
@@ -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)