From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: Error during redisplay Date: Thu, 28 Feb 2008 15:36:20 +0900 Message-ID: References: <85ir0aubo1.fsf@lola.goethe.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=ISO-2022-JP X-Trace: ger.gmane.org 1204180618 11799 80.91.229.12 (28 Feb 2008 06:36:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 Feb 2008 06:36:58 +0000 (UTC) Cc: lekktu@gmail.com, rms@gnu.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 28 07:37:22 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JUcOP-0002ZX-O2 for ged-emacs-devel@m.gmane.org; Thu, 28 Feb 2008 07:37:22 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JUcNt-0004Hw-CZ for ged-emacs-devel@m.gmane.org; Thu, 28 Feb 2008 01:36:49 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JUcNn-0004Ev-Mf for emacs-devel@gnu.org; Thu, 28 Feb 2008 01:36:43 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JUcNn-0004Do-18 for emacs-devel@gnu.org; Thu, 28 Feb 2008 01:36:43 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JUcNm-0004Df-Ou for emacs-devel@gnu.org; Thu, 28 Feb 2008 01:36:42 -0500 Original-Received: from mx1.aist.go.jp ([150.29.246.133]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JUcNe-000624-S3; Thu, 28 Feb 2008 01:36:35 -0500 Original-Received: from rqsmtp1.aist.go.jp (rqsmtp1.aist.go.jp [150.29.254.115]) by mx1.aist.go.jp with ESMTP id m1S6aPrg010192; Thu, 28 Feb 2008 15:36:28 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp1.aist.go.jp by rqsmtp1.aist.go.jp with ESMTP id m1S6aPA2025257; Thu, 28 Feb 2008 15:36:25 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp1.aist.go.jp with ESMTP id m1S6aKJF022897; Thu, 28 Feb 2008 15:36:20 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken.m17n.org with local (Exim 4.69) (envelope-from ) id 1JUcNQ-0003nq-Cg; Thu, 28 Feb 2008 15:36:20 +0900 In-reply-to: (message from Stefan Monnier on Wed, 27 Feb 2008 11:06:21 -0500) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/23.0.60 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) X-detected-kernel: by monty-python.gnu.org: Solaris 8 (1) 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:90697 Archived-At: In article , Stefan Monnier writes: > Hmm.. I'm confused. The auto-composed property is boolean, so at least > the auto-composition-mode code should only run once and should hence > generate a `composition' property value that does not depend on the > font used. > Maybe what you're saying is that this `composition' property is later > changed by the redisplay code and this can be redone if the same text > gets displayed with another font? Yes. > > By the way, I think the slowness is mainly because the > What slowness? Slowness of calculating composition properties. > > property generation is done by Lisp code through the > > function in composition-function-table and that involves > > generating many Lisp objects. > By the way, it might be good to replace the composition-function-table > (which is a char-table that maps chars to regexps and then to code) with > a lex-style FSM. Such a thing would also be useful for syntax-tables to > be able to deal with multi-char lexemes (like "begin" and "end"). Does FSM stands for Finit State Machine? Currently those regexps are very simple, and just an alist (((FROM-CHAR . TO-CHAR) FUNC) ...) will work. But, at the moment, I'm not sure that such a simple specification works for all scripts. > > So, another way is to re-design the current redisplay engine > > to generate a composition glyph every time just by calling C > > functions. I think it's an interesting experiment. > Might be worthwhile as well, tho I have no idea if there's an actual > performance problem to solve here. Going through elisp is also > convenient: I currently use font-lock in haskell-mode, sml-mode, and > coq-mode to compose things like "->" into "→", but auto-composition-mode > would seem like an even better fit. But, if we can't attach `auto-composed' and `composition' property to a buffer, the requirement for the speed will be higher. We have to do some experiment to check the performance. Another idea is to have an alist of (FRAME . INTERVAL-FOR-COMPOSITION) for each buffer. --- Kenichi Handa handa@ni.aist.go.jp