Fix some warnings in db-mail.el

This commit is contained in:
Daniel Borchmann 2025-06-22 11:03:28 +02:00
parent 762d035611
commit 09009552ae
No known key found for this signature in database
GPG Key ID: 50EA937BF472ADD1

View File

@ -177,11 +177,11 @@ will also be recognized when sending mail."
(defun db/smtpmail-send-it () (defun db/smtpmail-send-it ()
"Send prepared message in current buffer. "Send prepared message in current buffer.
This function uses `message-smtpmail-send-it, but sets This function uses `message-smtpmail-send-it, but sets
`smtpmail-smtp-server, `smtpmail-stream-type, `smtpmail-smtp-server, `smtpmail-stream-type, `smtpmail-smtp-service,
`smtpmail-smtp-service, and `smtpmail-smtp-user based on the and `smtpmail-smtp-user based on the entry of the \"From: \" header and
entry of the \"From: \" header and the value of the value of `db/mail-accounts."
`db/mail-accounts."
(let* ((from (or (save-restriction (let* ((from (or (save-restriction
(message-narrow-to-headers) (message-narrow-to-headers)
(mail-fetch-field "From")) (mail-fetch-field "From"))
@ -204,9 +204,9 @@ entry of the \"From: \" header and the value of
t t
"Settings %s for sending mail are not complete for account %s." "Settings %s for sending mail are not complete for account %s."
address) address)
(message-smtpmail-send-it))) (smtpmail-send-it)))
(if (yes-or-no-p "Sending with default account settings?") (if (yes-or-no-p "Sending with default account settings?")
(message-smtpmail-send-it) (smtpmail-send-it)
(message "Sending aborted as requested by user."))) (message "Sending aborted as requested by user.")))
;; in case of error, display the SMTP trace buffer if available ;; in case of error, display the SMTP trace buffer if available
(error (when-let ((smtp-trace-buffer (get-buffer (format "*trace of SMTP session to %s*" (error (when-let ((smtp-trace-buffer (get-buffer (format "*trace of SMTP session to %s*"
@ -219,7 +219,7 @@ entry of the \"From: \" header and the value of
;; Setting other Gnus accounts ;; Setting other Gnus accounts
(defun db/other-gnus-accounts--set-value (symbol value) (defun db/other-gnus-accounts--set-value (symbol value)
"Set SYMBOL to VALUE as needed by `db/other-gnus-accounts" "Set SYMBOL to VALUE as needed by `db/other-gnus-accounts."
(cl-assert (eq symbol 'db/other-gnus-accounts) (cl-assert (eq symbol 'db/other-gnus-accounts)
nil nil
"Only use `db/other-gnus-accounts--set-value for setting `db/other-gnus-accounts.") "Only use `db/other-gnus-accounts--set-value for setting `db/other-gnus-accounts.")
@ -361,4 +361,5 @@ METHOD specifies the encrypt method used. Can be either
(provide 'db-mail) (provide 'db-mail)
;;; db-mail ends here
;;; db-mail.el ends here