From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: Blunderbuss ".dir-locals.el" raises everything in its path!! Date: Sun, 12 Jul 2009 14:37:05 -0400 Message-ID: <87k52dycha.fsf@stupidchicken.com> References: <20090712144137.GB2524@muc.de> <87hbxhony6.fsf@stupidchicken.com> <20090712180623.GA1009@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1247423848 8560 80.91.229.12 (12 Jul 2009 18:37:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 12 Jul 2009 18:37:28 +0000 (UTC) Cc: Jan =?utf-8?Q?Dj=C3=A4rv?= , emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 12 20:37:21 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MQ3vM-0007Je-I3 for ged-emacs-devel@m.gmane.org; Sun, 12 Jul 2009 20:37:20 +0200 Original-Received: from localhost ([127.0.0.1]:33013 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MQ3vL-000864-OQ for ged-emacs-devel@m.gmane.org; Sun, 12 Jul 2009 14:37:19 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MQ3vH-00085m-83 for emacs-devel@gnu.org; Sun, 12 Jul 2009 14:37:15 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MQ3vC-00085H-4x for emacs-devel@gnu.org; Sun, 12 Jul 2009 14:37:14 -0400 Original-Received: from [199.232.76.173] (port=50711 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MQ3vC-00085E-0A for emacs-devel@gnu.org; Sun, 12 Jul 2009 14:37:10 -0400 Original-Received: from pantheon-po30.its.yale.edu ([130.132.50.4]:39864) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MQ3vB-00004q-Kh for emacs-devel@gnu.org; Sun, 12 Jul 2009 14:37:09 -0400 Original-Received: from furry (c-71-192-161-14.hsd1.nh.comcast.net [71.192.161.14]) (authenticated bits=0) by pantheon-po30.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id n6CIb6aq017747 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 12 Jul 2009 14:37:06 -0400 Original-Received: by furry (Postfix, from userid 1000) id B1C1EC09B; Sun, 12 Jul 2009 14:37:05 -0400 (EDT) In-Reply-To: <20090712180623.GA1009@muc.de> (Alan Mackenzie's message of "Sun, 12 Jul 2009 18:06:23 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.96 (gnu/linux) X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:112374 Archived-At: Alan Mackenzie writes: >> I'm not sure I understand. Directory-local variables are processed >> right before file-local variables, and can be overridden by them. > > Sorry, yes. But that's the only thing they can be overridden by. That > is surely not the right thing. > > Why on earth does .dir-locals.el take precedence over values set in a > top-level `setq' or `c-mode-hook'? This is surely the Wrong Thing to > do. Because setting a directory-local variable is supposed to have the same effect as setting a file-local variable inside every file in that directory. Thus, instead of putting c-fill-style inside every .c file in the Emacs source tree, you can simply write a .dir-locals.el file. > In particular, the File Style and local variables settings are rarely > used precision instruments, for configuring unusual files unusually. This indicates that we should not set c-file-style in the .dir-locals.el file of the Emacs source tree.