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: Stefan Kangas
Subject: bug#50674: Major mode for etc/AUTHORS with basic font-locking
Date: Sun, 19 Sep 2021 10:38:32 -0700

Juri Linkov <juri@linkov.net> writes:

>> +;;;###autoload
>> +(define-derived-mode etc-authors-mode special-mode "Authors View"
>> +  "Major mode for viewing \"etc/AUTHORS\" from the Emacs distribution.
>> +Provides some basic font locking and not much else."
>> +  (setq-local font-lock-defaults
>> +              '(etc-authors-mode-font-lock-keywords nil nil ((?_ . "w"))))
>> +  (setq font-lock-multiline nil)
>> +  (etc-authors-mode--hide-local-variables))
>
> Isn't generic-x.el a more suitable place for such small modes?

The problem I see is that this does not use `define-generic-mode',
unlike the other modes in there, and also I'm not sure it makes sense to
drop autoloaded functions in there.  AFAIU, that file and its modes is
supposed to be optional (not that I agree that they should be).





reply via email to

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