summaryrefslogtreecommitdiff
path: root/lisp/mail
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/mail')
-rw-r--r--lisp/mail/rmail.el21
-rw-r--r--lisp/mail/rmailout.el8
-rw-r--r--lisp/mail/rmailsum.el5
-rw-r--r--lisp/mail/smtpmail.el2
4 files changed, 25 insertions, 11 deletions
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 1ab32aba45d..4fe936d9d2d 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -543,7 +543,11 @@ This is set to nil by default.")
"*If non-nil, RMAIL uses MIME feature.
If the value is t, RMAIL automatically shows MIME decoded message.
If the value is neither t nor nil, RMAIL does not show MIME decoded message
-until a user explicitly requires it."
+until a user explicitly requires it.
+
+Even if the value is non-nil, you can't use MIME feature
+if the feature specified by `rmail-mime-feature' is not available
+in your session."
:type '(choice (const :tag "on" t)
(const :tag "off" nil)
(other :tag "when asked" ask))
@@ -595,7 +599,10 @@ LIMIT is the position specifying the end of header.")
(defvar rmail-mime-feature 'rmail-mime
"Feature to require to load MIME support in Rmail.
When starting Rmail, if `rmail-enable-mime' is non-nil,
-this feature is required with `require'.")
+this feature is required with `require'.
+
+The default value is `rmail-mime'. This feature is provided by
+the rmail-mime package available at <http://www.m17n.org/rmail-mime/>.")
;;;###autoload
(defvar rmail-decode-mime-charset t
@@ -735,8 +742,14 @@ isn't provided."
(condition-case err
(require rmail-mime-feature)
(error
- (message "Feature `%s' not provided" rmail-mime-feature)
- (sit-for 1)
+ (display-warning
+ :warning
+ (format "Although MIME support is requested
+by setting `rmail-enable-mime' to non-nil, the required feature
+`%s' (the value of `rmail-mime-feature')
+is not available in the current session.
+So, the MIME support is turned off for the moment."
+ rmail-mime-feature))
(setq rmail-enable-mime nil)))))
diff --git a/lisp/mail/rmailout.el b/lisp/mail/rmailout.el
index 97654ae92c5..bd37a41aef8 100644
--- a/lisp/mail/rmailout.el
+++ b/lisp/mail/rmailout.el
@@ -349,9 +349,11 @@ The optional fourth argument FROM-GNUS is set when called from GNUS."
(mail-fetch-field "sender")
"unknown"))
" " (current-time-string) "\n"))
- (if mime-version
- (insert "MIME-Version: " mime-version
- "\nContent-type: " content-type "\n"))
+ (when mime-version
+ (insert "MIME-Version: " mime-version)
+ ;; Some malformed MIME messages set content-type to nil.
+ (when content-type
+ (insert "\nContent-type: " content-type "\n")))
;; ``Quote'' "\nFrom " as "\n>From "
;; (note that this isn't really quoting, as there is no requirement
;; that "\n[>]+From " be quoted in the same transparent way.)
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el
index e9ddb83baf3..47602885f92 100644
--- a/lisp/mail/rmailsum.el
+++ b/lisp/mail/rmailsum.el
@@ -332,9 +332,8 @@ By default, `identity' is set."
(if (looking-at "Summary-line: ")
(progn
(goto-char (match-end 0))
- (setq line
- (buffer-substring (point)
- (progn (forward-line 1) (point)))))))))
+ (buffer-substring (point)
+ (progn (forward-line 1) (point))))))))
;; Obsolete status lines lacking a # should be flushed.
(and line
(not (string-match "#" line))
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el
index 4c7e99601b8..6cbd3e3b8f8 100644
--- a/lisp/mail/smtpmail.el
+++ b/lisp/mail/smtpmail.el
@@ -365,7 +365,7 @@ This is relative to `smtpmail-queue-dir'.")
(make-directory smtpmail-queue-dir t))
(with-current-buffer buffer-data
(erase-buffer)
- (insert-buffer-contents tembuf)
+ (insert-buffer-substring tembuf)
(write-file file-data)
(set-buffer buffer-elisp)
(erase-buffer)