From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Unicode Lisp reader escapes Date: Tue, 02 May 2006 13:36:44 +0300 Message-ID: References: <17491.34779.959316.484740@parhasard.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1146566239 4960 80.91.229.2 (2 May 2006 10:37:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 2 May 2006 10:37:19 +0000 (UTC) Cc: kehoea@parhasard.net, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 02 12:37:14 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FasFd-0000yR-3y for ged-emacs-devel@m.gmane.org; Tue, 02 May 2006 12:37:05 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FasFc-0003pT-LB for ged-emacs-devel@m.gmane.org; Tue, 02 May 2006 06:37:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FasFQ-0003op-F2 for emacs-devel@gnu.org; Tue, 02 May 2006 06:36:52 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FasFN-0003mT-73 for emacs-devel@gnu.org; Tue, 02 May 2006 06:36:51 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FasFN-0003mJ-0Z for emacs-devel@gnu.org; Tue, 02 May 2006 06:36:49 -0400 Original-Received: from [192.114.186.20] (helo=nitzan.inter.net.il) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FasFV-0000cM-5g for emacs-devel@gnu.org; Tue, 02 May 2006 06:36:57 -0400 Original-Received: from HOME-C4E4A596F7 (IGLD-80-230-91-14.inter.net.il [80.230.91.14]) by nitzan.inter.net.il (MOS 3.7.3-GA) with ESMTP id DGI87616 (AUTH halo1); Tue, 2 May 2006 13:36:41 +0300 (IDT) Original-To: Kenichi Handa In-reply-to: (message from Kenichi Handa on Tue, 02 May 2006 15:43:16 +0900) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:53779 Archived-At: > From: Kenichi Handa > Date: Tue, 02 May 2006 15:43:16 +0900 > Cc: emacs-devel@gnu.org > > > + lisp_char = call2(intern("decode-char"), intern("ucs"), > > + make_number(i)); > > + > > First of all, is it safe to call Lisp program in > read_escape? Whether it is safe or not, I think it's certainly better to implement the guts of decode-char in C, if it's gonna be called from read_escape. All those guts do is simple arithmetics, which will be much faster in C. Moreover, I think the fact that decode-char uses translation tables to support unify-8859-on-*coding-mode (and thus might produce characters other than mule-unicode-*) could even be a misfeature: do we really want read_escape to produce Unicode or non-Unicode characters when it sees \uNNNN, depending on the current user settings?