dot/emacs: Fix the date-format regexps to not eat a following time.
[profile] / dot / emacs
index 708ea7b..dc3da9b 100644 (file)
--- a/dot/emacs
+++ b/dot/emacs
 ;; Date format fiddling.
 
 (setq european-calendar-style t
-      calendar-date-style 'european)
-
-(setq diary-date-forms '((day "[-/]" month "[^-/0-9]")
-                        (day " *" monthname "[ \t]*\\(\^M\\|\n\\)")
-                        (backup day " *" monthname "\\W+\\<[^*0-9]")
-                        (day "[-/]" month "[-/]" year "[^0-9]")
-                        (day " *" monthname " *" year "[^0-9]")
-                        (year "[-/]" month "[-/]" day "[^0-9]")
-                        (dayname "\\W")))
+      calendar-date-style 'european
+      calendar-time-display-form
+      '(24-hours ":" minutes
+       (if time-zone " (") time-zone (if time-zone ")")))
+
+(setq diary-date-forms
+      '((day "[-/]" month "[^-/0-9]")
+       (day " *" monthname "[ \t]*\\(\^M\\|\n\\)")
+       (backup day " *" monthname "\\W+\\<\\([^*0-9]\\|[0-9]+[:aApP]\\)")
+       (day "[-/]" month "[-/]" year "[^0-9]")
+       (day " *" monthname " *" year "[^0-9]")
+       (year "[-/]" month "[-/]" day "[^0-9]")
+       (dayname "\\W")))
 
 ;; Fancy diary handling.
 
 (add-hook 'diary-display-hook 'fancy-diary-display)
 (setq diary-list-include-blanks t)
-(add-hook 'list-diary-entries-hook 'sort-diary-entries t)
-(add-hook 'list-diary-entries-hook 'include-other-diary-files)
-(add-hook 'mark-diary-entries-hook 'mark-included-diary-files)
+(cond ((mdw-emacs-version-p 23 1)
+       (add-hook 'list-diary-entries-hook 'diary-include-other-diary-files)
+       (add-hook 'mark-diary-entries-hook 'diary-mark-included-diary-files))
+      (t
+       (add-hook 'list-diary-entries-hook 'include-other-diary-files)
+       (add-hook 'mark-diary-entries-hook 'mark-included-diary-files)))
 
 ;; Appointment management.