aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/international/mule-cmds.el
diff options
context:
space:
mode:
authorStefan Monnier <[email protected]>2003-02-13 20:06:36 +0000
committerStefan Monnier <[email protected]>2003-02-13 20:06:36 +0000
commit050afd6435efc2403cfa574b53475aba30b43054 (patch)
treec7811f7ac84f7b60e728d4cc490b1fc930912560 /lisp/international/mule-cmds.el
parent07115067e8e50318e0fb57660ac88d130febeb32 (diff)
(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.
Diffstat (limited to 'lisp/international/mule-cmds.el')
-rw-r--r--lisp/international/mule-cmds.el12
1 files changed, 9 insertions, 3 deletions
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index ffa3840801..92df9fcb4c 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."
(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 @@ and TO is ignored."
(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 TO is ignored."
(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 @@ and TO is ignored."
(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