Add 2012 to FSF copyright years for Emacs files
[bpt/emacs.git] / lisp / mail / rmailsum.el
index e6a0a34..d3a4641 100644 (file)
@@ -1,6 +1,6 @@
 ;;; rmailsum.el --- make summary buffers for the mail reader
 
-;; Copyright (C) 1985, 1993-1996, 2000-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1993-1996, 2000-2012 Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
 ;; Keywords: mail
@@ -762,6 +762,12 @@ the message being processed."
                                              (point)))))))))
               (if (null from)
                   "                         "
+                ;; We are going to return only 25 characters of the
+                ;; address, so make sure it is RFC2047 decoded before
+                ;; taking its substring.  This is important when the address is not on the same line as the name, e.g.:
+                ;; To: =?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?=
+                ;; <stepnem@gmail.com>
+                (setq from (rfc2047-decode-string from))
                 (setq len (length from))
                 (setq mch (string-match "[@%]" from))
                 (format "%25s"