emacs-devel
[Top][All Lists]
Advanced

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

Re: master 0161c9d 1/2: Load all generic-x.el modes unconditionally


From: Stefan Monnier
Subject: Re: master 0161c9d 1/2: Load all generic-x.el modes unconditionally
Date: Thu, 11 Feb 2021 10:07:29 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> They may not be very impressive, but surely they are better than
> nothing.  If they are not better than nothing, they should probably
> better be removed.
> What am I missing?

I see two risks, really:

1- some of the regexps used may overlap with some pre-existing entries
   on the default `auto-mode-alist`.  I don't know that it's the case,
   but I think there are enough regexps in `generic-x` and on
   `auto-mode-alist` to make such an overlap possible if not likely.

2- They're only added to `auto-mode-alist` when `generic-x` is loaded,
   which may be too late: they may end up hiding entries added by
   user-installed ELPA packages or by some other part of the user's
   init file.

So, maybe a better solution is to make sure the entries are added to the
*end* of `auto-mode-alist`, which should make them harmless enough.


        Stefan


PS: FWIW, in my case it would make them largely ineffective since I have:

    (setq auto-mode-alist (append auto-mode-alist '(("\\.[^/.]+\\'" ignore t))))




reply via email to

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