Mercurial > emacs
changeset 49776:b76187acee2b
(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.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Thu, 13 Feb 2003 20:06:36 +0000 |
parents | fe09538dd0f5 |
children | 9ada5a15a432 |
files | lisp/international/mule-cmds.el |
diffstat | 1 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/international/mule-cmds.el Thu Feb 13 20:04:17 2003 +0000 +++ b/lisp/international/mule-cmds.el Thu Feb 13 20:06:36 2003 +0000 @@ -439,7 +439,7 @@ (t 32)) 0)) (if (memq base lang-preferred) 8 0) - (if (string-match "-with-esc$" (symbol-name base)) + (if (string-match "-with-esc\\'" (symbol-name base)) 0 4) (if (eq (coding-system-type base) 2) ;; For ISO based coding systems, prefer @@ -658,7 +658,6 @@ (if buffer-file-coding-system (let ((base (coding-system-base buffer-file-coding-system))) (or (eq base 'undecided) - (assq buffer-file-coding-system default-coding-system) (rassq base default-coding-system) (setq default-coding-system (append default-coding-system @@ -674,7 +673,6 @@ (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 (append default-coding-system @@ -749,6 +747,14 @@ (coding-system-category elt))) (push elt l)))) + ;; Remove raw-text, emacs-mule and no-conversion unless nothing + ;; else is available. + (setq codings + (or (delq 'raw-text + (delq 'emacs-mule + (delq 'no-conversion codings))) + '(raw-text emacs-mule no-conversion))) + (let ((window-configuration (current-window-configuration))) (save-excursion ;; If some defaults are unsafe, make sure the offending