From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Colin Baxter Newsgroups: gmane.emacs.help Subject: Re: indentation Date: Tue, 27 Apr 2021 21:02:18 +0100 Message-ID: <87tunr1ool.fsf@yandex.com> References: <20210427090348.67C9B5D0@centrum.cz> <87v9889okp.fsf@posteo.net> <20210427174546.532D380B@centrum.cz> <8735vb3e60.fsf@yandex.com> <100082ce-c6a4-1923-fc89-1d466183afc8@gmail.com> <87y2d31rjp.fsf@yandex.com> <66a6a30a-d5bb-08a8-c3d2-cb615ad900f6@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18653"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Cc: , ptlo@centrum.cz, Philip Kaludercic , help-gnu-emacs@gnu.org To: Thibaut Verron Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 27 22:03:48 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lbTvw-0004U4-8r for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 27 Apr 2021 22:03:48 +0200 Original-Received: from localhost ([::1]:56520 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lbTvv-0008Iv-7z for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 27 Apr 2021 16:03:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51318) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lbTug-0008FF-By for help-gnu-emacs@gnu.org; Tue, 27 Apr 2021 16:02:30 -0400 Original-Received: from forward103p.mail.yandex.net ([77.88.28.106]:58492) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lbTub-0003ap-GZ for help-gnu-emacs@gnu.org; Tue, 27 Apr 2021 16:02:29 -0400 Original-Received: from myt6-722f198f7b2f.qloud-c.yandex.net (myt6-722f198f7b2f.qloud-c.yandex.net [IPv6:2a02:6b8:c12:4e10:0:640:722f:198f]) by forward103p.mail.yandex.net (Yandex) with ESMTP id 8969218C0CAE; Tue, 27 Apr 2021 23:02:21 +0300 (MSK) Original-Received: from myt6-9bdf92ffd111.qloud-c.yandex.net (myt6-9bdf92ffd111.qloud-c.yandex.net [2a02:6b8:c12:468a:0:640:9bdf:92ff]) by myt6-722f198f7b2f.qloud-c.yandex.net (mxback/Yandex) with ESMTP id XvcPibocWi-2LIu3ljO; Tue, 27 Apr 2021 23:02:21 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1619553741; bh=shJjvob99H35nspTUbg2w8KNKvNgcArD7tOJNwQV57c=; h=In-Reply-To:Subject:To:From:Message-ID:Cc:Cc:Date:References; b=bBsnr4SHRI2B4eVweZCYiNkV09iG6V7ckqEKPoM0jtSCNTDhP1giTIXiVZ8lRIh1m A4VExn2Nz0NYuP221QujnC7M1Fnm7KH4tyrOCdRoer/VJ6cmS6ciU8rsHkwaIwvht+ 7WEvQRCQ0aJ+pjurtTd+rxqYuO36Lc0Qipg5+CxQ= Authentication-Results: myt6-722f198f7b2f.qloud-c.yandex.net; dkim=pass header.i=@yandex.com Original-Received: by myt6-9bdf92ffd111.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id yOu3OYYZDA-2JLSU3WN; Tue, 27 Apr 2021 23:02:20 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) X-Face: BHjiJOg/Qmj'BQgsAKL@])L)e62P)C"Y=6T In-Reply-To: <66a6a30a-d5bb-08a8-c3d2-cb615ad900f6@gmail.com> (Thibaut Verron's message of "Tue, 27 Apr 2021 21:20:41 +0200") Face: iVBORw0KGgoAAAANSUhEUgAAAGQAAAAeBAMAAAAodabAAAAAB3RJTUUH1wQdAAY04/L8hgAA AAlwSFlzAAAewQAAHsEBw2lUUwAAAARnQU1BAACxjwv8YQUAAAASUExURc7OzpwAAAAAAP////8A AGNj/2aqqTQAAAA8SURBVHjaYzA2NnEBAmdj01D8wNgYpM7F2JiBgYFREAgEGJiU8AMGBpA6QaCG UVtGbRm1ZdSWUVsGjS0Aq20lJnMawnkAAAAASUVORK5CYII= Received-SPF: pass client-ip=77.88.28.106; envelope-from=m43cap@yandex.com; helo=forward103p.mail.yandex.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:129176 Archived-At: >>>>> Thibaut Verron writes: > On 4/27/21 9:00 PM, Colin Baxter wrote: >> Hi Thibaut, >> >>>>>>> Thibaut Verron writes: >> > On 4/27/21 6:06 PM, Colin Baxter wrote: >> >>>>>>> writes: >> > Philip, this is it! I >> disabled the electric-indent-mode and >> emacs > is again sane. I >> didn't find this option before, looking >> in the > customization >> groups from the menu. >> >> >> >> In F-90 I switch off electric-indent-mode via a >> .dir-locals.el, >> viz >> >> >> >> #+begin_src elisp ((nil . ((f90-if-indent . 4) (f90-do-indent >> >> . 4) (f90-program-indent . 4) (f90-associate-indent . 4) >> >> (f90-critical-indent . 4) (f90-type-indent . 4) (eval add-hook >> >> 'f90-mode-hook (lambda () (electric-indent-local-mode -1)))))) >> >> #+end_src >> >> > Do you use a .dir-locals because you sometimes want to use > >> electric-indent-mode in fortran? >> >> > If yes, I don't think this will do what you want, as the eval >> form > will modify the global value of the hook. >> >> > However, if all you want is to never have electric-indent-mode >> in > fortran, you can just have the add-hook form in your .emacs. >> >> The latter. I use a dir-local and do not put the hook in ~/.emacs >> for the simple reason that I have other fortran (different >> versions) directories where I want the electric-indent-mode. > Oh, I see. Then something like the following should work, without > touching the hook for those other directories: > ((f90-mode . ((f90-if-indent . 4) (f90-do-indent . 4) > (f90-program-indent . 4) (f90-associate-indent . 4) > (f90-critical-indent . 4) (f90-type-indent . 4) (eval > . (electric-indent-local-mode -1)))) > Best wishes, Thibaut Right - that's what I wrote except I don't need no f90-mode since there ain't no non-fortran files in the directory.