changeset 90658:9aecc02933e3

(ucs-insert): Re-implement.
author Kenichi Handa <handa@m17n.org>
date Mon, 13 Nov 2006 01:16:03 +0000
parents a5ed1185f60d
children 4fbe9b12ec51
files lisp/international/mule-cmds.el
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/mule-cmds.el	Fri Nov 10 06:34:38 2006 +0000
+++ b/lisp/international/mule-cmds.el	Mon Nov 13 01:16:03 2006 +0000
@@ -2784,6 +2784,16 @@
 (defvar nonascii-insert-offset 0 "This variable is obsolete.")
 (defvar nonascii-translation-table nil "This variable is obsolete.")
 
+(defun ucs-insert (arg)
+  "Insert a character of the given Unicode code point.
+Interactively, prompts for a hex string giving the code."
+  (interactive "sUnicode (hex): ")
+  (or (integerp arg)
+      (setq arg (string-to-number arg 16)))
+  (if (or (< arg 0) (> arg #x10FFFF))
+      (error "Not a Unicode character code: 0x%X" arg))
+  (insert arg))
+
 
 ;; arch-tag: b382c432-4b36-460e-bf4c-05efd0bb18dc
 ;;; mule-cmds.el ends here