From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#39597: 27.0.60: M-x occur adds fontification to fundamental-mode Date: Sun, 23 Feb 2020 02:24:15 +0200 Organization: LINKOV.NET Message-ID: <871rqmnob4.fsf@mail.linkov.net> References: <87imk960qb.fsf@gmail.com> <8736b8eosv.fsf@mail.linkov.net> <874kvna4uv.fsf@mail.linkov.net> <83zhddjomi.fsf@gnu.org> <871rqpt6qm.fsf@gmail.com> <83wo8hjajp.fsf@gnu.org> <87sgj4sxlu.fsf@gmail.com> <83tv3kjslp.fsf@gnu.org> <87a75biwp6.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="4429"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: 39597@debbugs.gnu.org, Stefan Monnier To: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 23 01:45:24 2020 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 1j5fOd-00014q-U1 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 23 Feb 2020 01:45:24 +0100 Original-Received: from localhost ([::1]:48388 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j5fOc-0001wg-Rp for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 22 Feb 2020 19:45:22 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33178) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j5fOJ-0001sZ-TX for bug-gnu-emacs@gnu.org; Sat, 22 Feb 2020 19:45:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j5fOI-0003gv-UD for bug-gnu-emacs@gnu.org; Sat, 22 Feb 2020 19:45:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44295) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j5fOI-0003gr-Qw for bug-gnu-emacs@gnu.org; Sat, 22 Feb 2020 19:45:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j5fOI-00009s-PA for bug-gnu-emacs@gnu.org; Sat, 22 Feb 2020 19:45:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 23 Feb 2020 00:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39597 X-GNU-PR-Package: emacs Original-Received: via spool by 39597-submit@debbugs.gnu.org id=B39597.1582418688525 (code B ref 39597); Sun, 23 Feb 2020 00:45:02 +0000 Original-Received: (at 39597) by debbugs.gnu.org; 23 Feb 2020 00:44:48 +0000 Original-Received: from localhost ([127.0.0.1]:50261 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j5fO4-00008P-9k for submit@debbugs.gnu.org; Sat, 22 Feb 2020 19:44:48 -0500 Original-Received: from bongo.elm.relay.mailchannels.net ([23.83.212.21]:9863) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j5fO2-00008G-31 for 39597@debbugs.gnu.org; Sat, 22 Feb 2020 19:44:46 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 0A7A6500DCB; Sun, 23 Feb 2020 00:44:45 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a92.g.dreamhost.com (100-96-38-98.trex.outbound.svc.cluster.local [100.96.38.98]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 86E77500E0A; Sun, 23 Feb 2020 00:44:44 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a92.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.5); Sun, 23 Feb 2020 00:44:44 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Madly-Broad: 57fdbd814785cffe_1582418684842_1001808831 X-MC-Loop-Signature: 1582418684842:3058533211 X-MC-Ingress-Time: 1582418684841 Original-Received: from pdx1-sub0-mail-a92.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a92.g.dreamhost.com (Postfix) with ESMTP id 346B87F1BF; Sat, 22 Feb 2020 16:44:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=linkov.net; bh=bRIlt9 RfQ0q/irzrj0oX1uOAakQ=; b=s0CWitm7Dcnx5FjNa3xq0QdwYpSeZReW28SauS SP9jA7erGIuGAK2sZrvecjTwxCuH/vyYrBZ33xplh90LA+U32Z1Gi36lIBtaSPc4 jmq70WmkPHIohlkWgM9IzRpQLRkS1G8i8oj6URlDKyW6Zh+okhZV/V1+tJq0Yxs5 D9Jjk= Original-Received: from localhost.linkov.net (m91-129-103-27.cust.tele2.ee [91.129.103.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a92.g.dreamhost.com (Postfix) with ESMTPSA id 50C657F1C8; Sat, 22 Feb 2020 16:44:37 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a92 In-Reply-To: <87a75biwp6.fsf@gmail.com> ("=?UTF-8?Q?K=C3=A9vin?= Le Gouguec"'s message of "Fri, 21 Feb 2020 20:09:41 +0100") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedugedrkeejgddvudcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtgfesthekredttderjeenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdefrddvjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehlohgtrghlhhhoshhtrdhlihhnkhhovhdrnhgvthdpihhnvghtpeeluddruddvledruddtfedrvdejpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtohepkhgvvhhinhdrlhgvghhouhhguhgvtgesghhmrghilhdrtghomh X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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:176410 Archived-At: > Idle musing: I wonder if something could be done inside > fundamental-mode. It's not the only fontification issue I've noticed > there[1]. > > [1] E.g. (I was about to report this as a distinct issue=E2=80=A6 somed= ay=E2=80=A6) > > C-x b foo > foo RET bar RET baz RET > M-s h r a RET RET > aaaa > > =E2=87=92 In all modes *but* fundamental-mode, hi-lock-mode dynamic= ally > highlights new matches (e.g. the added "aaaa" string here). > > This bug is not strictly related to the current one, since the > former has been with us since at least 26.3, but that does make me > wonder whether both issues could be solved by turning some font-loc= k > knob in fundamental-mode=E2=80=A6 Searching for "font-lock-specified-p" in hi-lock.el shows these fragments of code. This first condition decides whether to use font-lock for highlighting matches that returns nil in fundamental-mode: (if (and font-lock-mode (font-lock-specified-p major-mode)) ;; FIXME: Calling `font-lock-remove-keywords' causes ;; `font-lock-specified-p' to go from nil to non-nil (because it ;; calls font-lock-set-defaults). This is yet-another bug in ;; font-lock-add/remove-keywords, which we circumvent here by ;; testing `font-lock-fontified' (bug#19796).