Commit 45261b50 authored by Glenn Morris's avatar Glenn Morris

Small rmail and rmailmm changes, many doc fixes.

* lisp/mail/rmail.el (rmail-file-coding-system): It's only ever used
in a boolean sense, so just make it a boolean, and fix the doc.
(rmail-show-mime-function, rmail-mime-feature)
(rmail-require-mime-maybe): Doc fixes.
(rmail-show-message-1): Check rmail-show-mime-function is non-nil.

* lisp/mail/rmailmm.el (rmail-show-mime): Doc fix.
parent da6062e6
2011-11-15 Glenn Morris <rgm@gnu.org>
* mail/rmail.el (rmail-file-coding-system): It's only ever used
in a boolean sense, so just make it a boolean, and fix the doc.
(rmail-show-mime-function, rmail-mime-feature)
(rmail-require-mime-maybe): Doc fixes.
(rmail-show-message-1): Check rmail-show-mime-function is non-nil.
* mail/rmailmm.el (rmail-show-mime): Doc fix.
2011-11-15 Juanma Barranquero <lekktu@gmail.com>
* epg.el (epg-start-decrypt, epg-start-verify, epg-start-sign)
......
......@@ -631,27 +631,20 @@ Element N specifies the summary line for message N+1.")
This is set to nil by default.")
(defcustom rmail-enable-mime t
"If non-nil, RMAIL uses MIME features.
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.
Even if the value is non-nil, you can't use MIME features
unless the feature specified by `rmail-mime-feature' is available."
:type '(choice (const :tag "on" t)
(const :tag "off" nil)
(other :tag "when asked" ask))
"If non-nil, RMAIL automatically displays decoded MIME messages.
For this to work, the feature specified by `rmail-mime-feature' must
be available."
:type 'boolean
:version "23.3"
:group 'rmail)
(defvar rmail-enable-mime-composing t
"*If non-nil, RMAIL uses `rmail-insert-mime-forwarded-message-function' to forward.")
;; FIXME unused.
(defvar rmail-show-mime-function nil
"Function to show MIME decoded message of RMAIL file.
"Function of no argument called to show a decoded MIME message.
This function is called when `rmail-enable-mime' is non-nil.
It is called with no argument.")
The package providing MIME support should set this.")
;;;###autoload
(defvar rmail-insert-mime-forwarded-message-function nil
......@@ -687,7 +680,7 @@ where MSG is the message number, REGEXP is the regular
expression, LIMIT is the position specifying the end of header.")
(defvar rmail-mime-feature 'rmailmm
"Feature to require to load MIME support in Rmail.
"Feature to require for MIME support in Rmail.
When starting Rmail, if `rmail-enable-mime' is non-nil,
this feature is required with `require'.
......@@ -837,10 +830,10 @@ isn't provided."
(display-warning
'rmail
(format "Although MIME support is requested
by setting `rmail-enable-mime' to non-nil, the required feature
through `rmail-enable-mime' being 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."
So, MIME support is turned off for the moment."
rmail-mime-feature)
:warning)
(setq rmail-enable-mime nil)))))
......@@ -2700,6 +2693,7 @@ The current mail message becomes the message displayed."
;; inspect this value to determine how to toggle.
(set (make-local-variable 'rmail-header-style) header-style))
(if (and rmail-enable-mime
rmail-show-mime-function
(re-search-forward "mime-version: 1.0" nil t))
(let ((rmail-buffer mbox-buf)
(rmail-view-buffer view-buf))
......
......@@ -1319,7 +1319,7 @@ attachments as specified by `rmail-mime-attachment-dirs-alist'."
message type disposition encoding))
(defun rmail-show-mime ()
"Function to set in `rmail-show-mime-function' (which see)."
"Function to use for the value of `rmail-show-mime-function'."
(let ((entity (rmail-mime-parse))
(rmail-mime-mbox-buffer rmail-buffer)
(rmail-mime-view-buffer rmail-view-buffer)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment