bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#50674: Major mode for etc/AUTHORS with basic font-locking


From: Juri Linkov
Subject: bug#50674: Major mode for etc/AUTHORS with basic font-locking
Date: Mon, 20 Sep 2021 18:24:32 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

> 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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]