mu4e: mark mu4e-sent-func as obsolete

mu4e-sent-func was used internally (triggered by mu-server), but is no
longer in use, so let's remove it and mark as obsolete.

Obsolete its callers as well.
This commit is contained in:
Dirk-Jan C. Binnema
2024-05-15 02:53:22 +03:00
parent a9495f7be5
commit 7c22e95b5e
4 changed files with 20 additions and 28 deletions

View File

@ -66,10 +66,10 @@
"Icalendar related settings."
:group 'mu4e)
(defcustom mu4e-icalendar-trash-after-reply nil
"If non-nil, trash the icalendar invitation after replying."
:type 'boolean
:group 'mu4e-icalendar)
;; (defcustom mu4e-icalendar-trash-after-reply nil
;; "If non-nil, trash the icalendar invitation after replying."
;; :type 'boolean
;; :group 'mu4e-icalendar)
(defcustom mu4e-icalendar-diary-file nil
"If non-nil, the file in which to add events upon reply."
@ -142,11 +142,12 @@
(mml-insert-empty-tag 'part 'type "text/plain")
(mml-attach-buffer ical-name
"text/calendar; method=REPLY; charset=UTF-8")
(when mu4e-icalendar-trash-after-reply
;; Override `mu4e-sent-handler' set by `mu4e-compose-mode' to
;; also trash the message (thus must be appended to hooks).
(add-hook 'message-sent-hook
(mu4e--icalendar-trash-message-hook msg) 90 t))
;; XXX: not currently supported
;;(when mu4e-icalendar-trash-after-reply
;; ;; Override `mu4e-sent-handler' set by `mu4e-compose-mode' to
;; ;; also trash the message (thus must be appended to hooks).
;; (add-hook 'message-sent-hook
;; (mu4e--icalendar-trash-message-hook msg) 90 t))
(when gnus-icalendar-org-enabled-p
(if (gnus-icalendar-find-org-event-file event)
@ -175,11 +176,11 @@
(or (mu4e-view-headers-next)
(kill-buffer-and-window))))))
(defun mu4e--icalendar-trash-message-hook (original-msg)
"Trash the iCalendar message ORIGINAL-MSG."
(lambda ()
(setq mu4e-sent-func
(mu4e--icalendar-trash-message original-msg))))
;; (defun mu4e--icalendar-trash-message-hook (original-msg)
;; "Trash the iCalendar message ORIGINAL-MSG."
;; (lambda ()
;; (setq mu4e-sent-func
;; (mu4e--icalendar-trash-message original-msg))))
(defun mu4e--icalendar-insert-diary (event reply-status filename)
"Insert a diary entry for the EVENT in file named FILENAME.