From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Thibaut Verron Newsgroups: gmane.emacs.help Subject: Re: indentation Date: Tue, 27 Apr 2021 21:20:41 +0200 Message-ID: <66a6a30a-d5bb-08a8-c3d2-cb615ad900f6@gmail.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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17876"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 Cc: ptlo@centrum.cz, Philip Kaludercic , help-gnu-emacs@gnu.org To: Colin Baxter Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 27 21:21:18 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 1lbTGm-0004Og-RC for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 27 Apr 2021 21:21:16 +0200 Original-Received: from localhost ([::1]:52886 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lbTGl-0001PQ-TP for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 27 Apr 2021 15:21:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43578) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lbTGI-0001PI-DB for help-gnu-emacs@gnu.org; Tue, 27 Apr 2021 15:20:46 -0400 Original-Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]:36427) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lbTGG-0004VV-7V for help-gnu-emacs@gnu.org; Tue, 27 Apr 2021 15:20:46 -0400 Original-Received: by mail-ed1-x52e.google.com with SMTP id q6so12032069edr.3 for ; Tue, 27 Apr 2021 12:20:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=7a5GHakbfBizJeHKyCX2un9zaRicBdhHIveQZSR0jlg=; b=d0QPrxLgoWXWzYLYcQDYJ4htODAVWMoAwgw0YKZn5p4pgw7PmWXxMqyZ4Lk4ItW5AV 3qqeO9AMEWQ7sqzPNF4/P/ekTZe96Hw+69zkdNyPTJSTikTkhO/xAyu5EZenCDXG3HVw bPz5LirL1dm2wVOVv8ZTAc5jawBN6s1vvOPcmuu9sLpiSzOwL8yx98poz6w1ZQTr5dHn yIs38UTE6rHVuxikHCNeSenazqhcV3jTRjEyynF1XvMVHBRonjgXTYVe/Jk3XiR9wh6M stCcVCXre3TDXFFvorMXbw12NPZ5n7IxvK8Fl+Tj/AwvAhH1lSt3Vc/PUDor/KdktEoA 9CcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=7a5GHakbfBizJeHKyCX2un9zaRicBdhHIveQZSR0jlg=; b=kPPiZIjsHXEwfw2Fa3FcPIHm0L9RsvUPRpeXO+OJhtctWyGcVbIvL5Xg0gX5UndBQT DF5LFnNSSMAiPQ+MrmotLNW/CFF1JbtIvJZQTCkRK6qIve3J7i2OccJ75bhy7FlmGZVu +681/ub+SC50+3+56qZmVBPflrO47I27trA1JbsY6BC7I3h0q0X/Xoeg1YL+Mg0bydEm CIfe8xhcPgXiu1+0GtfNALiIa3Oxq+Yo+q5MnbpSeY3afBO9Bwv312n/sc8tgpttaD8V l9BTfoUNos4j00NfFxfT7FyaWjBdmBClfSdJ6sSf4D0u9DHBGPWI1DNBH4U6Kcg+74n4 NKCA== X-Gm-Message-State: AOAM533u9UdXSXz1+rGKslGXyempOcF5zVUIgJLa3VXj0NgyRyYriwIe xlDPKCZgu+ddFrVh6ArzKKAiAZSfFzmeoSKx4NQ= X-Google-Smtp-Source: ABdhPJyf+ORHvmoTO/5B7MZ9irhauRbIDlZTZn11Qn+tkvbBeUMw0JI4u9kRMD3HFshUmLXiN6r9Eg== X-Received: by 2002:a05:6402:254f:: with SMTP id l15mr6380906edb.189.1619551242519; Tue, 27 Apr 2021 12:20:42 -0700 (PDT) Original-Received: from [192.168.2.103] (dslb-088-066-248-118.088.066.pools.vodafone-ip.de. [88.66.248.118]) by smtp.googlemail.com with ESMTPSA id v4sm471158ejj.84.2021.04.27.12.20.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 27 Apr 2021 12:20:42 -0700 (PDT) In-Reply-To: <87y2d31rjp.fsf@yandex.com> Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::52e; envelope-from=thibaut.verron@gmail.com; helo=mail-ed1-x52e.google.com 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, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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:129175 Archived-At: 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