From: Glenn Morris Date: Tue, 15 Nov 2011 08:23:03 +0000 (-0800) Subject: Small rmail and rmailmm changes, many doc fixes. X-Git-Tag: emacs-pretest-24.0.92~178 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=45261b503cea5ddf9dc2cbdf294c68b053875eb4;p=emacs.git 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. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 95834e81a8d..91724c54e84 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2011-11-15 Glenn Morris + + * 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 * epg.el (epg-start-decrypt, epg-start-verify, epg-start-sign) diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 4ecd1c2fd0d..d1322915aba 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -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)) diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el index 45f7fe24f26..46cd4bbfb37 100644 --- a/lisp/mail/rmailmm.el +++ b/lisp/mail/rmailmm.el @@ -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)