From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#50674: Major mode for etc/AUTHORS with basic font-locking Date: Mon, 20 Sep 2021 18:24:32 +0300 Organization: LINKOV.NET Message-ID: <874kafqx57.fsf@mail.linkov.net> References: <87o88oikye.fsf@mail.linkov.net> <87ee9jpxke.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31571"; 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: 50674@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 20 17:45:05 2021 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 1mSLTd-00086U-4X for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 20 Sep 2021 17:45:05 +0200 Original-Received: from localhost ([::1]:55986 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mSLTc-0006x9-0w for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 20 Sep 2021 11:45:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52950) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mSLE7-0001M5-Bv for bug-gnu-emacs@gnu.org; Mon, 20 Sep 2021 11:29:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60543) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mSLE7-0008Ge-0o for bug-gnu-emacs@gnu.org; Mon, 20 Sep 2021 11:29:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mSLE6-0001yZ-JF for bug-gnu-emacs@gnu.org; Mon, 20 Sep 2021 11:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Sep 2021 15:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50674 X-GNU-PR-Package: emacs Original-Received: via spool by 50674-submit@debbugs.gnu.org id=B50674.16321517417583 (code B ref 50674); Mon, 20 Sep 2021 15:29:02 +0000 Original-Received: (at 50674) by debbugs.gnu.org; 20 Sep 2021 15:29:01 +0000 Original-Received: from localhost ([127.0.0.1]:43854 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mSLE5-0001y9-CB for submit@debbugs.gnu.org; Mon, 20 Sep 2021 11:29:01 -0400 Original-Received: from relay8-d.mail.gandi.net ([217.70.183.201]:60451) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mSLDz-0001xQ-M4 for 50674@debbugs.gnu.org; Mon, 20 Sep 2021 11:28:56 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 392FC1BF204; Mon, 20 Sep 2021 15:28:47 +0000 (UTC) In-Reply-To: (Stefan Kangas's message of "Mon, 20 Sep 2021 11:14:01 +0200") 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:214871 Archived-At: > Thinking about this a bit more, what is the problem with just keeping > this in its own file? It is fairly self-contained and not really > related to anything else. If the worry is that it will clutter > lisp/textmodes, perhaps we could add a new directory where such > "small" modes could go. It really will clutter lisp/textmodes. For the same reasoning all modes in generic-x.el should be moved to separate files that makes no sense. So the current situation is following: we have generic-x.el for such small modes like etc-passwd-generic-mode and etc-authors-mode. But the problem is that modes in generic-x.el are not autoloaded. I don't understand why visiting /etc/passwd doesn't highlight it properly when etc-passwd-generic-mode is available for this file? But I see no problem to autoload all available modes from generic-x.el. > A natural first step would be to make those modes load unconditionally, > but that proposal has been rejected; see my last two commits to > generic-x.el. Perhaps it will be okay to load only some of the modes > unconditionally. I agree that only some should be loaded unconditionally. For example, we should not use modes for filename regexps that are not specific, such as '("alias\\'") and '("inventory\\'") that has too wide coverage to produce false matches. OTOH, autoloaded modes should be enabled by default for "/etc/passwd", "/etc/fstab", "emacs.*/etc/AUTHORS\\'" that has no problem of mismatching.