From: Kenichi Handa Date: Mon, 13 Nov 2006 01:16:03 +0000 (+0000) Subject: (ucs-insert): Re-implement. X-Git-Tag: emacs-pretest-23.0.90~8295^2~693 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cb9e47dd3ac0d159654245fdc4dcf44dd662e38c;p=emacs.git (ucs-insert): Re-implement. --- diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index bbe219745e9..3eebb3e7b51 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -2784,6 +2784,16 @@ If CODING-SYSTEM can't safely encode CHAR, return nil." (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