aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/international/mule-cmds.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index 9a648f53a34..42d4eebe2b3 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -553,9 +553,14 @@ and TO is ignored."
553 553
554 ;; If the most preferred coding system has the property mime-charset, 554 ;; If the most preferred coding system has the property mime-charset,
555 ;; append it to the defaults. 555 ;; append it to the defaults.
556 (let* ((preferred (symbol-value (car coding-category-list))) 556 (let ((tail coding-category-list)
557 (base (coding-system-base preferred))) 557 preferred base)
558 (and (coding-system-get preferred 'mime-charset) 558 (while (and tail
559 (not (setq preferred (symbol-name (car tail)))))
560 (setq tail (cdr tail)))
561 (and (coding-system-p preferred)
562 (setq base (coding-system-base preferred))
563 (coding-system-get preferred 'mime-charset)
559 (not (assq preferred default-coding-system)) 564 (not (assq preferred default-coding-system))
560 (not (rassq base default-coding-system)) 565 (not (rassq base default-coding-system))
561 (setq default-coding-system 566 (setq default-coding-system