From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Error during redisplay Date: Wed, 27 Feb 2008 11:06:21 -0500 Message-ID: References: <85ir0aubo1.fsf@lola.goethe.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1204128427 5319 80.91.229.12 (27 Feb 2008 16:07:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Feb 2008 16:07:07 +0000 (UTC) Cc: lekktu@gmail.com, rms@gnu.org, emacs-devel@gnu.org To: Kenichi Handa Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 27 17:07:32 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 1JUOoW-00034A-Go for ged-emacs-devel@m.gmane.org; Wed, 27 Feb 2008 17:07:24 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JUOo0-0002Ke-D1 for ged-emacs-devel@m.gmane.org; Wed, 27 Feb 2008 11:06:52 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JUOnw-0002KH-W5 for emacs-devel@gnu.org; Wed, 27 Feb 2008 11:06:49 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JUOnv-0002Jn-E5 for emacs-devel@gnu.org; Wed, 27 Feb 2008 11:06:48 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JUOnv-0002Jk-8X for emacs-devel@gnu.org; Wed, 27 Feb 2008 11:06:47 -0500 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JUOno-0003UE-6A; Wed, 27 Feb 2008 11:06:40 -0500 Original-Received: from ceviche.home (vpn-132-204-232-211.acd.umontreal.ca [132.204.232.211]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id m1RG6kpC023293; Wed, 27 Feb 2008 11:06:46 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id 35058B40C5; Wed, 27 Feb 2008 11:06:21 -0500 (EST) In-Reply-To: (Kenichi Handa's message of "Wed, 27 Feb 2008 17:04:14 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-NAI-Spam-Score: -2.5 X-NAI-Spam-Rules: 2 Rules triggered BAYES_00=-2.5, HAS_X_HELO=0 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) 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:90619 Archived-At: >> Since the same string can be displayed with different fonts >> simultaneously, this would look like a fault in the design. The >> composition property/whatever apparently needs to be associated with the >> actual display, not just the string. > In such a case, the composition property is generated each > time. The same situation happens when you display the same > portion of a buffer in two frames with different fonts. 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? > By the way, I think the slowness is mainly because the What slowness? > 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"). > 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 "=E2=86=92", but auto-composition= -mode would seem like an even better fit. Stefan