summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2013-08-04 23:49:37 -0700
committerGlenn Morris <rgm@gnu.org>2013-08-04 23:49:37 -0700
commit17f25e76c9d133226bddee6a77fe65a2fed5e8fe (patch)
treedfbdbbb2f55031c6af8adde1d6dab78320f76fa1 /lisp
parent063233c357f823efc7abd61469725a42da90a1a6 (diff)
downloademacs-17f25e76c9d133226bddee6a77fe65a2fed5e8fe.tar.gz
* lisp/calendar/calendar.el (calendar-generate-month):
Fix for calendar-column-width != 1 + calendar-day-digit-width.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/calendar/calendar.el19
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 <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.
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)