When possible, prefer UTF-8 as the safe encoding for saving
* lisp/international/mule-cmds.el (select-safe-coding-system): If possible, offer UTF-8 as the default encoding. (Bug#31807)
This commit is contained in:
parent
85a1e2f927
commit
c6f992b8e3
1 changed files with 5 additions and 0 deletions
|
@ -988,6 +988,11 @@ It is highly recommended to fix it before writing to a file."
|
|||
|
||||
;; If all the defaults failed, ask a user.
|
||||
(when (not coding-system)
|
||||
;; If UTF-8 is in CODINGS, but is not its first member, make
|
||||
;; it the first one, so it is offered as the default.
|
||||
(and (memq 'utf-8 codings) (not (eq 'utf-8 (car codings)))
|
||||
(setq codings (append '(utf-8) (delq 'utf-8 codings))))
|
||||
|
||||
(setq coding-system (select-safe-coding-system-interactively
|
||||
from to codings unsafe rejected (car codings))))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue