diff options
author | Kenichi Handa <handa@gnu.org> | 2013-10-13 18:25:29 +0900 |
---|---|---|
committer | Kenichi Handa <handa@gnu.org> | 2013-10-13 18:25:29 +0900 |
commit | 85b64f021c189466eec8036df2996af409714666 (patch) | |
tree | 5fc2d3078e24eb792aad915649d9712bbdaeb6e0 /lisp/international | |
parent | 7d563e363c72828b9b1bbb0181be6a36643ce7af (diff) | |
download | emacs-85b64f021c189466eec8036df2996af409714666.tar.gz |
international/mule-cmds.el (select-safe-coding-system): Remove a superfluous condition in chekcing whether a coding system is safe or not.
Diffstat (limited to 'lisp/international')
-rw-r--r-- | lisp/international/mule-cmds.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 588460b657b..63cbfc82979 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -976,13 +976,17 @@ It is highly recommended to fix it before writing to a file." ;; Classify the defaults into safe, rejected, and unsafe. (dolist (elt default-coding-system) - (if (or (eq (coding-system-type (car elt)) 'undecided) - (memq (cdr elt) codings)) + (if (memq (cdr elt) codings) + ;; This is safe. Is it acceptable? (if (and (functionp accept-default-p) (not (funcall accept-default-p (cdr elt)))) + ;; No, not acceptable. (push (car elt) rejected) + ;; Yes, acceptable. (push (car elt) safe)) + ;; This is not safe. (push (car elt) unsafe))) + ;; If there are safe ones, the first one is what we want. (if safe (setq coding-system (car safe)))) |