From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.cc-mode.general,gmane.emacs.devel Subject: Re: [PATCH] cc-mode: don't tread dir-local and file-local variables differently Date: Wed, 27 May 2020 22:21:43 -0400 Message-ID: References: <20200512194516.83180-1-mina86@mina86.com> <20200513184745.GA8857@ACM> <20200517142327.GA12554@ACM> <20200525184412.GA8662@ACM> <20200526171830.GA3905@ACM> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="15919"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: bug-cc-mode@gnu.org, emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: cc-mode-help-bounces@lists.sourceforge.net Thu May 28 04:22:15 2020 Return-path: Envelope-to: sf-cc-mode-help@m.gmane-mx.org Original-Received: from lists.sourceforge.net ([216.105.38.7]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1je8BR-00042Y-7g for sf-cc-mode-help@m.gmane-mx.org; Thu, 28 May 2020 04:22:13 +0200 Original-Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1je8BG-0005LK-Ar; Thu, 28 May 2020 02:22:02 +0000 Original-Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1je8BE-0005Kz-5y for cc-mode-help@lists.sourceforge.net; Thu, 28 May 2020 02:22:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:MIME-Version:In-Reply-To:Date: References:Message-ID:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=GnW22OzZx8b/O7I0FCcuV5WM1xKFxa7jdHrUGJ4JINA=; b=UDNOw/Qtws+8NBH/O0KGeMXYG 2VvI1oTHAlnfT5auYawbDtUI/TLT+LsPIpi7haoD4/y5gmEO/ar4Ix02qnLHxK+UPwFgMudWPCYaV ntRZ6T7T5R+4YC/1RRX9IMmXV4s6SdnNtZFpN8hTDNQfgxuG9kyPVtRIPPsOdbfL6tKzY=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:MIME-Version:In-Reply-To:Date:References:Message-ID:Subject: Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=GnW22OzZx8b/O7I0FCcuV5WM1xKFxa7jdHrUGJ4JINA=; b=IWPdsH6xSRH7mj7hFiTIhfhu4C mvXsDoXuV2eyBq/nUohNWlybzJiyJ++9o9Tam9x1qd1O6qWYubXijFsMD5VqdoeZ8qpQ0ZBpTzK4D ntouZf7a8Yq9lN0cZ/APrOjxfnuAlZbc9K8A1DS3sa0rbGm31fhjs9iAMQJvRiVBZyjQ=; Original-Received: from eggs.gnu.org ([209.51.188.92]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1je8BB-00A8Hp-8u for cc-mode-help@lists.sourceforge.net; Thu, 28 May 2020 02:22:00 +0000 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:50737) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1je8B4-0008Px-ET for cc-mode-help@lists.sourceforge.net; Wed, 27 May 2020 22:21:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55760) by fencepost.gnu.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1je8B4-0004FV-6Q for bug-cc-mode@gnu.org; Wed, 27 May 2020 22:21:50 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:13352) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1je8B3-0008P2-Cc; Wed, 27 May 2020 22:21:49 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id C95D11002AC; Wed, 27 May 2020 22:21:46 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 0A28010025D; Wed, 27 May 2020 22:21:45 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1590632505; bh=qM8GeF0dG8eyD/vw9y1fK/jf16topNOQ7v9oJh04RyY=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=MrfXEtRKOnqRduB3XJqGKXOuXHYa/kx8H2WQ6zGMzgHN9XbBiVzArwg5PuAVWSyK5 YlKiYeul8k6bsJuUyESIzxlrKoA6Q9R+zJY2VLPVBsC2OeTapzOjIQdCBSQ7u6sD/i /oBzjh3kLYdmNZ5t8nlu7K2Wre6HuufKEX5KZJjyLdEhmkTZxCw0DKcSXTc2dbEPqu 60sWHl40Jc4GE2JaZHyRQf2MBt8+wMkSfR1RyNMFgnbGlCAtHrdo+RQFQkV2IYx6t7 eiCXEYHZpsHqbYfhaXty93CWridHBG/OYFc3EEH/lhaPPGxN/siiJdOFyGJDB5Pug7 7mhnQGFkQQ3Dg== Original-Received: from alfajor (unknown [216.154.27.250]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 9220A1205E1; Wed, 27 May 2020 22:21:44 -0400 (EDT) In-Reply-To: <20200526171830.GA3905@ACM> (Alan Mackenzie's message of "Tue, 26 May 2020 17:18:30 +0000") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/27 22:21:47 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Headers-End: 1je8BB-00A8Hp-8u X-BeenThere: cc-mode-help@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Bug reports, feature requests, and general talk about CC Mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: cc-mode-help-bounces@lists.sourceforge.net Xref: news.gmane.io gmane.emacs.cc-mode.general:8009 gmane.emacs.devel:251527 Archived-At: >> IIUC your example shows a different interaction between a global >> setting and file-vs-dir setting. FWIW, I do find it surprising that >> file-local would be treated differently from dir-local when faced with >> a global setting. > > They are treated consistently - where there are conflicting sources for a > particular parameter, that of the highest priority takes precedence. Maybe I misunderstood the example, but from the description I read there are 2 cases: one has "global + file-local" and the other has "global + dir-local". So it seems those two cases should give the same result since the priority ordering for "global vs file-local" is the same as that for "global vs dir-local". Yet IIUC those two cases give different results, which would seem to imply that somewhere "global" takes precedence over either "file-local" or "dir-local", which I think would be wrong. I don't have the time to reproduce it, let alone dig into it any further, and in any case I'm sure you already know what I'm writing, so I'll just presume there's either a misunderstanding on my side or on the side of the OP. Stefan