changeset 34772:e1ba5ba6149a

(select-safe-coding-system): Check coding-category-list more rigidly.
author Kenichi Handa <handa@m17n.org>
date Thu, 21 Dec 2000 05:45:08 +0000
parents f3da51b99c4e
children 664ee7cb8bf9
files lisp/international/mule-cmds.el
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/mule-cmds.el	Thu Dec 21 05:44:43 2000 +0000
+++ b/lisp/international/mule-cmds.el	Thu Dec 21 05:45:08 2000 +0000
@@ -553,9 +553,14 @@
 
   ;; If the most preferred coding system has the property mime-charset,
   ;; append it to the defaults.
-  (let* ((preferred (symbol-value (car coding-category-list)))
-	 (base (coding-system-base preferred)))
-    (and (coding-system-get preferred 'mime-charset)
+  (let ((tail coding-category-list)
+	preferred base)
+    (while (and tail
+		(not (setq preferred (symbol-name (car tail)))))
+      (setq tail (cdr tail)))
+    (and (coding-system-p preferred)
+	 (setq base (coding-system-base preferred))
+	 (coding-system-get preferred 'mime-charset)
 	 (not (assq preferred default-coding-system))
 	 (not (rassq base default-coding-system))
 	 (setq default-coding-system