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: Sat, 22 Oct 2022 17:18:45 +0200 Message-ID: <3c875648-2856-b380-3c94-fa2b5feb8153@abou-samra.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16410"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 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 03:26:48 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 1ommEq-000482-5X for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 24 Oct 2022 03:26:48 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omlUQ-0005ET-Un; Sun, 23 Oct 2022 20:38:50 -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 1omGGv-00007k-UC for help-gnu-emacs@gnu.org; Sat, 22 Oct 2022 11:18:49 -0400 Original-Received: from mout.kundenserver.de ([212.227.126.133]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omGGu-000664-D2 for help-gnu-emacs@gnu.org; Sat, 22 Oct 2022 11:18:49 -0400 Original-Received: from [10.188.149.104] ([46.193.67.184]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.168]) with ESMTPSA (Nemesis) id 1MXop2-1oaHIf3oia-00Y6US for ; Sat, 22 Oct 2022 17:18:45 +0200 Content-Language: en-US X-Provags-ID: V03:K1:DxZOkzgzV40UFbC/KhZd8xoSgDVXLva8uxM2wngG6heg9uqT3gD /kizftt15tv06XvhFM3ilK8nBaULywmPQ8+G5/M8o6xHPt7mG6fcmXDc4deCSLW6oTpw7QV gq//uD6oMUYGg2sjQRjf2rP6Je7RC8qDUGKbZLQu7Xc/VQDZhZSfQU13r7l5d8uu5G1Zhu1 0RNg3PLHTqzcuB/5eCCPQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:PEbzk5LOnvk=:qq/u4xQyRMeUzL7giYivNh fB9elKgacGUwHUiApYdtbPcWR+1BIdHZXibBpQs3VO4o8GFlV+T9H5fcvkquE10qCV5QgHhtS Gjla/bKpGKoeefBSe+nDmNyn9HtrmvLNHXhGYR1yLxb1D1V2MjfEUtEGhZkPVQqIXOiLI2Mf2 o9StRdrESbUKoGys5Pxh03C+HzPsSjWX94zhk4MEqzwtwBT6bLZ3erDtTqcMJ2M25RS5iv3k8 L0pcM/voq+QEt55O1H8l1I8Sn38J74eh3eb0o8emsL0jU+rVwvqd1vjlozJeSpGKi53S4qHzE qJI1JUDSSXvMMy0/t4EQc0Kgp0tbhO4vMp1Q0cvy0h6EXPxtNHKXDM3qsM115CRqwPda/wj1C DT+yrF5pz6vLMBUYu+fgcIRo0en+2I6IsSHqJ8AuUA0XsLkduybFkpjohIgnZJGiH9//4r3Jo 5DkrZ0GgUwuPfFN3qCF6FEMgLF7BFyHuei8P/5+LxF/FfeLIaeLIYJztZyGtdt2AotGgDIiL3 KsrN+fw8QmSFAbAgSi5TC6LmIw3N1fgClHWY5pDqolOLg4WOUGzZWNYm2jGUinsTXsJN+E/lE JAU9OwK319WzN44f0MzN1soJlRNZbZvUSe4xprLVu1beXjyDP3gzX1GkWnANOOvGDYLovUJ21 zZr5RljcKgU1wH6IaZVFkyIU+ybEbSMkzXt+ZOdnZR1yHecqR1VJagReeQJpg/+e7qP5xqBTQ sM8AjrwT1w5ScgG/KYDIccsSrax4wI3Eog3ybkiOClm90otnU0/G0KWCRHJAM+V9D3m2aXOQ Received-SPF: none client-ip=212.227.126.133; 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-Mailman-Approved-At: Sun, 23 Oct 2022 15:45:16 -0400 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:140290 Archived-At: Hi, 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