changeset 42493:84a510bb7ff6

2002-01-03 ShengHuo ZHU <zsh@cs.rochester.edu> * mm-util.el (mm-charset-to-coding-system): Don't setq charset.
author ShengHuo ZHU <zsh@cs.rochester.edu>
date Thu, 03 Jan 2002 06:52:30 +0000
parents a5636409941f
children 35eeafd85667
files lisp/gnus/ChangeLog lisp/gnus/mm-util.el
diffstat 2 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gnus/ChangeLog	Thu Jan 03 05:19:26 2002 +0000
+++ b/lisp/gnus/ChangeLog	Thu Jan 03 06:52:30 2002 +0000
@@ -1,3 +1,7 @@
+2002-01-03  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+	* mm-util.el (mm-charset-to-coding-system): Don't setq charset.
+
 2002-01-01  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
 	* message.el, gnus-art.el, gnus.el, gnus-cite.el: 
--- a/lisp/gnus/mm-util.el	Thu Jan 03 05:19:26 2002 +0000
+++ b/lisp/gnus/mm-util.el	Thu Jan 03 06:52:30 2002 +0000
@@ -1,5 +1,5 @@
 ;;; mm-util.el --- Utility functions for Mule and low level things
-;; Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;;	MORIOKA Tomohiko <morioka@jaist.ac.jp>
@@ -331,10 +331,8 @@
 	 )
     charset)
    ;; Translate invalid charsets.
-   ((mm-coding-system-p (setq charset
-			   (cdr (assq charset
-				      mm-charset-synonym-alist))))
-    charset)
+   ((let ((cs (cdr (assq charset mm-charset-synonym-alist))))
+      (and cs (mm-coding-system-p charset) cs)))
    ;; Last resort: search the coding system list for entries which
    ;; have the right mime-charset in case the canonical name isn't
    ;; defined (though it should be).