]> code.delx.au - gnu-emacs/blobdiff - lisp/calendar/calendar.el
(generate-calendar-month): Make highlighted text for mouse-2 a full column (2
[gnu-emacs] / lisp / calendar / calendar.el
index a1661e106f4da80fb7a49a2b086f08aa0bce3168..2cf4dc76f928bfba8024f9625af2e2ac53c44ee8 100644 (file)
@@ -1407,8 +1407,7 @@ characters on the line."
    ;; Put in the days of the month
    (calendar-for-loop i from 1 to last do
       (insert (format "%2d " i))
-      (put-text-property (- (point) (if (< i 10) 2 3)) (1- (point))
-                        'mouse-face 'highlight)
+      (put-text-property (- (point) 3) (1- (point)) 'mouse-face 'highlight)
       (and (zerop (calendar-mod (+ i blank-days) 7))
            (/= i last)
            (calendar-insert-indented "" 0 t)    ;; Force onto following line
@@ -1983,12 +1982,13 @@ ERROR is t, otherwise just returns nil."
           (list month
                 (string-to-int (buffer-substring (1+ (point)) (+ 4 (point))))
                 year))
-      (if (and (looking-at "\\*")
-              (save-excursion
-                (re-search-backward "[^*]")
-                (looking-at ".\\*\\*")))
-         (list month calendar-starred-day year)
-       (if error (error "Cursor is not on a date!"))))))
+      (if (looking-at "\\*")
+          (save-excursion
+            (re-search-backward "[^*]")
+            (if (looking-at ".\\*\\*")
+                (list month calendar-starred-day year)
+              (if error (error "Not on a date!"))))
+        (if error (error "Not on a date!"))))))
 
 (defun calendar-cursor-to-nearest-date ()
   "Move the cursor to the closest date.
@@ -2721,7 +2721,7 @@ Defaults to today's date if DATE is not given."
              (or date (calendar-current-date))))
          (day (% d 7))
          (iso-date (calendar-iso-from-absolute d)))
-    (format "Day %s of week %d of %d."
+    (format "Day %s of week %d of %d"
             (if (zerop day) 7 day)
             (extract-calendar-month iso-date)
             (extract-calendar-year iso-date))))