changeset 54642:abb31042a0e6

(ucs-insert): Fix the error message.
author Kenichi Handa <handa@m17n.org>
date Mon, 29 Mar 2004 12:01:21 +0000
parents 77a99ef5c0ae
children 244826afc178
files lisp/international/ucs-tables.el
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/ucs-tables.el	Mon Mar 29 11:45:11 2004 +0000
+++ b/lisp/international/ucs-tables.el	Mon Mar 29 12:01:21 2004 +0000
@@ -1247,12 +1247,14 @@
   "Insert the Emacs character representation of the given Unicode.
 Interactively, prompts for a hex string giving the code."
   (interactive "sUnicode (hex): ")
-  (let ((c (decode-char 'ucs (if (integerp arg)
-				 arg
-			       (string-to-number arg 16)))))
+  (or (integerp arg)
+      (setq arg (string-to-number arg 16)))
+  (let ((c (decode-char 'ucs arg )))
     (if c
 	(insert c)
-      (error "Character can't be decoded to UCS"))))
+      (if (or (< arg 0) (> arg #x10FFFF))
+	  (error "Not a Unicode character code: 0x%X" arg)
+	(error "Character U+%04X is not yet supported" arg)))))
 
 ;;; Dealing with non-8859 character sets.