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: Possible redisplay performance enhancements (revisited) Date: Mon, 24 Apr 2006 16:35:28 +0900 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1145864229 17638 80.91.229.2 (24 Apr 2006 07:37:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 24 Apr 2006 07:37:09 +0000 (UTC) Cc: mituharu@math.s.chiba-u.ac.jp, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 24 09:37:03 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 1FXvcq-0000ib-Jp for ged-emacs-devel@m.gmane.org; Mon, 24 Apr 2006 09:36:52 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FXvcp-0006As-SZ for ged-emacs-devel@m.gmane.org; Mon, 24 Apr 2006 03:36:51 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FXvbj-00060d-0n for emacs-devel@gnu.org; Mon, 24 Apr 2006 03:35:43 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FXvbf-0005zs-II for emacs-devel@gnu.org; Mon, 24 Apr 2006 03:35:42 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FXvbe-0005zi-Tq for emacs-devel@gnu.org; Mon, 24 Apr 2006 03:35:39 -0400 Original-Received: from [192.47.44.130] (helo=tsukuba.m17n.org) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FXvdo-0005IT-1M; Mon, 24 Apr 2006 03:37:52 -0400 Original-Received: from nfs.m17n.org (nfs.m17n.org [192.47.44.7]) by tsukuba.m17n.org (8.13.4/8.13.4/Debian-3sarge1) with ESMTP id k3O7ZWV4020221; Mon, 24 Apr 2006 16:35:32 +0900 Original-Received: from etlken (etlken.m17n.org [192.47.44.125]) by nfs.m17n.org (8.13.4/8.13.4/Debian-3sarge1) with ESMTP id k3O7ZUEJ006622; Mon, 24 Apr 2006 16:35:30 +0900 Original-Received: from handa by etlken with local (Exim 3.36 #1 (Debian)) id 1FXvbU-0000P5-00; Mon, 24 Apr 2006 16:35:28 +0900 Original-To: Eli Zaretskii In-reply-to: (message from Eli Zaretskii on Fri, 21 Apr 2006 15:37:02 +0300) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/22.0.50 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI) 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:53305 Archived-At: In article , Eli Zaretskii writes: >> Date: Fri, 21 Apr 2006 18:47:40 +0900 >> From: YAMAMOTO Mitsuharu >> >> 2. Need to check face_id < BASIC_FACE_ID_SENTINEL in get_*_face_and_encoding? >> http://lists.gnu.org/archive/html/emacs-devel/2006-02/msg00238.html >> >> No response, but I couldn't find any reason to distinguish >> known faces from others with respect to encode_char. > I think it doesn't want to assume single-byte for unknown faces, but > I'm not sure if this is really needed. > Handa-san, could you please comment on the suggested patch (below)? I don't know why Gerd put that condition in the code. But, as the code in fontset always uses a font specified for ASCII for ASCII code (see below), I think the proposed patch is safe. static Lisp_Object fontset_ref (fontset, c) Lisp_Object fontset; int c; { int charset, c1, c2; Lisp_Object elt, defalt; if (SINGLE_BYTE_CHAR_P (c)) return FONTSET_ASCII (fontset); [...] } >> Index: src/xdisp.c >> =================================================================== >> RCS file: /cvsroot/emacs/emacs/src/xdisp.c,v >> retrieving revision 1.1089 >> diff -c -r1.1089 xdisp.c >> *** src/xdisp.c 20 Apr 2006 23:03:03 -0000 1.1089 >> --- src/xdisp.c 21 Apr 2006 08:47:17 -0000 >> *************** >> *** 18495,18502 **** >> sure to use a face suitable for unibyte. */ >> STORE_XCHAR2B (char2b, 0, glyph->u.ch); >> } >> ! else if (glyph->u.ch < 128 >> ! && glyph->face_id < BASIC_FACE_ID_SENTINEL) >> { >> /* Case of ASCII in a face known to fit ASCII. */ >> STORE_XCHAR2B (char2b, 0, glyph->u.ch); >> --- 18495,18501 ---- >> sure to use a face suitable for unibyte. */ >> STORE_XCHAR2B (char2b, 0, glyph->u.ch); >> } >> ! else if (glyph->u.ch < 128) >> { >> /* Case of ASCII in a face known to fit ASCII. */ >> STORE_XCHAR2B (char2b, 0, glyph->u.ch); >> *************** >> *** 18897,18903 **** >> face_id = FACE_FOR_CHAR (f, face, c); >> face = FACE_FROM_ID (f, face_id); >> } >> ! else if (c < 128 && face_id < BASIC_FACE_ID_SENTINEL) >> { >> /* Case of ASCII in a face known to fit ASCII. */ >> STORE_XCHAR2B (char2b, 0, c); >> --- 18896,18902 ---- >> face_id = FACE_FOR_CHAR (f, face, c); >> face = FACE_FROM_ID (f, face_id); >> } >> ! else if (c < 128) >> { >> /* Case of ASCII in a face known to fit ASCII. */ >> STORE_XCHAR2B (char2b, 0, c); >> >> --- Kenichi Handa handa@m17n.org