From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: goncholden Newsgroups: gmane.emacs.help Subject: Re: Turning electric-indent-mode off, for a specific buffer Date: Mon, 13 Jun 2022 01:31:52 +0000 Message-ID: References: <87bkuxe7dt.fsf@yahoo.com> Reply-To: goncholden Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9265"; mail-complaints-to="usenet@ciao.gmane.io" Cc: goncholden via Users list for the GNU Emacs text editor To: Po Lu Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 13 03:32:45 2022 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 1o0Ywe-0002Gz-VE for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 13 Jun 2022 03:32:44 +0200 Original-Received: from localhost ([::1]:59538 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o0Ywd-0007rx-CG for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 12 Jun 2022 21:32:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33980) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o0Yw1-0007rl-Fs for help-gnu-emacs@gnu.org; Sun, 12 Jun 2022 21:32:05 -0400 Original-Received: from mail-40140.protonmail.ch ([185.70.40.140]:52931) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o0Yvz-0002oV-0B for help-gnu-emacs@gnu.org; Sun, 12 Jun 2022 21:32:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1655083917; x=1655343117; bh=nWfJpZ085sNXQSP18SoSIifPPi/4m7w2DwjuonSkO5A=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:Feedback-ID:From:To:Cc:Date:Subject:Reply-To: Feedback-ID:Message-ID; b=AOxg1jGlJ92X/P/FrI0IkQCG+TAY2x/8ad+c9VSMkNaiIbI6UeaW+bbia8EuZVbdl X4Z4ZEasY+3xwNzPTayOnwbBgh06JIpxrp/+BwezvRPxjpWHs46AkxzPHS3zJXAJQv K/bARIrcNSlOQ6X7QwwVpWJtS4xQonVpVWdczx8rg1ofGjGPkPB8ao5KYt8qjaomp0 sY8gWyv/JmIdA0QyArdrrg/urt6fH5IFHIz0BJx8vKfql+k2dgoD7EIIa6WCIFIeUb WLn/cWRpM9PHoV3Lw3IqumqKGaTJYSB6h49Nx5rjFBg74sKbtSM7/lU9zL9JF34LMG l4JlsRg/HCvfw== In-Reply-To: <87bkuxe7dt.fsf@yahoo.com> Feedback-ID: 43053548:user:proton Received-SPF: pass client-ip=185.70.40.140; envelope-from=goncholden@protonmail.com; helo=mail-40140.protonmail.ch 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 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:137755 Archived-At: ------- Original Message ------- On Monday, June 13th, 2022 at 12:26 PM, Po Lu wrote: > goncholden via Users list for the GNU Emacs text editor > help-gnu-emacs@gnu.org writes: > > > I thought that for Emacs >=3D 24.4 there is "electric-indent-local-mode= " > > so one can turn it off in a specific buffer. > > > There is? What is the way to disable `electric-indent-mode` in a buffer? There is `setq-default` which only changes the mode if the buffer does not = have a defined local value for `electric-indent-mode`. Using `setq` would = be considered a global change. Thusly, `setq-local` could be the appropriate one to use. (setq-local electric-indent-mode nil) Whereas for the specific language I could use (defun myindent () (setq-local electric-indent-mode nil)) (add-hook 'fortran-mode 'myindent) Any critique about all this?