[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r106438: Small rmail fixes.
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r106438: Small rmail fixes. |
Date: |
Sat, 19 Nov 2011 18:23:48 -0800 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 106438
fixes bug(s): http://debbugs.gnu.org/10077
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Sat 2011-11-19 18:23:48 -0800
message:
Small rmail fixes.
* lisp/mail/rmail.el (rmail-enable-mime-composing): Make it a defcustom.
(rmail-insert-mime-forwarded-message-function, rmail-mime-feature):
Doc fixes.
(rmail-decode-mime-charset): Mark as obsolete.
* lisp/mail/rmailsum.el (rmail-message-regexp-p-1):
* lisp/mail/rmail.el (rmail-search-message, rmail-forward, rmail-resend):
Before using mime functions, check they are set.
modified:
lisp/ChangeLog
lisp/mail/rmail.el
lisp/mail/rmailsum.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-11-19 23:34:40 +0000
+++ b/lisp/ChangeLog 2011-11-20 02:23:48 +0000
@@ -1,3 +1,14 @@
+2011-11-20 Glenn Morris <address@hidden>
+
+ * mail/rmail.el (rmail-enable-mime-composing): Make it a defcustom.
+ (rmail-insert-mime-forwarded-message-function, rmail-mime-feature):
+ Doc fixes.
+ (rmail-decode-mime-charset): Mark as obsolete.
+
+ * mail/rmailsum.el (rmail-message-regexp-p-1):
+ * mail/rmail.el (rmail-search-message, rmail-forward, rmail-resend):
+ Before using mime functions, check they are set. (Bug#10077)
+
2011-11-19 Juri Linkov <address@hidden>
* info.el (Info-finder-find-node): Use `package--builtins' instead
=== modified file 'lisp/mail/rmail.el'
--- a/lisp/mail/rmail.el 2011-11-16 11:22:17 +0000
+++ b/lisp/mail/rmail.el 2011-11-20 02:23:48 +0000
@@ -638,8 +638,11 @@
:version "23.3"
:group 'rmail)
-(defvar rmail-enable-mime-composing t
- "*If non-nil, RMAIL uses `rmail-insert-mime-forwarded-message-function' to
forward.")
+(defcustom rmail-enable-mime-composing t
+ "If non-nil, use `rmail-insert-mime-forwarded-message-function' to forward."
+ :type 'boolean
+ :version "24.1" ; nil -> t
+ :group 'rmail)
(defvar rmail-show-mime-function nil
"Function of no argument called to show a decoded MIME message.
@@ -649,8 +652,8 @@
;;;###autoload
(defvar rmail-insert-mime-forwarded-message-function nil
"Function to insert a message in MIME format so it can be forwarded.
-This function is called if `rmail-enable-mime' or
-`rmail-enable-mime-composing' is non-nil.
+This function is called if `rmail-enable-mime' and
+`rmail-enable-mime-composing' are non-nil.
It is called with one argument FORWARD-BUFFER, which is a
buffer containing the message to forward. The current buffer
is the outgoing mail buffer.")
@@ -681,12 +684,17 @@
(defvar rmail-mime-feature 'rmailmm
"Feature to require for MIME support in Rmail.
-When starting Rmail, if `rmail-enable-mime' is non-nil,
-this feature is required with `require'.
-
-The default value is `rmailmm'")
-
-;; FIXME this is unused.
+When starting Rmail, if `rmail-enable-mime' is non-nil, this
+feature is loaded with `require'. The default value is `rmailmm'.
+
+The library should set the variable `rmail-show-mime-function'
+to an appropriate value, and optionally also set
+`rmail-search-mime-message-function',
+`rmail-search-mime-header-function',
+`rmail-insert-mime-forwarded-message-function', and
+`rmail-insert-mime-resent-message-function'.")
+
+;; FIXME this is unused since 23.1.
(defvar rmail-decode-mime-charset t
"*Non-nil means a message is decoded by MIME's charset specification.
If this variable is nil, or the message has not MIME specification,
@@ -696,6 +704,9 @@
ignored, and all the decoding work is done by a feature specified by
the variable `rmail-mime-feature'.")
+(make-obsolete-variable 'rmail-decode-mime-charset
+ "it does nothing." "23.1")
+
(defvar rmail-mime-charset-pattern
(concat "^content-type:[ \t]*text/plain;"
"\\(?:[ \t\n]*\\(?:format\\|delsp\\)=\"?[-a-z0-9]+\"?;\\)*"
@@ -3128,10 +3139,9 @@
;; This is adequate because its only caller, rmail-search,
;; unswaps the buffers.
(goto-char (rmail-msgbeg msg))
- (if rmail-enable-mime
- (if rmail-search-mime-message-function
- (funcall rmail-search-mime-message-function msg regexp)
- (error "You must set `rmail-search-mime-message-function'"))
+ (if (and rmail-enable-mime
+ rmail-search-mime-message-function)
+ (funcall rmail-search-mime-message-function msg regexp)
(re-search-forward regexp (rmail-msgend msg) t)))
(defvar rmail-search-last-regexp nil)
@@ -3798,7 +3808,8 @@
;; Insert after header separator--before signature if any.
(rfc822-goto-eoh)
(forward-line 1)
- (if (and rmail-enable-mime rmail-enable-mime-composing)
+ (if (and rmail-enable-mime rmail-enable-mime-composing
+ rmail-insert-mime-forwarded-message-function)
(prog1
(funcall rmail-insert-mime-forwarded-message-function
forward-buffer)
@@ -3854,10 +3865,9 @@
(unwind-protect
(with-current-buffer tembuf
;;>> Copy message into temp buffer
- (if rmail-enable-mime
- (if rmail-insert-mime-resent-message-function
+ (if (and rmail-enable-mime
+ rmail-insert-mime-resent-message-function)
(funcall rmail-insert-mime-resent-message-function mailbuf)
- (error "You must set
`rmail-insert-mime-resent-message-function'"))
(insert-buffer-substring mailbuf))
(goto-char (point-min))
;; Delete any Sender field, since that's not specifiable.
=== modified file 'lisp/mail/rmailsum.el'
--- a/lisp/mail/rmailsum.el 2011-11-14 09:22:45 +0000
+++ b/lisp/mail/rmailsum.el 2011-11-20 02:23:48 +0000
@@ -342,10 +342,9 @@
(defun rmail-message-regexp-p-1 (msg regexp)
;; Search functions can expect to start from the beginning.
(narrow-to-region (point) (save-excursion (search-forward "\n\n") (point)))
- (if rmail-enable-mime
- (if rmail-search-mime-header-function
- (funcall rmail-search-mime-header-function msg regexp (point))
- (error "You must set `rmail-search-mime-header-function'"))
+ (if (and rmail-enable-mime
+ rmail-search-mime-header-function)
+ (funcall rmail-search-mime-header-function msg regexp (point))
(re-search-forward regexp nil t)))
;;;###autoload
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r106438: Small rmail fixes.,
Glenn Morris <=