diff options
| author | Glenn Morris | 2013-08-04 23:54:30 -0700 |
|---|---|---|
| committer | Glenn Morris | 2013-08-04 23:54:30 -0700 |
| commit | 09e6d5475e16614a178ff90d0ac9f3b3d5197217 (patch) | |
| tree | 9026a4553f7f3fb3c3c514bf3dcdd1ab04db3082 | |
| parent | 17f25e76c9d133226bddee6a77fe65a2fed5e8fe (diff) | |
| download | emacs-09e6d5475e16614a178ff90d0ac9f3b3d5197217.tar.gz emacs-09e6d5475e16614a178ff90d0ac9f3b3d5197217.zip | |
* calendar/calendar.el (calendar-generate-month, calendar-font-lock-keywords):
Fix for calendar-day-header-width > length of any day name.
| -rw-r--r-- | lisp/ChangeLog | 2 | ||||
| -rw-r--r-- | lisp/calendar/calendar.el | 20 |
2 files changed, 11 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f7dbcfd3a27..0b766235e04 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -2,6 +2,8 @@ | |||
| 2 | 2 | ||
| 3 | * calendar/calendar.el (calendar-generate-month): | 3 | * calendar/calendar.el (calendar-generate-month): |
| 4 | Fix for calendar-column-width != 1 + calendar-day-digit-width. | 4 | Fix for calendar-column-width != 1 + calendar-day-digit-width. |
| 5 | (calendar-generate-month, calendar-font-lock-keywords): | ||
| 6 | Fix for calendar-day-header-width > length of any day name. | ||
| 5 | 7 | ||
| 6 | 2013-08-05 Juanma Barranquero <lekktu@gmail.com> | 8 | 2013-08-05 Juanma Barranquero <lekktu@gmail.com> |
| 7 | 9 | ||
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 00c6404af7c..d7e6ea68efa 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el | |||
| @@ -1532,9 +1532,7 @@ line." | |||
| 1532 | (progn | 1532 | (progn |
| 1533 | (setq string | 1533 | (setq string |
| 1534 | (calendar-day-name (mod (+ calendar-week-start-day i) 7) nil t)) | 1534 | (calendar-day-name (mod (+ calendar-week-start-day i) 7) nil t)) |
| 1535 | (if enable-multibyte-characters | 1535 | (truncate-string-to-width string calendar-day-header-width nil ?\s)) |
| 1536 | (truncate-string-to-width string calendar-day-header-width) | ||
| 1537 | (substring string 0 calendar-day-header-width))) | ||
| 1538 | (make-string (- calendar-column-width calendar-day-header-width) ?\s))) | 1536 | (make-string (- calendar-column-width calendar-day-header-width) ?\s))) |
| 1539 | (calendar-ensure-newline) | 1537 | (calendar-ensure-newline) |
| 1540 | (calendar-insert-at-column indent calendar-intermonth-text trunc) | 1538 | (calendar-insert-at-column indent calendar-intermonth-text trunc) |
| @@ -1548,9 +1546,8 @@ line." | |||
| 1548 | (format (format "%%%dd" calendar-day-digit-width) day) | 1546 | (format (format "%%%dd" calendar-day-digit-width) day) |
| 1549 | 'mouse-face 'highlight | 1547 | 'mouse-face 'highlight |
| 1550 | 'help-echo (eval calendar-date-echo-text) | 1548 | 'help-echo (eval calendar-date-echo-text) |
| 1551 | ;; 'date property prevents intermonth text confusing | 1549 | ;; 'date property prevents intermonth text confusing re-searches. |
| 1552 | ;; re-searches. (Tried intangible, it did not | 1550 | ;; (Tried intangible, it did not really work.) |
| 1553 | ;; really work.) | ||
| 1554 | 'date t) | 1551 | 'date t) |
| 1555 | (make-string | 1552 | (make-string |
| 1556 | (- calendar-column-width calendar-day-digit-width) ?\s)) | 1553 | (- calendar-column-width calendar-day-digit-width) ?\s)) |
| @@ -2292,14 +2289,15 @@ Negative years are interpreted as years BC; -1 being 1 BC, and so on." | |||
| 2292 | " -?[0-9]+") | 2289 | " -?[0-9]+") |
| 2293 | . font-lock-function-name-face) | 2290 | . font-lock-function-name-face) |
| 2294 | (,(regexp-opt | 2291 | (,(regexp-opt |
| 2295 | (list (substring (aref calendar-day-name-array 6) | 2292 | (list (truncate-string-to-width (aref calendar-day-name-array 6) |
| 2296 | 0 calendar-day-header-width) | 2293 | calendar-day-header-width) |
| 2297 | (substring (aref calendar-day-name-array 0) | 2294 | (truncate-string-to-width (aref calendar-day-name-array 0) |
| 2298 | 0 calendar-day-header-width))) | 2295 | calendar-day-header-width))) |
| 2299 | ;; Saturdays and Sundays are highlighted differently. | 2296 | ;; Saturdays and Sundays are highlighted differently. |
| 2300 | . font-lock-comment-face) | 2297 | . font-lock-comment-face) |
| 2301 | ;; First two chars of each day are used in the calendar. | 2298 | ;; First two chars of each day are used in the calendar. |
| 2302 | (,(regexp-opt (mapcar (lambda (x) (substring x 0 calendar-day-header-width)) | 2299 | (,(regexp-opt (mapcar (lambda (x) (truncate-string-to-width |
| 2300 | x calendar-day-header-width)) | ||
| 2303 | calendar-day-name-array)) | 2301 | calendar-day-name-array)) |
| 2304 | . font-lock-constant-face)) | 2302 | . font-lock-constant-face)) |
| 2305 | "Default keywords to highlight in Calendar mode.") | 2303 | "Default keywords to highlight in Calendar mode.") |