(unless (yes-or-no-p
"Invisible text found and made visible; continue sending? ")
(error "Invisible text found and made visible")))))
- (message-check 'illegible-text
- (let ((mm-7bit-chars "\x20-\x7f\r\n\t\x7\x8\xb\xc\x1f\x1b")
- found choice)
- (message-goto-body)
- (skip-chars-forward mm-7bit-chars)
- (while (not (eobp))
- (when (let ((char (char-after)))
- (or (< (mm-char-int char) 128)
- (and (mm-multibyte-p)
- (> (length (mm-find-mime-charset-region
- (point) (point-max)))
- 1))))
- (message-overlay-put (message-make-overlay (point) (1+ (point)))
- 'face 'highlight)
- (setq found t))
- (forward-char)
- (skip-chars-forward mm-7bit-chars))
- (when found
- (setq choice
- (gnus-multiple-choice
- "Non-printable characters found. Continue sending?"
- '((?d "Remove non-printable characters and send")
- (?r "Replace non-printable characters with dots and send")
- (?i "Ignore non-printable characters and send")
- (?e "Continue editing"))))
- (if (eq choice ?e)
- (error "Non-printable characters"))
- (message-goto-body)
- (skip-chars-forward mm-7bit-chars)
- (while (not (eobp))
- (when (let ((char (char-after)))
- (or (< (mm-char-int char) 128)
- (and (mm-multibyte-p)
- ;; Fixme: Wrong for Emacs 22 and for things
- ;; like undecable utf-8. Should at least
- ;; use find-coding-systems-region.
- (memq (char-charset char)
- '(eight-bit-control eight-bit-graphic
- control-1)))))
- (if (eq choice ?i)
- (message-kill-all-overlays)
- (delete-char 1)
- (when (eq choice ?r)
- (insert "."))))
- (forward-char)
- (skip-chars-forward mm-7bit-chars))))))
+;; The following check is needless to T-gnus since T-gnus determines
+;; a MIME charset forcibly (even if it cannot be determined properly,
+;; the value of the `default-mime-charset-for-write' variable is used).
+;; (message-check 'illegible-text
+;; (let ((mm-7bit-chars "\x20-\x7f\r\n\t\x7\x8\xb\xc\x1f\x1b")
+;; found choice)
+;; (message-goto-body)
+;; (skip-chars-forward mm-7bit-chars)
+;; (while (not (eobp))
+;; (when (let ((char (char-after)))
+;; (or (< (mm-char-int char) 128)
+;; (and (mm-multibyte-p)
+;; (> (length (mm-find-mime-charset-region
+;; (point) (point-max)))
+;; 1))))
+;; (message-overlay-put (message-make-overlay (point) (1+ (point)))
+;; 'face 'highlight)
+;; (setq found t))
+;; (forward-char)
+;; (skip-chars-forward mm-7bit-chars))
+;; (when found
+;; (setq choice
+;; (gnus-multiple-choice
+;; "Non-printable characters found. Continue sending?"
+;; '((?d "Remove non-printable characters and send")
+;; (?r "Replace non-printable characters with dots and send")
+;; (?i "Ignore non-printable characters and send")
+;; (?e "Continue editing"))))
+;; (if (eq choice ?e)
+;; (error "Non-printable characters"))
+;; (message-goto-body)
+;; (skip-chars-forward mm-7bit-chars)
+;; (while (not (eobp))
+;; (when (let ((char (char-after)))
+;; (or (< (mm-char-int char) 128)
+;; (and (mm-multibyte-p)
+;; ;; Fixme: Wrong for Emacs 22 and for things
+;; ;; like undecable utf-8. Should at least
+;; ;; use find-coding-systems-region.
+;; (memq (char-charset char)
+;; '(eight-bit-control eight-bit-graphic
+;; control-1)))))
+;; (if (eq choice ?i)
+;; (message-kill-all-overlays)
+;; (delete-char 1)
+;; (when (eq choice ?r)
+;; (insert "."))))
+;; (forward-char)
+;; (skip-chars-forward mm-7bit-chars)))))
+ )
(defun message-add-action (action &rest types)
"Add ACTION to be performed when doing an exit of type TYPES."