summaryrefslogtreecommitdiff
path: root/lisp/mail
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>2015-04-05 08:36:56 -0400
committerRichard Stallman <rms@gnu.org>2015-04-05 08:42:43 -0400
commit4e23cd0ccde4ad1e14fe2870ccf140487af649b2 (patch)
treeb709ac1e92a892f6ec1faa85eb59a9e5960c25dd /lisp/mail
parentdca743f0941909a80e3f28c023977120b6203e20 (diff)
parent16eec6fc55dcc05d1d819f18998e84a9580b2521 (diff)
downloademacs-4e23cd0ccde4ad1e14fe2870ccf140487af649b2.tar.gz
* mail/rmail.el (rmail-show-message-1): When displaying a mime message,
indicate start and finish in the echo area. * mail/rmail.el (rmail-epa-decrypt): Disregard <pre> before armor. Ignore more kinds of whitespace in mime headers. Modify the decrypted mime part's mime type so it will be displayed by default when visiting this message again. * net/browse-url.el (browse-url-firefox-program): Prefer IceCat, doc. (browse-url-firefox-arguments) (browse-url-firefox-startup-arguments): Doc fix.
Diffstat (limited to 'lisp/mail')
-rw-r--r--lisp/mail/rmail.el4
-rw-r--r--lisp/mail/rmailmm.el17
-rw-r--r--lisp/mail/rmailsum.el17
-rw-r--r--lisp/mail/sendmail.el8
4 files changed, 30 insertions, 16 deletions
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 790254a6312..d150324fc79 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -4744,7 +4744,7 @@ With prefix argument N moves forward N messages with these labels.
;;;***
-;;;### (autoloads nil "rmailmm" "rmailmm.el" "43e0b9f680c4d2581640b286bd4b3107")
+;;;### (autoloads nil "rmailmm" "rmailmm.el" "a17df5ef8968113c8f6a78cf85c82da4")
;;; Generated autoloads from rmailmm.el
(autoload 'rmail-mime "rmailmm" "\
@@ -4841,7 +4841,7 @@ If prefix argument REVERSE is non-nil, sorts in reverse order.
;;;***
-;;;### (autoloads nil "rmailsum" "rmailsum.el" "e3943ef45946f10b9b5cab8097d7f271")
+;;;### (autoloads nil "rmailsum" "rmailsum.el" "3203e61425330fc20f3154b559f8b539")
;;; Generated autoloads from rmailsum.el
(autoload 'rmail-summary "rmailsum" "\
diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el
index 120d517f55c..00fc25dd440 100644
--- a/lisp/mail/rmailmm.el
+++ b/lisp/mail/rmailmm.el
@@ -661,6 +661,7 @@ HEADER is a header component of a MIME-entity object (see
(transfer-encoding (rmail-mime-entity-transfer-encoding entity))
(charset (cdr (assq 'charset (cdr (rmail-mime-entity-type entity)))))
(buffer (current-buffer))
+ (case-fold-search t)
coding-system)
(if charset (setq coding-system (coding-system-from-name charset)))
(or (and coding-system (coding-system-p coding-system))
@@ -674,6 +675,22 @@ HEADER is a header component of a MIME-entity object (see
(ignore-errors (base64-decode-region (point-min) (point-max))))
((string= transfer-encoding "quoted-printable")
(quoted-printable-decode-region (point-min) (point-max))))
+ ;; Some broken MUAs state the charset only in the HTML <head>,
+ ;; so if we don't have a non-trivial coding-system at this
+ ;; point, make one last attempt to find it there.
+ (if (eq coding-system 'undecided)
+ (save-excursion
+ (goto-char (point-min))
+ (when (re-search-forward
+ "^<html><head><meta[^;]*; charset=\\([-a-zA-Z0-9]+\\)"
+ nil t)
+ (setq coding-system (coding-system-from-name (match-string 1)))
+ (or (and coding-system (coding-system-p coding-system))
+ (setq coding-system 'undecided)))
+ ;; Finally, let them manually force decoding if they know it.
+ (if (and (eq coding-system 'undecided)
+ (not (null coding-system-for-read)))
+ (setq coding-system coding-system-for-read))))
(decode-coding-region (point-min) (point) coding-system)
(if (and
(or (not rmail-mime-coding-system) (consp rmail-mime-coding-system))
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el
index 7ac147b87d7..7144e43d301 100644
--- a/lisp/mail/rmailsum.el
+++ b/lisp/mail/rmailsum.el
@@ -1,7 +1,6 @@
;;; rmailsum.el --- make summary buffers for the mail reader
-;; Copyright (C) 1985, 1993-1996, 2000-2015 Free Software Foundation,
-;; Inc.
+;; Copyright (C) 1985, 1993-1996, 2000-2015 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: mail
@@ -791,7 +790,7 @@ the message being processed."
(forward-line 1)
(setq str (buffer-substring pos (1- (point))))
(while (looking-at "[ \t]")
- (setq str (concat str " "
+ (setq str (concat str " "
(buffer-substring (match-end 0)
(line-end-position))))
(forward-line 1))
@@ -804,7 +803,8 @@ the message being processed."
(defun rmail-summary-next-all (&optional number)
(interactive "p")
- (forward-line (if number number 1))
+ (or number (setq number 1))
+ (forward-line number)
;; It doesn't look nice to move forward past the last message line.
(and (eobp) (> number 0)
(forward-line -1))
@@ -812,17 +812,14 @@ the message being processed."
(defun rmail-summary-previous-all (&optional number)
(interactive "p")
- (forward-line (- (if number number 1)))
- ;; It doesn't look nice to move forward past the last message line.
- (and (eobp) (< number 0)
- (forward-line -1))
- (display-buffer rmail-buffer))
+ (rmail-summary-next-all (- (or number 1))))
(defun rmail-summary-next-msg (&optional number)
"Display next non-deleted msg from rmail file.
With optional prefix argument NUMBER, moves forward this number of non-deleted
messages, or backward if NUMBER is negative."
(interactive "p")
+ (or number (setq number 1))
(forward-line 0)
(and (> number 0) (end-of-line))
(let ((count (if (< number 0) (- number) number))
@@ -840,7 +837,7 @@ messages, or backward if NUMBER is negative."
With optional prefix argument NUMBER, moves backward this number of
non-deleted messages."
(interactive "p")
- (rmail-summary-next-msg (- (if number number 1))))
+ (rmail-summary-next-msg (- (or number 1))))
(defun rmail-summary-next-labeled-message (n labels)
"Show next message with LABELS. Defaults to last labels used.
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index 7e9bd5bca2f..9fa7aa5a6f2 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -1299,10 +1299,10 @@ external program defined by `sendmail-program'."
(error "Sending...failed to %s"
(buffer-substring (point-min) (point-max)))))))
(kill-buffer tembuf)
- (if (and (bufferp errbuf)
- (not error))
- (kill-buffer errbuf)
- (switch-to-buffer-other-window errbuf)))))
+ (when (buffer-live-p errbuf)
+ (if error
+ (switch-to-buffer-other-window errbuf)
+ (kill-buffer errbuf))))))
(autoload 'rmail-output-to-rmail-buffer "rmailout")