From 0d4e1152a1c56dfa50bf2a581db83868ea7d6ff9 Mon Sep 17 00:00:00 2001 Message-Id: <0d4e1152a1c56dfa50bf2a581db83868ea7d6ff9.1717819451.git.mdw@distorted.org.uk> From: Mark Wooding Date: Sun, 20 Mar 2016 17:42:23 +0000 Subject: [PATCH] dot/emacs: Use newer diary hook functions if they're available. Organization: Straylight/Edgeware From: Mark Wooding --- dot/emacs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dot/emacs b/dot/emacs index 0903178..37e742d 100644 --- a/dot/emacs +++ b/dot/emacs @@ -394,8 +394,12 @@ (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. -- [mdw]