aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/gnus/message.el34
1 files changed, 13 insertions, 21 deletions
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 4da5565a523..13d85d6f6ca 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -4476,6 +4476,17 @@ This function could be useful in `message-setup-hook'."
4476 4476
4477(declare-function hashcash-wait-async "hashcash" (&optional buffer)) 4477(declare-function hashcash-wait-async "hashcash" (&optional buffer))
4478 4478
4479(defun message--check-continuation-headers ()
4480 (message-check 'continuation-headers
4481 (goto-char (point-min))
4482 (while (re-search-forward "^[^ \t\n][^ \t\n:]*[ \t\n]" nil t)
4483 (goto-char (match-beginning 0))
4484 (if (y-or-n-p "Fix continuation lines? ")
4485 (insert " ")
4486 (forward-line 1)
4487 (unless (y-or-n-p "Send anyway? ")
4488 (error "Failed to send the message"))))))
4489
4479(defun message-send-mail (&optional _) 4490(defun message-send-mail (&optional _)
4480 (require 'mail-utils) 4491 (require 'mail-utils)
4481 (let* ((tembuf (message-generate-new-buffer-clone-locals " message temp")) 4492 (let* ((tembuf (message-generate-new-buffer-clone-locals " message temp"))
@@ -4527,15 +4538,7 @@ This function could be useful in `message-setup-hook'."
4527 (if news nil message-deletable-headers))) 4538 (if news nil message-deletable-headers)))
4528 (message-generate-headers headers)) 4539 (message-generate-headers headers))
4529 ;; Check continuation headers. 4540 ;; Check continuation headers.
4530 (message-check 'continuation-headers 4541 (message--check-continuation-headers)
4531 (goto-char (point-min))
4532 (while (re-search-forward "^[^ \t\n][^ \t\n:]*[ \t\n]" nil t)
4533 (goto-char (match-beginning 0))
4534 (if (y-or-n-p "Fix continuation lines? ")
4535 (insert " ")
4536 (forward-line 1)
4537 (unless (y-or-n-p "Send anyway? ")
4538 (error "Failed to send the message")))))
4539 (message--fold-long-headers) 4542 (message--fold-long-headers)
4540 ;; Let the user do all of the above. 4543 ;; Let the user do all of the above.
4541 (run-hooks 'message-header-hook)) 4544 (run-hooks 'message-header-hook))
@@ -5159,18 +5162,7 @@ Otherwise, generate and save a value for `canlock-password' first."
5159 (if (= (length errors) 1) "this" "these") 5162 (if (= (length errors) 1) "this" "these")
5160 (if (= (length errors) 1) "" "s") 5163 (if (= (length errors) 1) "" "s")
5161 (mapconcat 'identity errors ", "))))))) 5164 (mapconcat 'identity errors ", ")))))))
5162 ;; Check continuation headers. 5165 (message--check-continuation-headers)
5163 (message-check 'continuation-headers
5164 (goto-char (point-min))
5165 (let ((do-posting t))
5166 (while (re-search-forward "^[^ \t\n][^ \t\n:]*[ \t\n]" nil t)
5167 (goto-char (match-beginning 0))
5168 (if (y-or-n-p "Fix continuation lines? ")
5169 (insert " ")
5170 (forward-line 1)
5171 (unless (y-or-n-p "Send anyway? ")
5172 (setq do-posting nil))))
5173 do-posting))
5174 ;; Check the Newsgroups & Followup-To headers for syntax errors. 5166 ;; Check the Newsgroups & Followup-To headers for syntax errors.
5175 (message-check 'valid-newsgroups 5167 (message-check 'valid-newsgroups
5176 (let ((case-fold-search t) 5168 (let ((case-fold-search t)