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.
This commit is contained in:
Kyle Meyer 2021-02-24 23:43:12 -05:00
parent 15c7385458
commit 0b117f72a8

View file

@ -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)