From: tomo Date: Tue, 29 Jun 1999 16:04:59 +0000 (+0000) Subject: (set-language-environment-coding-systems): Treat duplicated X-Git-Tag: r21-2-17-tomo-3~19 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c2fd8b7c8f4db7d7dafc4ba06b87fb54fef1675f;p=chise%2Fxemacs-chise.git (set-language-environment-coding-systems): Treat duplicated coding-categories. --- diff --git a/lisp/mule/mule-cmds.el b/lisp/mule/mule-cmds.el index 81de9b1..045de7f 100644 --- a/lisp/mule/mule-cmds.el +++ b/lisp/mule/mule-cmds.el @@ -1229,16 +1229,20 @@ of buffer-file-coding-system set by this function." (let* ((priority (get-language-info language-name 'coding-priority)) (default-coding (car priority))) (if priority - (let ((categories (mapcar 'coding-system-category priority))) + (let ((categories (mapcar 'coding-system-category priority)) + category checked-categories) (set-default-coding-systems (if (memq eol-type '(lf crlf cr unix dos mac)) (coding-system-change-eol-conversion default-coding eol-type) default-coding)) ;; (setq default-sendmail-coding-system default-coding) - (set-coding-priority-list categories) (while priority - (set-coding-category-system (car categories) (car priority)) - (setq priority (cdr priority) categories (cdr categories))) + (unless (memq (setq category (car categories)) checked-categories) + (set-coding-category-system category (car priority)) + (setq checked-categories (cons category checked-categories))) + (setq priority (cdr priority) + categories (cdr categories))) + (set-coding-priority-list (nreverse checked-categories)) ;; (update-coding-systems-internal) ))))