From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Abou Samra Newsgroups: gmane.emacs.help Subject: Disabling automatic reindentation of the current line after a newline Date: Mon, 24 Oct 2022 11:16:29 +0200 Message-ID: <9CF323F7-2802-4182-9C7C-385A83F763DB@abou-samra.fr> Mime-Version: 1.0 (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="8854"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 24 12:07:36 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 1omuMh-0001dp-1a for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 24 Oct 2022 12:07:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omtZh-00024L-DK; Mon, 24 Oct 2022 05:16:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omtZe-00023p-Gs for help-gnu-emacs@gnu.org; Mon, 24 Oct 2022 05:16:46 -0400 Original-Received: from mout.kundenserver.de ([212.227.126.135]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omtZc-0001sH-OS for help-gnu-emacs@gnu.org; Mon, 24 Oct 2022 05:16:46 -0400 Original-Received: from smtpclient.apple ([37.167.44.6]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.168]) with ESMTPSA (Nemesis) id 1N3bjH-1pD7M110vT-010aAh for ; Mon, 24 Oct 2022 11:16:42 +0200 X-Mailer: iPhone Mail (20A380) X-Provags-ID: V03:K1:6NUWugSywN2y65TVx0a7UYoN81tlJ94rE/9a7kuqTgsFvBeqkFv DZzOSd20fkgxcN6sHYsAiFqpYfiPjqs6h9Rj13fmDYrQWaTabddtz5iZa1HH9GjiWQY+hdH yEHU5m7drvGk27XvgT8wA3s1x5mNAs2lZ4Tl0mYgjx3a2ugTbH2SN9Dk2c2wJV2rftC9YCg aPcoaW/xD57UdVkz55E7g== X-UI-Out-Filterresults: notjunk:1;V03:K0:E7HpPmYHSl8=:/oQtTDKqKzCudZScxvRESL 9nFczoIR9XCacnA7XhJsQDjbWkX7qA7EbDvj4yWVNizXVRy3N77MEVs4FzGxr5jhmzAzzp9R/ vd6rhwaFP4mAOh4yKEXzCTEtTY0rDDT4681qFtaiFtSFbi+APgOmJtA3A2nSLLTd8bYsoRn+e 6GcvGfdsDji++jPRJTsFPYBUK2fuvbvlnBiuiYbQsOO6NJZUPcDYnUIOXXXw+jIR3/caH5uwQ 3u0bQDxHffxLNlffJVF6/1kECVQImNDPopcthOCdT3LOS/EVxNION5Y7vTlZ6rdFc902aPZbc uztBW/DPTWgNDEVL0VVbNxZ+TTYJuoGD6ZH88q0Yzr3gd4nU/q9DAR8dKrMKFbbxBEf9pgKjJ oyS8BfOQ7hsxZi82/kYsE/yEMfF0Tx7T8morqnR4Ac4a7P3YykjEPBEpjP4cqTysls+ognybv xJXo+QfAelzQkybFuMPzpQfKYp3WINgCZU+P+iaWr3eBGNj6ReVX22WBhzuJvy2/X/lFcb0To O3gZgso7mbKOMtJNSkMAhOmkOYxaw43UqszqB9Xw3Bu5V0MsbBHf19T/U8C+GoMigreto6kNb nxAhLhcWaMnVVu5osa0PkFojuGgiOBbwgH5rUrTgyvmlSeytM2MZJ087LPTO9NHvOqQM3szMh SVPDhndAXeGCDbNIKFZQqaC/oi4JT2RL1rc64IfFxs7X/4hfooAsorC9xwDnMovX3AHB4uVJI rk5BvuHFUXknUbK2A8eg62Gb6WBhmj2rz/mMmd/+UP6E500eR8wZJ1dDwcpatT+lnoPYPOJJ Received-SPF: none client-ip=212.227.126.135; envelope-from=jean@abou-samra.fr; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 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: , Original-Sender: "help-gnu-emacs" Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:140314 Archived-At: =EF=BB=BFHi, Suppose I am in Lisp mode and I write this: (defun f (x) (g x)) Note the extra spaces compared to standard indentation. If, after writing the last parenthesis, I press RET, Emacs automatically reindents the second line, changing the code to this: (defun f (x) (g x)) The same happens with other major modes. I am aware that I can turn this off with M-x electric-indent-mode. However, that also disables any automatic indentation for the next line when I press RET. What I'd like is for Emacs to auto-insert the number of spaces it deems necessary for the new, still blank line whenever I press RET, without also reindenting the previous line, where I might have changed the indentation if Emacs made a mistake (e.g., if the major mode I am using is not 100% accurate, or if I have a slightly different style for which no option exists in that mode). Is this possible? Thanks, Jean