unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* dir-locals, major-mode, etc..
@ 2013-08-01 17:18 Stefan Monnier
  0 siblings, 0 replies; only message in thread
From: Stefan Monnier @ 2013-08-01 17:18 UTC (permalink / raw)
  To: emacs-devel

Going back to bug#7169, I think we need to rework the way we handle
file-local vars, and determine major modes.

Would someone like to take a look at it?

- The way I see it, we should first try to figure out the mode to use (or
  the kind of file it is, in the mime-type sense), based on .dir-local.el
  settings, the file's name, and finally the file's contents (magic
  bytes and file-local settings).
- There shouldn't be an imposed precedence between file name and file
  content: if they indicate different modes, then consult some
  conflict-resolution table (or ask the user, or pick one and warn the
  user about the conflict).
- The file content's parsing should have access to the mode
  determined from the file's name (and the .dir-local.el data).
- Only once the mode is determined, we try to determine the
  coding-system in use.  So .dir-locals.el can set `coding' on
  a per-mode basis (and similarly file-coding-system-alist can use
  modes rather than file names).


        Stefan



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-08-01 17:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-01 17:18 dir-locals, major-mode, etc Stefan Monnier

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).