From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tom Tromey Newsgroups: gmane.emacs.bugs Subject: bug#18721: patch Date: Mon, 16 Jan 2017 12:17:11 -0700 Message-ID: <87bmv63jd4.fsf@tromey.com> References: <87ppduza9c.fsf@tromey.com> <87vath2gl1.fsf@tromey.com> <83o9z89w39.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1484596494 19708 195.159.176.226 (16 Jan 2017 19:54:54 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 16 Jan 2017 19:54:54 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.90 (gnu/linux) Cc: Tom Tromey , 18721@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 16 20:54:49 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cTDMb-0004OT-DN for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 Jan 2017 20:54:45 +0100 Original-Received: from localhost ([::1]:59233 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cTDMf-0003BB-U8 for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 Jan 2017 14:54:49 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60649) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cTDAM-00029B-9Q for bug-gnu-emacs@gnu.org; Mon, 16 Jan 2017 14:42:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cTDAI-0004z3-8W for bug-gnu-emacs@gnu.org; Mon, 16 Jan 2017 14:42:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40539) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cTDAI-0004yh-0J for bug-gnu-emacs@gnu.org; Mon, 16 Jan 2017 14:42:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cTDAH-0003cV-NI for bug-gnu-emacs@gnu.org; Mon, 16 Jan 2017 14:42:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Tom Tromey Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 Jan 2017 19:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18721 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18721-submit@debbugs.gnu.org id=B18721.148459569013874 (code B ref 18721); Mon, 16 Jan 2017 19:42:01 +0000 Original-Received: (at 18721) by debbugs.gnu.org; 16 Jan 2017 19:41:30 +0000 Original-Received: from localhost ([127.0.0.1]:55938 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cTD9m-0003bi-3r for submit@debbugs.gnu.org; Mon, 16 Jan 2017 14:41:30 -0500 Original-Received: from gproxy1-pub.mail.unifiedlayer.com ([69.89.25.95]:54924) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cTD9k-0003bW-St for 18721@debbugs.gnu.org; Mon, 16 Jan 2017 14:41:29 -0500 Original-Received: from cmgw3 (cmgw4 [10.0.90.84]) by gproxy1.mail.unifiedlayer.com (Postfix) with ESMTP id 6785D176EF3 for <18721@debbugs.gnu.org>; Mon, 16 Jan 2017 12:17:21 -0700 (MST) Original-Received: from box522.bluehost.com ([74.220.219.122]) by cmgw3 with id Z7HD1u00S2f2jeq017HGYT; Mon, 16 Jan 2017 12:17:21 -0700 X-Authority-Analysis: v=2.1 cv=YuCcGeoX c=1 sm=1 tr=0 a=GsOEXm/OWkKvwdLVJsfwcA==:117 a=GsOEXm/OWkKvwdLVJsfwcA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=IgFoBzBjUZAA:10 a=mDV3o1hIAAAA:8 a=NkYFErdF7EoxOOTGqQAA:9 a=_FVE-zBwftR9WsbkzFJk:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References: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=obVc9rEBtoJA6G+O7aATBwnkUiKFNRpaspVkE9r3VEs=; b=tBsxRm/dX/01UcnAA4I5KwIpzz Yxd0zAAoQrTodLAmPPuQMA0rpNeDLLzDa73zZAmeYYmB3B5W6HCdehHzabXnNdcSxW4u+jUs6ojSx ZpobUZEhl51HZgIAJLyTOh1DJ; Original-Received: from 174-16-146-181.hlrn.qwest.net ([174.16.146.181]:58426 helo=bapiya) by box522.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from ) id 1cTCmH-0007Ij-AR; Mon, 16 Jan 2017 12:17:13 -0700 X-Attribution: Tom In-Reply-To: <83o9z89w39.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 15 Jan 2017 17:33:30 +0200") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box522.bluehost.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 174.16.146.181 X-Exim-ID: 1cTCmH-0007Ij-AR X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 174-16-146-181.hlrn.qwest.net (bapiya) [174.16.146.181]:58426 X-Source-Auth: tom+tromey.com X-Email-Count: 4 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTIyLmJsdWVob3N0LmNvbQ== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:128154 Archived-At: >>>>> "Eli" == Eli Zaretskii 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