From 984d06b317071b26f641ff60582ec408baa98cd0 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Mon, 29 Mar 2004 12:05:50 +0000 Subject: [PATCH] (ucs-insert): Fix the error message. --- lisp/ChangeLog | 4 ++++ lisp/international/ucs-tables.el | 10 ++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1f1c20185ad..d71bc76e948 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2004-03-29 Kenichi Handa + + * international/ucs-tables.el (ucs-insert): Fix the error message. + 2004-03-29 Kenichi Handa * international/mule-util.el (char-displayable-p): Fix generation diff --git a/lisp/international/ucs-tables.el b/lisp/international/ucs-tables.el index 476c8dfc191..5574cf3d954 100644 --- a/lisp/international/ucs-tables.el +++ b/lisp/international/ucs-tables.el @@ -1247,12 +1247,14 @@ unification on input operations." "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. -- 2.39.5