Mercurial > emacs
comparison lisp/international/mule-cmds.el @ 88502:edebd2ea0273
(sort-coding-systems)
(select-safe-coding-system, select-message-coding-system): Use
:mime-charset, not 'mime-charset.
author | Dave Love <fx@gnu.org> |
---|---|
date | Tue, 14 May 2002 10:16:42 +0000 |
parents | 39de3b4b6fc7 |
children | 44d01a64b846 |
comparison
equal
deleted
inserted
replaced
88501:5fab07dd0c5e | 88502:edebd2ea0273 |
---|---|
385 'coding-system)) | 385 'coding-system)) |
386 (func (function | 386 (func (function |
387 (lambda (x) | 387 (lambda (x) |
388 (let ((base (coding-system-base x))) | 388 (let ((base (coding-system-base x))) |
389 (+ (if (eq base most-preferred) 64 0) | 389 (+ (if (eq base most-preferred) 64 0) |
390 (let ((mime (coding-system-get base 'mime-charset))) | 390 (let ((mime (coding-system-get base :mime-charset))) |
391 (if mime | 391 (if mime |
392 (if (string-match "^x-" (symbol-name mime)) | 392 (if (string-match "^x-" (symbol-name mime)) |
393 16 32) | 393 16 32) |
394 0)) | 394 0)) |
395 (if (memq base lang-preferred) 8 0) | 395 (if (memq base lang-preferred) 8 0) |
578 ;; append it to the defaults. | 578 ;; append it to the defaults. |
579 (let ((preferred (coding-system-priority-list t)) | 579 (let ((preferred (coding-system-priority-list t)) |
580 base) | 580 base) |
581 (and (coding-system-p preferred) | 581 (and (coding-system-p preferred) |
582 (setq base (coding-system-base preferred)) | 582 (setq base (coding-system-base preferred)) |
583 (coding-system-get preferred 'mime-charset) | 583 (coding-system-get preferred :mime-charset) |
584 (not (assq preferred default-coding-system)) | 584 (not (assq preferred default-coding-system)) |
585 (not (rassq base default-coding-system)) | 585 (not (rassq base default-coding-system)) |
586 (setq default-coding-system | 586 (setq default-coding-system |
587 (append default-coding-system (list (cons preferred base)))))) | 587 (append default-coding-system (list (cons preferred base)))))) |
588 | 588 |
611 ;; mime-charset name if it is also a coding system. Such a name | 611 ;; mime-charset name if it is also a coding system. Such a name |
612 ;; is more friendly to users. | 612 ;; is more friendly to users. |
613 (let ((l codings) | 613 (let ((l codings) |
614 mime-charset) | 614 mime-charset) |
615 (while l | 615 (while l |
616 (setq mime-charset (coding-system-get (car l) 'mime-charset)) | 616 (setq mime-charset (coding-system-get (car l) :mime-charset)) |
617 (if (and mime-charset (coding-system-p mime-charset)) | 617 (if (and mime-charset (coding-system-p mime-charset)) |
618 (setcar l mime-charset)) | 618 (setcar l mime-charset)) |
619 (setq l (cdr l)))) | 619 (setq l (cdr l)))) |
620 | 620 |
621 ;; Make sure the offending buffer is displayed. | 621 ;; Make sure the offending buffer is displayed. |
706 buffer-file-coding-system) | 706 buffer-file-coding-system) |
707 sendmail-coding-system | 707 sendmail-coding-system |
708 default-sendmail-coding-system | 708 default-sendmail-coding-system |
709 default-buffer-file-coding-system))) | 709 default-buffer-file-coding-system))) |
710 (if (eq coding 'no-conversion) | 710 (if (eq coding 'no-conversion) |
711 ;; We should never use no-conversion for outgoing mails. | 711 ;; We should never use no-conversion for outgoing mail. |
712 (setq coding nil)) | 712 (setq coding nil)) |
713 (if (fboundp select-safe-coding-system-function) | 713 (if (fboundp select-safe-coding-system-function) |
714 (funcall select-safe-coding-system-function | 714 (funcall select-safe-coding-system-function |
715 (point-min) (point-max) coding | 715 (point-min) (point-max) coding |
716 (function (lambda (x) (coding-system-get x 'mime-charset)))) | 716 (function (lambda (x) (coding-system-get x :mime-charset)))) |
717 coding))) | 717 coding))) |
718 | 718 |
719 ;;; Language support stuff. | 719 ;;; Language support stuff. |
720 | 720 |
721 (defvar language-info-alist nil | 721 (defvar language-info-alist nil |