emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/lisp/mail rmail.el


From: Kenichi Handa
Subject: [Emacs-diffs] emacs/lisp/mail rmail.el
Date: Tue, 27 Jan 2009 04:48:09 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Kenichi Handa <handa>   09/01/27 04:48:09

Modified files:
        lisp/mail      : rmail.el 

Log message:
        (rmail-get-coding-system): Re-search
        rmail-mime-charset-pattern directly instead of using
        mail-fetch-field.  Use coding-system-from-name.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/mail/rmail.el?cvsroot=emacs&r1=1.468&r2=1.469

Patches:
Index: rmail.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/mail/rmail.el,v
retrieving revision 1.468
retrieving revision 1.469
diff -u -b -r1.468 -r1.469
--- rmail.el    27 Jan 2009 03:43:04 -0000      1.468
+++ rmail.el    27 Jan 2009 04:48:09 -0000      1.469
@@ -940,13 +940,10 @@
 (defun rmail-get-coding-system ()
   "Return a suitable coding system to use for the current mail message.
 The buffer is expected to be narrowed to just the header of the message."
-  (let ((content-type-header (mail-fetch-field "content-type"))
-       separator)
     (save-excursion
-      (setq separator (search-forward "\n\n")))
-    (if (and content-type-header
-            (string-match rmail-mime-charset-pattern content-type-header))
-       (substring content-type-header (match-beginning 1) (match-end 1))
+    (goto-char (point-min))
+    (if (re-search-forward rmail-mime-charset-pattern)
+       (coding-system-from-name (match-string 1))
       'undecided)))
 
 ;;; Set up Rmail mode keymaps




reply via email to

[Prev in Thread] Current Thread [Next in Thread]