From 0b117f72a82143f544ef41cc82696337d496fe97 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Wed, 24 Feb 2021 23:43:12 -0500 Subject: [PATCH] agenda: Drop org-add-to-diary-list * lisp/org-agenda.el (org-add-to-diary-list): Remove. (org-diary-default-entry): Use diary-add-to-list directly. org-agenda has compatibility kludges for the rename of add-to-diary-list and the number of required arguments; both are no longer needed. The fourth argument has been optional since 22.1, and add-to-diary-list was marked as obsolete in favor of diary-add-to-list in Emacs 23.1 and removed in Emacs 25.1. --- lisp/org-agenda.el | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index aef642037..bb026f797 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -5275,15 +5275,7 @@ each date. It also removes lines that contain only whitespace." Needed to avoid empty dates which mess up holiday display." ;; Catch the error if dealing with the new add-to-diary-alist (when org-disable-agenda-to-diary - (condition-case nil - (org-add-to-diary-list original-date "Org mode dummy" "") - (error - (org-add-to-diary-list original-date "Org mode dummy" "" nil))))) - -(defun org-add-to-diary-list (&rest args) - (if (fboundp 'diary-add-to-list) - (apply 'diary-add-to-list args) - (apply 'add-to-diary-list args))) + (diary-add-to-list original-date "Org mode dummy" ""))) (defvar org-diary-last-run-time nil)