From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: how to use an external dir-locals file? Date: Mon, 25 Mar 2013 20:46:33 -0400 Message-ID: References: <87r4jaymhl.fsf@lifelogs.com> <87ip4kzw9d.fsf@lifelogs.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1364258807 26897 80.91.229.3 (26 Mar 2013 00:46:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 Mar 2013 00:46:47 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 26 01:47:14 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UKI2g-0004Wz-5K for ged-emacs-devel@m.gmane.org; Tue, 26 Mar 2013 01:47:10 +0100 Original-Received: from localhost ([::1]:54799 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKI2I-0003qJ-8h for ged-emacs-devel@m.gmane.org; Mon, 25 Mar 2013 20:46:46 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:45902) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKI2B-0003qB-Cu for emacs-devel@gnu.org; Mon, 25 Mar 2013 20:46:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UKI26-0007JJ-Fl for emacs-devel@gnu.org; Mon, 25 Mar 2013 20:46:39 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:5563) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKI26-0007JB-BH for emacs-devel@gnu.org; Mon, 25 Mar 2013 20:46:34 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFFxLSu/2dsb2JhbABEvw4Xc4IeAQEEAVYoCws0EhQYDYhCBsEtjWGDKQOkeoFegxM X-IPAS-Result: Av4EABK/CFFFxLSu/2dsb2JhbABEvw4Xc4IeAQEEAVYoCws0EhQYDYhCBsEtjWGDKQOkeoFegxM X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="5769699" Original-Received: from 69-196-180-174.dsl.teksavvy.com (HELO pastel.home) ([69.196.180.174]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 25 Mar 2013 20:46:31 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 5B0D567AC0; Mon, 25 Mar 2013 20:46:33 -0400 (EDT) In-Reply-To: <87ip4kzw9d.fsf@lifelogs.com> (Ted Zlatanov's message of "Thu, 21 Mar 2013 10:02:22 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:158179 Archived-At: > I imagined simply doing a dynamic let-bind around the call initially, > but if it's going to be a feature, then I could make it easier to > associate a dir-locals override with a file (matched by name). Hmm... I think I misunderstood the intended usage. Could you give more details about your use-case? E.g. why not do something like (let ((tmp-foo-setting (lambda () (setq-local foo-indent 5)))) (unwind-protect (progn (add-hook 'foo-mode-hook tmp-foo-setting) ) (remove-hook 'foo-mode-hook tmp-foo-setting))) -- Stefan