[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#18721: patch
From: |
Tom Tromey |
Subject: |
bug#18721: patch |
Date: |
Mon, 16 Jan 2017 12:17:11 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.90 (gnu/linux) |
>>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:
Eli> So I'm asking why not keep the current syntax for this feature, and
Eli> avoid introducing a new kind of special key? This would mean your
Eli> example above will look like this:
Eli> (nil . ((auto-mode-alist . (("\\.def\\'" . c-mode)))))
I suppose it would work ok as long as the code also doesn't try to set
auto-mode-alist locally in the buffer, both because that variable isn't
safe, and because I think it doesn't make sense to set it buffer-locally
anyhow.
Eli> Oh, and one more nit: .dir-locals.el is documented to apply to
Eli> remote files if enable-remote-dir-locals is non-nil. But, unless I
Eli> misunderstood your code, it exempts remote files unconditionally,
Eli> which contradicts the documentation.
I think this should work ok because hack-dir-local--get-variables checks
enable-remote-dir-locals. In this case it will return nil, so the new
code in set-auto-mode will not do anything.
Tom