From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#56637: 28.1.90; [FR] Allow a way around font-lock-mode being unconditionally disabled in " *hidden*" buffers Date: Sun, 24 Jul 2022 14:47:17 +0800 Message-ID: References: <874jzdhh5m.fsf@localhost> <871qug4dyk.fsf@localhost> <87wnc61x8a.fsf@localhost> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000bbfcd605e4876c2b" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21973"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56637@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 24 09:11:18 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oFVlm-0005Yy-6H for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 24 Jul 2022 09:11:18 +0200 Original-Received: from localhost ([::1]:56826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFVll-0007xn-0c for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 24 Jul 2022 03:11:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49786) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFVOI-0005ec-8j for bug-gnu-emacs@gnu.org; Sun, 24 Jul 2022 02:47:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56977) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFVOH-0003TF-W5 for bug-gnu-emacs@gnu.org; Sun, 24 Jul 2022 02:47:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oFVOH-0003ZR-QV for bug-gnu-emacs@gnu.org; Sun, 24 Jul 2022 02:47:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Jul 2022 06:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56637 X-GNU-PR-Package: emacs Original-Received: via spool by 56637-submit@debbugs.gnu.org id=B56637.165864518813671 (code B ref 56637); Sun, 24 Jul 2022 06:47:01 +0000 Original-Received: (at 56637) by debbugs.gnu.org; 24 Jul 2022 06:46:28 +0000 Original-Received: from localhost ([127.0.0.1]:46726 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oFVNj-0003YQ-T0 for submit@debbugs.gnu.org; Sun, 24 Jul 2022 02:46:28 -0400 Original-Received: from mail-lf1-f45.google.com ([209.85.167.45]:33385) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oFVNh-0003YD-KX for 56637@debbugs.gnu.org; Sun, 24 Jul 2022 02:46:26 -0400 Original-Received: by mail-lf1-f45.google.com with SMTP id t17so1385753lfk.0 for <56637@debbugs.gnu.org>; Sat, 23 Jul 2022 23:46:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=UyhoK0ObIRCgcP/TWigejos82hBDAk+deSsaY3iKxgo=; b=pxHg2wAurZ/uoNFFdkseSg+ZSUeAOF2zvWeFeDzxOG0Clc92WBwqpsN+Zomoy36a+D lTDtT+ysfuEaerOYc3gaZUH3o5YCM6MhCrXgP8L8fO/RTLSFaxmwJg/blhIVLi7KY2oE JluNdVgTWuRR8VZhsxEoGKAlDdNP9MwDKbyT+2weFu3WB2ERrH9yC3w0vtlsnPJ2LBQX NsGxn0oJGXvcLc+xoQNwWD6Mh5KhGaRVUEERF935RFnl6zL9d/cjFlPRb280bHJeAN0U gWhtX0GfHQhs809qeTQxKg+QRGg/K7DdUNA1RxIJxErKl56VHKz4h3AOJ5qDN634m6aa S/Bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UyhoK0ObIRCgcP/TWigejos82hBDAk+deSsaY3iKxgo=; b=d6ApcQzMGHg8hyYN3tUemEvqv4VDmwB6NhdDYx5ZtooaKqv5sF7+FzrNtuqBofzOpW +ZCxT1HPOA/m2gcX3wHQLYbLz8o3EyHfchv1I3pRf4iMrsfAUJmyQNWGpKO/Raz8wXEg 0EeJqNG6lYsKsKVOI0hVoNSa/LWWo+gJUR0MF8oATskNKhJzpWpxJRsJFoyA0DOJGB6m wqIxxg/SvBVWythwES4hiYD4yPlvEoxPXw5K/LBIht2KKNjtPe2KQHI6xMY1OaEFhJww OPJ1DtTrQd8lqPXWCDhEaU7p6Sz0AQM05uISv0VDWrpeF941HdV5pi2wN+QrWG+o2hnY P+Vw== X-Gm-Message-State: AJIora8FiEzM5n2SJlw80m0+0UM7zqNNrq/ZLLxpSFDaKND13wB1M/zx rNFegNZ1LSUD5+FcDtdD30dJILfzUnks2Na9HLM= X-Google-Smtp-Source: AGRyM1uYoDYwwHfqvalQY5LgZaOi2BtTfaZ9C7twCQq/tnfODaRXbzRqGRMFTTlneVZufk3+a95ZLjolQASHCF2ASJ4= X-Received: by 2002:a05:6512:c08:b0:48a:7cfe:44c8 with SMTP id z8-20020a0565120c0800b0048a7cfe44c8mr2419522lfu.120.1658645179528; Sat, 23 Jul 2022 23:46:19 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:237809 Archived-At: --000000000000bbfcd605e4876c2b Content-Type: text/plain; charset="UTF-8" Stefan Monnier writes: >> Apart from the reddit thread I mentioned, where the problem comes from >> web-mode directly setting font-lock-face, > > I didn't see a clear recipe there, tho. Setting the `font-lock-face` > directly is normal, so it's not clear that it's a problem on the side of > `web-mode`, really. When font-lock-mode is active, char-property-alias-alist contains '(face font-lock-face). Thus, 'face text property is inheriting the value of the 'font-lock-face property. It is not the case when font-lock-mode is disabled. Unless we can forever rely on the implementation detail that 'font-lock-face is always equivalent to the 'face property, there is no easy way to tell which faces will be applied to the fontified buffer with enabled font-lock-mode. Best, Ihor On Fri, Jul 22, 2022 at 2:39 AM Stefan Monnier wrote: > > Apart from the reddit thread I mentioned, where the problem comes from > > web-mode directly setting font-lock-face, > > I didn't see a clear recipe there, tho. Setting the `font-lock-face` > directly is normal, so it's not clear that it's a problem on the side of > `web-mode`, really. > > > Stefan > > --000000000000bbfcd605e4876c2b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> Apart from th= e reddit thread I mentioned, where the problem comes from
>> web-m= ode directly setting font-lock-face,
>
> I didn't see a cle= ar recipe there, tho.=C2=A0 Setting the `font-lock-face`
> directly i= s normal, so it's not clear that it's a problem on the side of
&= gt; `web-mode`, really.

When font-lock-mode is active, char-property= -alias-alist contains
'(face font-lock-face). Thus, 'face text p= roperty is inheriting the
value of the 'font-lock-face property. It = is not the case when
font-lock-mode is disabled. Unless we can forever r= ely on the
implementation detail that 'font-lock-face is always equi= valent to the
'face property, there is no easy way to tell which fac= es will be applied
to the fontified buffer with enabled font-lock-mode.<= br>
Best,
Ihor

On Fri, Jul 22, 2022 at 2:39 AM Stefan Monnier <= monnier@iro.umontreal.ca>= ; wrote:
> Ap= art from the reddit thread I mentioned, where the problem comes from
> web-mode directly setting font-lock-face,

I didn't see a clear recipe there, tho.=C2=A0 Setting the `font-lock-fa= ce`
directly is normal, so it's not clear that it's a problem on the si= de of
`web-mode`, really.


=C2=A0 =C2=A0 =C2=A0 =C2=A0 Stefan

--000000000000bbfcd605e4876c2b--