emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: inputting characters by hexadigit


From: Juri Linkov
Subject: Re: inputting characters by hexadigit
Date: Tue, 29 Jul 2008 18:51:14 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu)

>>> From my experience using C-q to input a number was a pain in the echo area.
>> IMHO, using the minibuffer is more convenient that reading a string
>> with a sequence of `read-event'.  That's why I have doubts about moving
>
> Then use C-x 8 RET.  No need for us to choose.

I installed a patch that changes `ucs-insert' to read Unicode names.
Anyone could improve it further with a discussed multi-level
completion mechanism.

A patch below binds `ucs-insert' to `C-x 8 RET'.  I tried to bind RET
to iso-transl-ctl-x-8-map in iso-transl.el, but then `C-x 8 RET' calls
`ucs-insert' as a non-interactive function (i.e. ignoring its `interactive'
declaration).  However, `ucs-insert' bound directly to `ctl-x-map' as below
works without problems.

Index: lisp/international/mule-cmds.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/international/mule-cmds.el,v
retrieving revision 1.335
diff -u -r1.335 mule-cmds.el
--- lisp/international/mule-cmds.el     29 Jul 2008 14:45:50 -0000      1.335
+++ lisp/international/mule-cmds.el     29 Jul 2008 15:50:47 -0000
@@ -2878,6 +2878,7 @@
       (error "Not a Unicode character code: 0x%X" arg))
   (insert-and-inherit arg))
 
+(define-key ctl-x-map "8\r" 'ucs-insert)
 
 ;; arch-tag: b382c432-4b36-460e-bf4c-05efd0bb18dc
 ;;; mule-cmds.el ends here

-- 
Juri Linkov
http://www.jurta.org/emacs/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]