From: Mark Wooding Date: Sun, 20 Mar 2016 17:42:23 +0000 (+0000) Subject: dot/emacs: Use newer diary hook functions if they're available. X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/profile/commitdiff_plain/0d4e1152a1c56dfa50bf2a581db83868ea7d6ff9 dot/emacs: Use newer diary hook functions if they're available. --- 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.