emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Blunderbuss ".dir-locals.el" raises everything in its path!!


From: Miles Bader
Subject: Re: Blunderbuss ".dir-locals.el" raises everything in its path!!
Date: Mon, 13 Jul 2009 17:45:31 +0900

Alan Mackenzie <address@hidden> writes:
>>  > It also seems downright bizarre to tell people not to set
>>  > c-file-style in .dir-settings.el -- my sense is that most developers
>>  > would agree that if a project has C style conventions, they should
>>  > override the user's personal preferences...
>
> They should act as a project wide default, which a user can
> occasionally vary as he sees fit.  The problem is not that
> .dir-locals.el exists, but that it takes precedence over a user's
> c-mode-hook, or a top-level (setq c-cleanup-list) in .emacs.  Jan
> complained that he was left with no way to set c-cleanup-list.  (M-:
> (setq ....) doesn't count as "a way" here.)

Certainly if users were very careful about writing their hooks, and knew
about the situation, they could write code in their hooks like
"(when (no-project-setting 'c-file-style) ...do-my-generic-settings...)".
_If_ they did that, then your suggestion of always giving hooks
precedence could work.  But of course, they _don't_, and even if they
could, they almost certainly wouldn't (because people are generally a
bit lazy and do the simplest thing that seems to work at first).

For those settings for which there's general agreement that project
settings should override personal general preferences (indentation
style, tabs-or-none, etc), then, the current arrangement does the right
thing in most cases.

Of course it would be nice to have _some_ way a user could force the
issue, some hook run after dir-settings are process, should he feel
extremely strongly about some issue.  Hmm, could one not use
`hack-local-variables-hook' to do this?

-Miles

-- 
Bore, n. A person who talks when you wish him to listen.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]