From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Ren=C3=A9_Kyllingstad?= Newsgroups: gmane.emacs.devel Subject: Re: insert-char as alias to ucs-insert Date: Sun, 15 Jul 2012 18:35:14 +0200 Message-ID: References: <87629qz67l.fsf@gnu.org> Reply-To: Rene@Kyllingstad.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=e89a8f6432c21f6a0704c4e0e724 X-Trace: dough.gmane.org 1342370148 10337 80.91.229.3 (15 Jul 2012 16:35:48 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 15 Jul 2012 16:35:48 +0000 (UTC) Cc: Leo , emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 15 18:35:46 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SqRnM-0005TP-KF for ged-emacs-devel@m.gmane.org; Sun, 15 Jul 2012 18:35:44 +0200 Original-Received: from localhost ([::1]:56263 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SqRnL-0007X1-V6 for ged-emacs-devel@m.gmane.org; Sun, 15 Jul 2012 12:35:43 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:38860) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SqRnI-0007Ww-SX for emacs-devel@gnu.org; Sun, 15 Jul 2012 12:35:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SqRnH-0004Dz-Ob for emacs-devel@gnu.org; Sun, 15 Jul 2012 12:35:40 -0400 Original-Received: from elhaz.pair.com ([209.68.1.176]:52440) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SqRnG-0004Dd-1x; Sun, 15 Jul 2012 12:35:38 -0400 Original-Received: from mail-ob0-f169.google.com (mail-ob0-f169.google.com [209.85.214.169]) by elhaz.pair.com (Postfix) with ESMTPSA id D6A78B8087; Sun, 15 Jul 2012 12:35:36 -0400 (EDT) Original-Received: by obhx4 with SMTP id x4so9758711obh.0 for ; Sun, 15 Jul 2012 09:35:36 -0700 (PDT) Original-Received: by 10.50.135.1 with SMTP id po1mr3402567igb.67.1342370136156; Sun, 15 Jul 2012 09:35:36 -0700 (PDT) Original-Received: by 10.231.211.136 with HTTP; Sun, 15 Jul 2012 09:35:14 -0700 (PDT) In-Reply-To: <87629qz67l.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.68.1.176 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:151628 Archived-At: --e89a8f6432c21f6a0704c4e0e724 Content-Type: multipart/alternative; boundary=e89a8f6432c21f6a0204c4e0e722 --e89a8f6432c21f6a0204c4e0e722 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sat, Jul 14, 2012 at 5:57 PM, Chong Yidong wrote: > Leo writes: > > > On 2012-07-12 22:00 +0800, Ren=C3=A9 Kyllingstad wrote: > >> I have a hard time remembering the name of ucs-insert. What about > adding a > >> insert-char alias? > >> > >> 2012-07-12 Ren=C3=A9 Kyllingstad > >> > >> * international/mule-cmds.el (insert-char): New alias. > > > > I don't think this is worth it. > > > > You can put any aliases in your .emacs. BTW, insert-char is a C > > primitive. > > Happily, ucs-insert has the same arglist as insert-char. So we could > make insert-char interactive, with an interactive spec that performs the > ucs-insert character-reading magic. Then ucs-insert could be made into > an alias for insert-char. > > Patch welcome. > Patch attached. -- Ren=C3=A9 2012-07-15 Ren=C3=A9 Kyllingstad * editfns.c (Finsert_char): Add interactive entry of unicode characters, moved from ucs-insert. 2012-07-15 Ren=C3=A9 Kyllingstad * international/mule-cmds.el (ucs-insert): Move interactive functionality to insert-char, and make this an alias. --e89a8f6432c21f6a0204c4e0e722 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Sat, Jul 14, 2012 = at 5:57 PM, Chong Yidong <cyd@gnu.org> wrote:
Leo <sdl.web@gmail.com> writes:

> On 2012-07-12 22:00 +0800, Ren=C3=A9 Kyllingstad wrote:
>> I have a hard time remembering the name of ucs-insert. What about = adding a
>> insert-char alias?
>>
>> 2012-07-12 =C2=A0Ren=C3=A9 Kyllingstad =C2=A0<rene@kyllingstad.com>
>>
>> * international/mule-cmds.el (insert-char): New alias.
>
> I don't think this is worth it.
>
> You can put any aliases in your .emacs. BTW, insert-char is a C
> primitive.

Happily, ucs-insert has the same arglist as insert-char. =C2=A0= So we could
make insert-char interactive, with an interactive spec that performs the ucs-insert character-reading magic. =C2=A0Then ucs-insert could be made int= o
an alias for insert-char.

Patch welcome.

Patch attached.


-- Ren=C3=A9
2012-07-15 =C2=A0Ren=C3=A9 Kyllingstad =C2=A0<rene@kyllingstad.com>
=
* editfns.c (Finsert_char): Add interactive entry
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 of unicode ch= aracters, moved from ucs-insert.

=
2012-07-15 =C2=A0Ren=C3=A9 Kyllingstad =C2=A0<= ;rene@kyllingstad.com>

* international/mule-cmds.el (ucs-i= nsert): Move interactive
=C2=A0functionality to insert-char, and m= ake this an alias.

--e89a8f6432c21f6a0204c4e0e722-- --e89a8f6432c21f6a0704c4e0e724 Content-Type: application/octet-stream; name="insert-char-interactive.patch" Content-Disposition: attachment; filename="insert-char-interactive.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_h4ochk7f0 PT09IG1vZGlmaWVkIGZpbGUgJ2xp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