diff options
author | Glenn Morris <rgm@gnu.org> | 2011-02-03 19:23:55 -0800 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2011-02-03 19:23:55 -0800 |
commit | 9ad53e98fd3ac179a8498e867f7fc59bd9de0de3 (patch) | |
tree | 37a76bf48fbfd0a1e93dfbaf74c45df108c9dfb4 | |
parent | 9783df21c07728e68b59d380052ed9014f299f17 (diff) | |
download | emacs-9ad53e98fd3ac179a8498e867f7fc59bd9de0de3.tar.gz |
diary-lib.el fix for bug#7891.
* lisp/calendar/diary-lib.el (diary-font-lock-keywords):
Tweak diary-time-regexp match.
-rw-r--r-- | lisp/ChangeLog | 3 | ||||
-rw-r--r-- | lisp/calendar/diary-lib.el | 12 |
2 files changed, 14 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 58d30fc5007..93eaffde2cf 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2011-02-04 Glenn Morris <rgm@gnu.org> + * calendar/diary-lib.el (diary-font-lock-keywords): + Tweak diary-time-regexp match. (Bug#7891) + * progmodes/f90.el (f90-find-tag-default): New function. (Bug#7919) (f90-mode): Use it for mode's `find-tag-default-function' property. diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index f35f37e29ad..42080cd7eda 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el @@ -2312,9 +2312,19 @@ return a font-lock pattern matching array of MONTHS and marking SYMBOL." t)) '(1 font-lock-reference-face)) '(diary-font-lock-sexps . font-lock-keyword-face) + ;; Don't need to worry about space around "-" because the first + ;; match takes care of that. It does mean the "-" itself may or + ;; may not be fontified though. + ;; diary-date-forms often include a final character that is not + ;; part of the date (eg a non-digit to mark the end of the year). + ;; This can use up the only space char between a date and time (b#7891). + ;; Hence we use OVERRIDE, which can only override whitespace. + ;; FIXME it's probably better to tighten up the diary-time-regexp + ;; and drop the whitespace requirement below. `(,(format "\\(^\\|\\s-\\)%s\\(-%s\\)?" diary-time-regexp diary-time-regexp) - . 'diary-time)))) + . (0 'diary-time t))))) +; . 'diary-time)))) (defvar diary-font-lock-keywords (diary-font-lock-keywords) "Forms to highlight in `diary-mode'.") |