unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: emacs-devel@gnu.org
Subject: Re: master 9ac6ff5: Make the test for auto-mode-alist from .dir-local.el stricter
Date: Sat, 24 Jul 2021 10:28:19 -0400	[thread overview]
Message-ID: <jwvmtqbpz4m.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87o8ashxeb.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 24 Jul 2021 11:30:20 +0200")

Lars Ingebrigtsen [2021-07-24 11:30:20] wrote:
> larsi@gnus.org (Lars Ingebrigtsen) writes:
>> +       (not (provided-mode-derived-p mode 'special-mode))))
> This may be too strict...  on the other hand, perhaps the check should
> be even stricter -- perhaps a whitelist of allowed modes?  (Perhaps (by
> default) populated from `auto-mode-alist'.)

Could you clarify what is the purpose of this test?

AFAICT the test that "corresponds" to what we do for file-local
variables is just to check the `-mode` suffix (since we accept any
`mode:foo` and call `foo-mode`).

So if you think we should make it stricter for the dir-local
auto-mode-alist, maybe we should also make it stricter for the
file-local `mode:` thingy.


        Stefan




  reply	other threads:[~2021-07-24 14:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210724091626.2905.69508@vcs0.savannah.gnu.org>
     [not found] ` <20210724091628.9C95920D0A@vcs0.savannah.gnu.org>
2021-07-24  9:30   ` master 9ac6ff5: Make the test for auto-mode-alist from .dir-local.el stricter Lars Ingebrigtsen
2021-07-24 14:28     ` Stefan Monnier [this message]
2021-07-24 15:46       ` Lars Ingebrigtsen
2021-07-24 16:42         ` Stefan Monnier
2021-07-24 16:53           ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvmtqbpz4m.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).