unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Tom Tromey <tom@tromey.com>, 18721@debbugs.gnu.org
Subject: bug#18721: patch
Date: Mon, 16 Jan 2017 12:17:11 -0700	[thread overview]
Message-ID: <87bmv63jd4.fsf@tromey.com> (raw)
In-Reply-To: <83o9z89w39.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 15 Jan 2017 17:33:30 +0200")

>>>>> "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





  parent reply	other threads:[~2017-01-16 19:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-14 20:06 bug#18721: 25.0.50; choose major mode from .dir-locals.el Tom Tromey
2014-10-14 23:54 ` Stefan Monnier
2014-10-16 13:23   ` Ted Zlatanov
2017-01-15  2:38 ` bug#18721: patch Tom Tromey
2017-01-15 15:33   ` Eli Zaretskii
2017-01-15 19:22     ` Eli Zaretskii
2017-01-16 19:17     ` Tom Tromey [this message]
2021-05-29  4:07       ` bug#18188: Please make it possible to have a directory-local setting for auto-mode-alist Lars Ingebrigtsen
2021-05-29 15:13         ` Tom Tromey
2021-07-23 14:00           ` bug#18188: bug#18721: 25.0.50; choose major mode from .dir-locals.el 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=87bmv63jd4.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=18721@debbugs.gnu.org \
    --cc=eliz@gnu.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).