From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Ergus Newsgroups: gmane.emacs.devel Subject: Re: Question about display engine Date: Wed, 28 Aug 2019 00:20:25 +0200 Message-ID: <20190827222025.p2cbjwak4ysi3ept@Ergus> References: <20190819161305.uwlgsm44yjrmul3o@Ergus> <83pnl1kskj.fsf@gnu.org> <20190819213024.ciukp34xmgrzh7yn@Ergus> <83imqskjyb.fsf@gnu.org> <20190825102205.rxhmu3bukraywhok@Ergus> <83lfvhh6dn.fsf@gnu.org> <20190826043145.pm5aplrxna5hwcso@Ergus> <83y2zgfjzs.fsf@gnu.org> <20190826081819.cuhm3tpw3lq3m5jh@Ergus> <83mufwfe8o.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="9816"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: NeoMutt/20180716 Cc: rudalics@gmx.at, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 28 00:20:57 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i2jpf-0002Oe-TE for ged-emacs-devel@m.gmane.org; Wed, 28 Aug 2019 00:20:56 +0200 Original-Received: from localhost ([::1]:59206 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2jpb-00042p-4i for ged-emacs-devel@m.gmane.org; Tue, 27 Aug 2019 18:20:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41807) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2jpN-00040x-HJ for emacs-devel@gnu.org; Tue, 27 Aug 2019 18:20:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i2jpK-00031F-V3 for emacs-devel@gnu.org; Tue, 27 Aug 2019 18:20:36 -0400 Original-Received: from sonic306-21.consmr.mail.ir2.yahoo.com ([77.238.176.207]:41480) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i2jpK-0002zZ-IO for emacs-devel@gnu.org; Tue, 27 Aug 2019 18:20:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1566944431; bh=g7JUitP07mVOBTy3WzmqD1Gcsxgma8r0CsCqRsNDhNw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject; b=U8eEXU4jXzsBye/ijIoOxR44nGlNcLfP3KKquaCMGyM5J3ia1quLewUrU3FnIW2S4Gcft5eBZ0cJhRcUTalOYTAyyA0Cn+5tSy+qeFN7782qm3NpIQN4zqDJJ02xUjHymixsgE7u/3/rzbNTREXFpbg/9ejD3HsKxiUaeggLJnjxPxpbKqAQ1zfdVNhY9HMpATkyBhgh/ewanoiy1jfoKVq015WlvHQh/YnZ3mUcpGWWpWT6Otaj8fzwu6x4lfw0S+FqdlhKjFcvcnyDOlS0FuY7xpG4Qs6vdKKRGuJsFYFKJ9RLZ8hfHpZEnlzPV4USrbwqF0C7LxDr5Lrz0/RCJA== X-YMail-OSG: fD9Kd7kVM1mhHDVD8g0bZiFQKUJDIfFF9x4SZidI7IR.77_TFmdaqmnzO7xHrH3 DL.BYP4UfNfU_DzohGyWvt.De8Z1fdMSSyJYupEoO0HtsWJPK31fx0HBzTWzYLCoP87yfHRB3E8H 0QwmFsT3WcSFm4TYECI.DtmfqcMnQ09vl0IG5mPGHKKfQc3qAyeHKqLH_6UWemVqs_Z.iMjLxofy 1Mh6L4u3Nsc_9vdWeus_RD7wyEdP50DWxF6Vkpgr8wWxHmsbB3ytKClCXEv3Y03ogXEVFZJsBZuA qX_acDJiAMou76EFQI.FsWONtnxlaErCehHoNMivNV_k4.kwhcMUTJSeccIUWabDr5q__4FcnAe4 w8EWMS5bHlHNs6lZfVLCqsVKimg7_spF8VmgDJspZB_7psw0N1a3FIGuZzI6VeFkEPufViamqR.p 0Gxeom6PYrx.Kv4_yB0LQPkiIdhRUzYFQfO_5ENWLhfPhVxJH6wqVpIP7yOrVvEqsaUHlDPzrLT8 bm_NIwEfCecJ2MX.4qineAZ1nBBIs7M8C9Pu4j6BzLVq8l4EG2hPz.AGqVBRerK0v4gf4hvK9c8p 4juNfMkom_6tmQLNxvn8X7bvCyDPpYzlAjRpfydt7WkdYRYbyqGuQBcaaVo8o4avh2dGunMOKQjs CoWC9nUzX2n3OCj87yVx7TahTCKm74VpAOL0fDTTA3PMlwCEyae292Yq4Bu1Zu8i4gxFzBEOq6at zNem_q2RxucWvRsXBaSMQafnIDIQCk1rW91GSs90aNYrv3TRR_pSv9h173Rtt49QwAWgYadaDlX0 3E8UWWXRRNWZIHDSOh2ZSPq12ZaKYjJeMo4yJwLlei Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.ir2.yahoo.com with HTTP; Tue, 27 Aug 2019 22:20:31 +0000 Original-Received: by smtp401.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 94019c15e910349515583b0ec6913a95; Tue, 27 Aug 2019 22:20:30 +0000 (UTC) Content-Disposition: inline In-Reply-To: <83mufwfe8o.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 77.238.176.207 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:239631 Archived-At: On Mon, Aug 26, 2019 at 12:49:27PM +0300, Eli Zaretskii wrote: >> Date: Mon, 26 Aug 2019 10:18:19 +0200 >> From: Ergus >> Cc: rudalics@gmx.at, emacs-devel@gnu.org >> >> >> Could you please finally explain what are all the points needed in the >> >> implementation? And more or less the changes needed/expected? >> > >> >Regarding face extension, or regarding highlight-indentation? These >> >were 2 separate discussions, but you somehow conflated them together >> >in your last email. >> >> Regarding face extension > >The summary was posted by Martin here: > > https://lists.gnu.org/archive/html/emacs-devel/2019-08/msg00324.html > >If something there is unclear, please ask specific questions. > >Thanks. > Hi Eli: Starting with this I just need a couple of details to clarify if I understand everything: (1) Provide an :extend face attribute with the semantics to extend, if set, any "background-related" attributes like :background, :underline, :box ... specified by this face. The extend attribute here must be just a boolean to extend everything set in this class or something to specify what to extend from within this face? (2) When merging faces, set an extend-background, extend-underline, extend-box ... bit for all background-related attributes whenever the face merged in has both the :extend attribute non-nil and the corresponding background-related attribute set. (3) When the display engine encounters a newline character and the current face has one of the extend-* bits set, either reuse or create a new realized face based on the current face, removing from a new realized face any background-related information for which the current face that has the corresponding extend-* bit set. For example, if the current face specifies a background, remove that in the new face if the extend-background bit is unset. (4) Use the face found or made in (3) for glyphs on the rest of the current line. 1- Are the bits stored in the class or they are supposed to be like a display engine state variable? Check this true table please: merge_faces (struct window *w, Lisp_Object face_name, int face_id, int base_face_id) struct face = {extend_flag; bg, extend_bg_flag} base_face -> face = merged {true, nil, false} -> {false, y, false} -> {false, y, true} // ???? {false, x, false} -> {true, nil, false} -> {true, x, true} // Is this fine? When in 3 it says "remove", what does it means? set it to x, to default or to nil? In case we don't extend, the extra space we add after the line should have the default, face or the last in the line??