chiark / gitweb /
dot/emacs: Use newer diary hook functions if they're available.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 20 Mar 2016 17:42:23 +0000 (17:42 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 20 Mar 2016 17:42:23 +0000 (17:42 +0000)
dot/emacs

index 0903178c748d86598d82d37b2141b9f3734c3794..37e742d0f89ffe872733a73bb86dc6f139fbf175 100644 (file)
--- a/dot/emacs
+++ b/dot/emacs
 
 (add-hook 'diary-display-hook 'fancy-diary-display)
 (setq diary-list-include-blanks 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.