Mercurial > emacs
comparison lisp/international/mule-cmds.el @ 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 | 0378b3d77144 |
children | 316a3cf24c90 |
comparison
equal
deleted
inserted
replaced
34771:f3da51b99c4e | 34772:e1ba5ba6149a |
---|---|
551 (append default-coding-system | 551 (append default-coding-system |
552 (list (cons buffer-file-coding-system base))))))) | 552 (list (cons buffer-file-coding-system base))))))) |
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 |
562 (append default-coding-system (list (cons preferred base)))))) | 567 (append default-coding-system (list (cons preferred base)))))) |
563 | 568 |