From e301c698be4a35e2548c607a32296fa53cca27cb Mon Sep 17 00:00:00 2001 From: Reiner Steib Date: Fri, 16 May 2008 21:26:45 +0000 Subject: [PATCH] (message-bogus-address-regexp): Fix and improve custom type. (message-setup-hook): Add message-check-recipients as custom option. --- lisp/ChangeLog | 6 ++++++ lisp/message.el | 14 ++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index db633e6a8..9f18620d9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2008-05-16 Reiner Steib + + * message.el (message-bogus-address-regexp): Fix and improve custom + type. + (message-setup-hook): Add message-check-recipients as custom option. + 2008-05-15 Reiner Steib * message.el (message-cite-function): Remove bogus autoload which crept diff --git a/lisp/message.el b/lisp/message.el index 8bc7f2031..ee8689921 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -4066,7 +4066,15 @@ not have PROP." "Regexp of potentially bogus mail addresses." :version "23.1" ;; No Gnus :group 'message-headers - :type 'regexp) + :type '(choice (const :tag "None" nil) + (repeat :value-to-internal (lambda (widget value) + (custom-split-regexp-maybe value)) + :match (lambda (widget value) + (or (stringp value) + (widget-editable-list-match widget value))) + regexp) + (const "noreply\\|nospam\\|invalid") + regexp)) (defun message-fix-before-sending () "Do various things to make the message nice before sending it." @@ -4152,7 +4160,7 @@ not have PROP." (forward-char) (skip-chars-forward mm-7bit-chars))))) (message-check 'bogus-recipient - ;; Warn before composing or sending a mail to an invalid address. + ;; Warn before sending a mail to an invalid address. (message-check-recipients))) (defun message-bogus-recipient-p (recipients) @@ -4199,6 +4207,8 @@ This function could be useful in `message-setup-hook'." "Address `%s' might be bogus. Continue? " bog))) (error "Bogus address.")))))))) +(custom-add-option 'message-setup-hook 'message-check-recipients) + (defun message-add-action (action &rest types) "Add ACTION to be performed when doing an exit of type TYPES." (while types -- 2.25.1