From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: insert-char as alias to ucs-insert Date: Mon, 16 Jul 2012 17:16:20 +0800 Message-ID: <87mx30t6aj.fsf@gnu.org> References: <87629qz67l.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1342430196 3630 80.91.229.3 (16 Jul 2012 09:16:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 16 Jul 2012 09:16:36 +0000 (UTC) Cc: Leo , emacs-devel@gnu.org To: Rene@Kyllingstad.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 16 11:16:35 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 1SqhPs-0000nZ-6K for ged-emacs-devel@m.gmane.org; Mon, 16 Jul 2012 11:16:32 +0200 Original-Received: from localhost ([::1]:41000 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SqhPq-0000Dd-Uk for ged-emacs-devel@m.gmane.org; Mon, 16 Jul 2012 05:16:30 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34015) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SqhPo-0000DU-Eg for emacs-devel@gnu.org; Mon, 16 Jul 2012 05:16:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SqhPn-0006KU-82 for emacs-devel@gnu.org; Mon, 16 Jul 2012 05:16:28 -0400 Original-Received: from fencepost.gnu.org ([208.118.235.10]:55917) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SqhPm-0006KO-QI for emacs-devel@gnu.org; Mon, 16 Jul 2012 05:16:27 -0400 Original-Received: from [155.69.16.161] (port=42834 helo=ulysses) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SqhPm-0007Lo-1h; Mon, 16 Jul 2012 05:16:26 -0400 In-Reply-To: (=?utf-8?Q?=22Ren=C3=A9?= Kyllingstad"'s message of "Sun, 15 Jul 2012 18:35:14 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.10 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:151658 Archived-At: Ren=C3=A9 Kyllingstad writes: > 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. >=20=20=20=20=20 > Patch welcome. > > Patch attached. Thanks, this looks almost completely straightforward. One significant difference is that ucs-insert errors out if the argument is larger than #x10FFFF, whereas insert-char does not---it tests for CHARACTERP, which accepts up to #x3FFFFF. That's because the code space of utf-8-emacs is larger than Unicode. Off the top of my head, making it more permissive is OK, i.e. we should allow insert-char with arguments of up to #x3FFFFF. Anyone have a different opinion?