# HG changeset patch # User Kenichi Handa # Date 977377508 0 # Node ID e1ba5ba6149aa3090539728de1059e0208ed13b3 # Parent f3da51b99c4e67f986b2810e3ec8c114569fc164 (select-safe-coding-system): Check coding-category-list more rigidly. diff -r f3da51b99c4e -r e1ba5ba6149a lisp/international/mule-cmds.el --- 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