diff options
| author | Stefan Monnier | 2003-02-13 20:06:36 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2003-02-13 20:06:36 +0000 |
| commit | 050afd6435efc2403cfa574b53475aba30b43054 (patch) | |
| tree | c7811f7ac84f7b60e728d4cc490b1fc930912560 | |
| parent | 07115067e8e50318e0fb57660ac88d130febeb32 (diff) | |
| download | emacs-050afd6435efc2403cfa574b53475aba30b43054.tar.gz emacs-050afd6435efc2403cfa574b53475aba30b43054.zip | |
(sort-coding-systems): Use \'.
(select-safe-coding-system): Remove redundant assq check.
Remove raw-text, emacs-mule and no-conversion from the list of
proposed encodings unless there's nothing else.
| -rw-r--r-- | lisp/international/mule-cmds.el | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index ffa3840801d..92df9fcb4c0 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el | |||
| @@ -439,7 +439,7 @@ non-nil, it is used to sort CODINGS in the different way than above." | |||
| 439 | (t 32)) | 439 | (t 32)) |
| 440 | 0)) | 440 | 0)) |
| 441 | (if (memq base lang-preferred) 8 0) | 441 | (if (memq base lang-preferred) 8 0) |
| 442 | (if (string-match "-with-esc$" (symbol-name base)) | 442 | (if (string-match "-with-esc\\'" (symbol-name base)) |
| 443 | 0 4) | 443 | 0 4) |
| 444 | (if (eq (coding-system-type base) 2) | 444 | (if (eq (coding-system-type base) 2) |
| 445 | ;; For ISO based coding systems, prefer | 445 | ;; For ISO based coding systems, prefer |
| @@ -658,7 +658,6 @@ and TO is ignored." | |||
| 658 | (if buffer-file-coding-system | 658 | (if buffer-file-coding-system |
| 659 | (let ((base (coding-system-base buffer-file-coding-system))) | 659 | (let ((base (coding-system-base buffer-file-coding-system))) |
| 660 | (or (eq base 'undecided) | 660 | (or (eq base 'undecided) |
| 661 | (assq buffer-file-coding-system default-coding-system) | ||
| 662 | (rassq base default-coding-system) | 661 | (rassq base default-coding-system) |
| 663 | (setq default-coding-system | 662 | (setq default-coding-system |
| 664 | (append default-coding-system | 663 | (append default-coding-system |
| @@ -674,7 +673,6 @@ and TO is ignored." | |||
| 674 | (and (coding-system-p preferred) | 673 | (and (coding-system-p preferred) |
| 675 | (setq base (coding-system-base preferred)) | 674 | (setq base (coding-system-base preferred)) |
| 676 | (coding-system-get preferred 'mime-charset) | 675 | (coding-system-get preferred 'mime-charset) |
| 677 | (not (assq preferred default-coding-system)) | ||
| 678 | (not (rassq base default-coding-system)) | 676 | (not (rassq base default-coding-system)) |
| 679 | (setq default-coding-system | 677 | (setq default-coding-system |
| 680 | (append default-coding-system | 678 | (append default-coding-system |
| @@ -749,6 +747,14 @@ and TO is ignored." | |||
| 749 | (coding-system-category elt))) | 747 | (coding-system-category elt))) |
| 750 | (push elt l)))) | 748 | (push elt l)))) |
| 751 | 749 | ||
| 750 | ;; Remove raw-text, emacs-mule and no-conversion unless nothing | ||
| 751 | ;; else is available. | ||
| 752 | (setq codings | ||
| 753 | (or (delq 'raw-text | ||
| 754 | (delq 'emacs-mule | ||
| 755 | (delq 'no-conversion codings))) | ||
| 756 | '(raw-text emacs-mule no-conversion))) | ||
| 757 | |||
| 752 | (let ((window-configuration (current-window-configuration))) | 758 | (let ((window-configuration (current-window-configuration))) |
| 753 | (save-excursion | 759 | (save-excursion |
| 754 | ;; If some defaults are unsafe, make sure the offending | 760 | ;; If some defaults are unsafe, make sure the offending |