mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-10 05:30:45 -08:00
(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.
This commit is contained in:
parent
07115067e8
commit
050afd6435
1 changed files with 9 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue