]> code.delx.au - gnu-emacs/blobdiff - lisp/international/mule-cmds.el
Mark last change as "tiny"
[gnu-emacs] / lisp / international / mule-cmds.el
index 588460b657b531a8681969945cf524f155250972..0a2f09029da153c802fc85f4004c90e3c06bfef3 100644 (file)
@@ -1,6 +1,6 @@
 ;;; mule-cmds.el --- commands for multilingual environment -*-coding: utf-8 -*-
 
-;; Copyright (C) 1997-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2014 Free Software Foundation, Inc.
 ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 ;;   2005, 2006, 2007, 2008, 2009, 2010, 2011
 ;;   National Institute of Advanced Industrial Science and Technology (AIST)
@@ -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))))
 
@@ -2941,7 +2945,10 @@ on encoding."
            (if (setq name (get-char-code-property c 'name))
                (push (cons name c) names))
            (setq c (1+ c))))
-        (setq ucs-names names))))
+       ;; Special case for "BELL" which is apparently the only char which
+       ;; doesn't have a new name and whose old-name is shadowed by a newer
+       ;; char with that name.
+       (setq ucs-names `(("BELL (BEL)" . 7) ,@names)))))
 
 (defun read-char-by-name (prompt)
   "Read a character by its Unicode name or hex number string.