From 85b64f021c189466eec8036df2996af409714666 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Sun, 13 Oct 2013 18:25:29 +0900 Subject: [PATCH] international/mule-cmds.el (select-safe-coding-system): Remove a superfluous condition in chekcing whether a coding system is safe or not. --- lisp/ChangeLog | 6 ++++++ lisp/international/mule-cmds.el | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c3d57e8878..f4508b7bbc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2013-10-13 Kenichi Handa + + * international/mule-cmds.el (select-safe-coding-system): Remove a + superfluous condition in chekcing whether a coding system is safe + or not. + 2013-10-11 Stefan Monnier * progmodes/sh-script.el: Provide simpl(e|istic) completion. diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 588460b657..63cbfc8297 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)))) -- 2.20.1