Hi again, On 27.07.2021 02:04, Dmitry Gutov wrote: > On 26.07.2021 19:56, Ergus via Bug reports for GNU Emacs, the Swiss army > knife of text editors wrote: >> Any progress/suggestion on this? > > Only internally. > > Let me get back to you on this in a couple of days. Sorry for the long wait, this feature ties into another old discussion, and I wasn't sure how to proceed best. Anyway, here's a patch to try (attached). It should recover performance lost back in 4ca13d98c9e while retaining flexibility (and even adding more). There are still less than optimal places there (e.g. file-in-directory-p is not very fast), and the modules list is read from the disk every time, so some further optimization should be possible. But first please try this version.