From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: request a change to electric.el Date: Sun, 28 Aug 2022 11:08:49 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2565"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: "emacs-devel@gnu.org" To: MICHAEL J MCCLENNEN Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Aug 28 17:09:57 2022 Return-path: Envelope-to: ged-emacs-devel@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 1oSJvB-0000U5-25 for ged-emacs-devel@m.gmane-mx.org; Sun, 28 Aug 2022 17:09:57 +0200 Original-Received: from localhost ([::1]:55926 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oSJvA-00072Y-5Q for ged-emacs-devel@m.gmane-mx.org; Sun, 28 Aug 2022 11:09:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36936) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSJuG-0006NM-Jx for emacs-devel@gnu.org; Sun, 28 Aug 2022 11:09:00 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:58851) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSJuE-0000wO-5I for emacs-devel@gnu.org; Sun, 28 Aug 2022 11:08:59 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 9BA7C440FE1; Sun, 28 Aug 2022 11:08:56 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id D4EF844119A; Sun, 28 Aug 2022 11:08:50 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1661699330; bh=5Wm/4cLfYndcUP4hlizSnHqfJufnZf6eDiYn+W3p4+M=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=IaLMv33RjKlEFN0EFw6kZmP7zL4TZUJkOb2l6bilSHKuqkuieXAq/w0k5H5O8F8cV 2yRVnD8ZSTcWPOdLhz5LSPqboSc3tm1kIZe0F94MKHGe/1vAARu4HLTNgD+Al95f5W dUSCzGotoOUW+ZdVbuqPUVOfgmZxfSBm25VmK3i3BCDzG/AISzOrxCcjuOgS37Nq5Q I0P9lGifNrkpBmBG6zPtmHekDFJHNvqQjr7YDCmqjwKPoHoT0Ogj6UvDE7B9vPN3CF /5jjlTtEvtnCN/sfEJstLdShY0vSspLrPTtTSQacnoNLdYwOjIlI9HdQBLmiDxhg7Q ZtftK2uoAhWMw== Original-Received: from pastel (unknown [45.72.195.111]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 95DF9120622; Sun, 28 Aug 2022 11:08:50 -0400 (EDT) In-Reply-To: (MICHAEL J. MCCLENNEN's message of "Sat, 27 Aug 2022 20:19:40 +0000") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=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: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:294243 Archived-At: MICHAEL J MCCLENNEN [2022-08-27 20:19:40] wrote: > This is directed at either K. Shane Hartman or else whoever is currently in > charge of maintaining electric.el. Could you please make the following > change to this module? The effect is to adapt electric-indent-mode to people > like me who use indented lines instead of completely blank lines between > their statements. `electric-indent-mode` was mainly designed for modes where almost all lines are indented and blank lines between statements have no particular significance, so I don't understand what you mean. Can you give a concrete example of the behavior you want to avoid (and please clarify in which major mode you're doing it)? My crystal ball suggests that maybe you're working in `text-mode` and that what you're really looking for is `indented-text-mode`. > 233a234,237 >> (defvar-local electric-indent-preserve-whitespace nil >> "If non-nil, whitespace will not be removed from a line that is reindented >> after a newline.") Which whitespace is this affecting? The one at the beginning of the line? at the end of the line? both? something else? Does it affect only the line that is after an newline inserted newline (as the "after a newline" suggests)? Or rather the line before that newline? Have you tried to set `electric-indent-inhibit`? Stefan