From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#58888: 28.1.90; font-lock-defaults not respected when hack-local-variables unsafe variable dialogue is displayed before setting the defaults Date: Thu, 11 Apr 2024 09:27:44 -0400 Message-ID: References: <878rkxajcs.fsf@localhost> <87cza8jwm6.fsf@localhost> <87sezv3bct.fsf@localhost> <868r1kv2ry.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40900"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: yantar92@posteo.net, 58888@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 11 15:29:16 2024 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 1ruuUN-000AOz-Pn for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 11 Apr 2024 15:29:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ruuU2-0002PO-EJ; Thu, 11 Apr 2024 09:28:54 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ruuU1-0002PA-GL for bug-gnu-emacs@gnu.org; Thu, 11 Apr 2024 09:28:53 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ruuU1-0006SF-6g for bug-gnu-emacs@gnu.org; Thu, 11 Apr 2024 09:28:53 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ruuUA-0002SC-4Z for bug-gnu-emacs@gnu.org; Thu, 11 Apr 2024 09:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Apr 2024 13:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58888 X-GNU-PR-Package: emacs Original-Received: via spool by 58888-submit@debbugs.gnu.org id=B58888.17128420889006 (code B ref 58888); Thu, 11 Apr 2024 13:29:02 +0000 Original-Received: (at 58888) by debbugs.gnu.org; 11 Apr 2024 13:28:08 +0000 Original-Received: from localhost ([127.0.0.1]:55295 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ruuTH-0002LB-3v for submit@debbugs.gnu.org; Thu, 11 Apr 2024 09:28:08 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:5030) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ruuTC-0002K0-MD for 58888@debbugs.gnu.org; Thu, 11 Apr 2024 09:28:04 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 60A0A441EDC; Thu, 11 Apr 2024 09:27:47 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1712842065; bh=R0oSmoW20cr7lWF9OdMEHYO+5SFGq/1CBKCQmXzAZ+4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=F0i6Nd2OnUs4xxT7qluCWLkHD0h8qFmh+MNzMjOHQGlAVpRpoAHRi0UTDhNS9n9dh /FwmECT9CmknO1lxQQ0nvqZ1FOznqe6WYdtdvOlVzPrkySuypYSHZIQF0LK+ImN2zX 90njN6/WcUKvenMEtYz/cA7N7QF/xY2jCz2EqRU9BLbcz9y/mcCRpeS+m3FpR6Vwfi Gm2hmCikgVDMqUcHxlUv3Q+YvAqNRRMVxDp8hP68aPBbF4D2BrhQvNsCe/2AuaHEjJ KiaiT/qcu8Fr88vwUukNe5sa1Od3G1jz34gvyFblLArevW9YZiT9rJxwsRL8O2r/N1 hQThyzOV+Plfw== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id C0FC7441D20; Thu, 11 Apr 2024 09:27:45 -0400 (EDT) Original-Received: from pastel (unknown [45.72.201.215]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 9A2BE1201F4; Thu, 11 Apr 2024 09:27:45 -0400 (EDT) In-Reply-To: <868r1kv2ry.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 11 Apr 2024 09:20:33 +0300") 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:283094 Archived-At: > Any idea how many major modes out there don't use run-mode-hooks? Hard to tell. I did a quick grep '^[^;]*kill-all-local-variables' $(grep -L run-mode-hooks **/*.el) in our own code, and it shows a fairly large number of occurrences, but once you look at them it's not clear what to make of them. Many of them don't bother to define an actual mode for the buffer, they just call `kill-all-local-variables` then fill the buffer somehow, occasionally do some major-mode-like setup such as `use-local-map`, and finally display the result to the user. > We are basically breaking those with this change, right? Yes. More specifically the minor modes defined with `define-globalized-minor-mode` will stay inactive in them. > Please don't quote `like this`. (I think you should by now have a > commit hook in your init files that replaces the quoting with our > style, because this seems to be ubiquitous in all your writings.) I do my best to follow the ugly `...' convention in ELisp file and the '...' convention in our other files, but not for anything else. I strongly prefer the Markdown convention over '...' because it's a convention enshrined in many tools. I could live with the Org convention if you prefer, but I strongly feel that we should use notational conventions that tools are able to use. > IMO, this NEWS entry is not detailed enough. First, it should mention > that run-mode-hooks is the modern way of running the mode's hook, a > replacement for run-hooks. And second, it should at least hint on > what will happen with modes which don't use run-mode-hooks, so that > affected users could identify the problem when they see its signs. > > Also, I think we should tell in the ELisp manual that run-mode-hooks > is now a must, not just a preference, and we should mention in the > Minor Modes chapter that the globalized minor modes will work > correctly only if the major mode uses run-mode-hooks to run its hooks. I'll get back to this once we decide we do want the change. Stefan