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 20:00:26 +0100 Message-ID: <87y2d31rjp.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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8502"; 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 21:01:42 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 1lbSxo-00021B-8G for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 27 Apr 2021 21:01:40 +0200 Original-Received: from localhost ([::1]:42080 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lbSxn-0004HM-7I for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 27 Apr 2021 15:01:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39762) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lbSwm-0004Gq-16 for help-gnu-emacs@gnu.org; Tue, 27 Apr 2021 15:00:37 -0400 Original-Received: from forward103p.mail.yandex.net ([77.88.28.106]:34797) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lbSwi-0000ei-Sg for help-gnu-emacs@gnu.org; Tue, 27 Apr 2021 15:00:35 -0400 Original-Received: from myt5-c010fd526357.qloud-c.yandex.net (myt5-c010fd526357.qloud-c.yandex.net [IPv6:2a02:6b8:c12:10ae:0:640:c010:fd52]) by forward103p.mail.yandex.net (Yandex) with ESMTP id 4667C18C0652; Tue, 27 Apr 2021 22:00:29 +0300 (MSK) Original-Received: from myt6-efff10c3476a.qloud-c.yandex.net (myt6-efff10c3476a.qloud-c.yandex.net [2a02:6b8:c12:13a3:0:640:efff:10c3]) by myt5-c010fd526357.qloud-c.yandex.net (mxback/Yandex) with ESMTP id OEWqi0NzjN-0TISxaoS; Tue, 27 Apr 2021 22:00:29 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1619550029; bh=pgdoQugRFHXsf9t0zaXbZzsq0/H5T1FELhu1aD0HUrk=; h=In-Reply-To:Subject:To:From:Message-ID:Cc:Cc:Date:References; b=SaMloj737JJoj5u9Si1tsikMNOFeO13I++yCjftV27WxXcn4EmxCuIkleedGCLD03 Htx0iuHoGnkrgu5+K+H4oUYAuSQYbc7C+4kGd/kJ3eelcXijREooimoWVXZMAsGTSk 6qbRVwvBr239xSrUNuGY6/9jk9rW7wa9d7+m9j0E= Authentication-Results: myt5-c010fd526357.qloud-c.yandex.net; dkim=pass header.i=@yandex.com Original-Received: by myt6-efff10c3476a.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id 0EkdoPLAB0-0RLeFCVY; Tue, 27 Apr 2021 22:00:28 +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: <100082ce-c6a4-1923-fc89-1d466183afc8@gmail.com> (Thibaut Verron's message of "Tue, 27 Apr 2021 20:43:42 +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:129174 Archived-At: 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. Best wishes,