From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Unicode Lisp reader escapes Date: Thu, 04 May 2006 13:57:22 +0200 Message-ID: References: <17491.34779.959316.484740@parhasard.net> <87odyfnqcj.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1146743975 22715 80.91.229.2 (4 May 2006 11:59:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 4 May 2006 11:59:35 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 04 13:59:32 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 1FbcUL-0005KF-6o for ged-emacs-devel@m.gmane.org; Thu, 04 May 2006 13:59:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FbcUK-0007av-Ps for ged-emacs-devel@m.gmane.org; Thu, 04 May 2006 07:59:20 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FbcU8-0007aa-Up for emacs-devel@gnu.org; Thu, 04 May 2006 07:59:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FbcU8-0007aM-D8 for emacs-devel@gnu.org; Thu, 04 May 2006 07:59:08 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FbcU8-0007aJ-9m for emacs-devel@gnu.org; Thu, 04 May 2006 07:59:08 -0400 Original-Received: from [195.41.46.237] (helo=pfepc.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FbcUj-0003BB-0v for emacs-devel@gnu.org; Thu, 04 May 2006 07:59:45 -0400 Original-Received: from kfs-l.imdomain.dk.cua.dk (0x503e2644.bynxx3.adsl-dhcp.tele.dk [80.62.38.68]) by pfepc.post.tele.dk (Postfix) with SMTP id 98BFD8A006B; Thu, 4 May 2006 13:59:05 +0200 (CEST) Original-To: Oliver Scholz In-Reply-To: (Oliver Scholz's message of "Thu, 04 May 2006 10:23:46 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:53891 Archived-At: Oliver Scholz writes: > Here's the patch, only slightly tested: > + > +/* Return the internal character coresponding to an UCS code point.*/ > + > +int > +ucs_to_internal (ucs) > + int ucs; > +{ > + if (! EQ (Qnil, SYMBOL_VALUE (intern ("utf-translate-cjk-mode")))) > + if (EQ (Qnil, SYMBOL_VALUE (intern ("utf-translate-cjk-lang-env")))) > + call0 (intern ("utf-translate-cjk-load-tables")); > + Fget (intern ("utf-subst-table-for-decode"), > + intern ("translation-hash-table")), > + Lisp_Object vect = Fget (intern ("utf-translation-table-for-decode"), > + intern ("translation-table")); > +} That's 7 lisp vars accessed from C - for decoding one character!?! How often does this happen? If it is only/primarily used for interactive use, I guess it doesn't matter. Otherwise, I think those vars should be declared in C, to avoid the overhead of interning them at run-time... -- Kim F. Storm http://www.cua.dk