aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/mail
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/mail')
-rw-r--r--lisp/mail/emacsbug.el2
-rw-r--r--lisp/mail/rmail.el22
-rw-r--r--lisp/mail/sendmail.el10
3 files changed, 17 insertions, 17 deletions
diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el
index cbe14052e1..c4592aca66 100644
--- a/lisp/mail/emacsbug.el
+++ b/lisp/mail/emacsbug.el
@@ -151,7 +151,7 @@ usually do not have translators to read other languages for them.\n\n")
'(lambda (var)
(insert (format " value of $%s: %s\n" var (getenv var))))
'("LC_ALL" "LC_COLLATE" "LC_CTYPE" "LC_MESSAGES"
- "LC_MONETARY" "LC_NUMERIC" "LC_TIME" "LANG"))
+ "LC_MONETARY" "LC_NUMERIC" "LC_TIME" "LANG" "XMODIFIERS"))
(insert (format " locale-coding-system: %s\n" locale-coding-system))
(insert (format " default-enable-multibyte-characters: %s\n"
default-enable-multibyte-characters))
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 5c0412fa2b..1bc787946a 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -934,17 +934,17 @@ Note: it means the file has no messages in it.\n\^_")))
(unless (and coding-system
(coding-system-p coding-system))
(setq coding-system
- ;; Emacs 21.1 and later writes RMAIL files in emacs-mule, but
- ;; earlier versions did that with the current buffer's encoding.
- ;; So we want to favor detection of emacs-mule (whose normal
- ;; priority is quite low), but still allow detection of other
- ;; encodings if emacs-mule won't fit. The call to
- ;; detect-coding-with-priority below achieves that.
- (car (detect-coding-with-priority
- from to
- '((coding-category-emacs-mule . emacs-mule))))))
- (unless (memq coding-system
- '(undecided undecided-unix))
+ ;; If rmail-file-coding-system is nil, Emacs 21 writes
+ ;; RMAIL files in emacs-mule, Emacs 22 in utf-8, but
+ ;; earlier versions did that with the current buffer's
+ ;; encoding. So we want to favor detection of emacs-mule
+ ;; (whose normal priority is quite low) and utf-8, but
+ ;; still allow detection of other encodings if they won't
+ ;; fit. The call to with-coding-priority below achieves
+ ;; that.
+ (with-coding-priority '(emacs-mule utf-8)
+ (detect-coding-region from to 'highest))))
+ (unless (eq (coding-system-type coding-system) 'undecided)
(set-buffer-modified-p t) ; avoid locking when decoding
(let ((buffer-undo-list t))
(decode-coding-region from to coding-system))
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index 2bb1a6ed0f..b0a8628d08 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -1090,7 +1090,7 @@ external program defined by `sendmail-program'."
(/= (point) (point-max)))
selected-coding
(setq charset
- (coding-system-get selected-coding 'mime-charset))
+ (coding-system-get selected-coding :mime-charset))
(goto-char delimline)
(insert "MIME-version: 1.0\n"
"Content-type: text/plain; charset="
@@ -1776,7 +1776,7 @@ The seventh argument ACTIONS is a list of actions to take
(define-key (current-local-map) "v"
(lambda ()
(interactive)
- (let ((coding-system-for-read 'emacs-mule-unix))
+ (let ((coding-system-for-read 'utf-8-emacs-unix))
(dired-view-file))))
(define-key (current-local-map) "\C-c\C-c"
(lambda ()
@@ -1784,13 +1784,13 @@ The seventh argument ACTIONS is a list of actions to take
(let ((fname (dired-get-filename))
;; Auto-saved files are written in the internal
;; representation, so they should be read accordingly.
- (coding-system-for-read 'emacs-mule-unix))
+ (coding-system-for-read 'utf-8-emacs-unix))
(switch-to-buffer-other-window "*mail*")
(let ((buffer-read-only nil))
(erase-buffer)
(insert-file-contents fname nil)
;; insert-file-contents will set buffer-file-coding-system
- ;; to emacs-mule, which is probably not what they want to
+ ;; to utf-8-emacs, which is probably not what they want to
;; use for sending the message. But we don't know what
;; was its value before the buffer was killed or Emacs
;; crashed. We therefore reset buffer-file-coding-system
@@ -1841,7 +1841,7 @@ you can move to one of them and type C-c C-c to recover that one."
(buffer-coding buffer-file-coding-system)
;; Auto-save files are written in internal
;; representation of non-ASCII characters.
- (coding-system-for-read 'emacs-mule-unix))
+ (coding-system-for-read 'utf-8-emacs-unix))
(erase-buffer)
(insert-file-contents file-name nil)
(setq buffer-file-coding-system buffer-coding)))))