From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#20846: 24.4; Electric-indent-mode does not call indent-line-function after hitting RET inside a comment Date: Fri, 28 May 2021 10:09:41 -0400 Message-ID: References: <871r9t6pgd.fsf@gnus.org> <838s40acf9.fsf@gnu.org> <87sg273fqo.fsf@gnus.org> <83fsy78l2p.fsf@gnu.org> <49c82e08-f15e-e564-1740-86271fc94f3b@yandex.ru> <8335u780u6.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39238"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: robin.neatherway@gmail.com, larsi@gnus.org, 20846@debbugs.gnu.org, Dmitry Gutov To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 28 16:10:11 2021 Return-path: Envelope-to: geb-bug-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 1lmdBi-000A1p-TD for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 28 May 2021 16:10:10 +0200 Original-Received: from localhost ([::1]:49696 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lmdBh-0002IN-TJ for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 28 May 2021 10:10:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37742) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lmdBa-0002IC-FT for bug-gnu-emacs@gnu.org; Fri, 28 May 2021 10:10:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43604) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lmdBa-0001v8-7e for bug-gnu-emacs@gnu.org; Fri, 28 May 2021 10:10:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lmdBa-0003YM-2o for bug-gnu-emacs@gnu.org; Fri, 28 May 2021 10:10:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 May 2021 14:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20846 X-GNU-PR-Package: emacs Original-Received: via spool by 20846-submit@debbugs.gnu.org id=B20846.162221099413640 (code B ref 20846); Fri, 28 May 2021 14:10:02 +0000 Original-Received: (at 20846) by debbugs.gnu.org; 28 May 2021 14:09:54 +0000 Original-Received: from localhost ([127.0.0.1]:55150 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lmdBR-0003Xw-L5 for submit@debbugs.gnu.org; Fri, 28 May 2021 10:09:53 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:60292) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lmdBN-0003Xe-ES for 20846@debbugs.gnu.org; Fri, 28 May 2021 10:09:52 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id DE0B14413C6; Fri, 28 May 2021 10:09:43 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 6C7D04413A8; Fri, 28 May 2021 10:09:42 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1622210982; bh=dkli+WOQMu7kS5N+fKbsW4AwNSWSertniIWm0jRwnjI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=JM/u//ITt9hgtT/zqhps6FAPnpzJevjl6elas7NECH/QvePvVZhEqIbOGXQ/iuqtF uhbdOj9rz1Fd+MHR3DCnswTNaFhSUUlQLHUQWidmdV5jrA81TiWbfcCBOmkkJy95k+ 5PD8706/mLOCCh25u9GqqAWYbnhP/nwUxh6hPpMWkxhmDO8iS19qDAfsJYpCxksMSO Yqna7H876W95krw3+rimiXDvdpmn9uKbdivXhSyTq3+BOwoWIR6dIF5A0YyfijeiRm yYmOebFzHbHJCGPpIdPhhYrcGR9dAk/n3gajlb2R/WOaD7EzPpkKvL8qX/NRTHf+gr /HEYpUGwqU+Pw== Original-Received: from alfajor (69-196-163-239.dsl.teksavvy.com [69.196.163.239]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 12C8E1209B0; Fri, 28 May 2021 10:09:42 -0400 (EDT) In-Reply-To: <8335u780u6.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 28 May 2021 16:06:09 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:207462 Archived-At: > Then that sentence is misleading and should be rephrased, because my > reading of it is that it clearly states that auto-indentation inside > strings is generally impossible, and expects the implementations to > behave like that. [ It does not say intend to that. It says to return `noindent` when indentation is impossible and gives "inside a string" as an example of a reason why indentation might not be possible. ] In any case, this argues in favor of `electric-indent-mode` calling `indent-line-function` even when we're inside a comment. The (nth 8 (syntax-ppss)) test has been in `electric-indent-mode` from the very beginning, but I must say I can't remember why I put it in, I think it was a mistake and we should remove it. Especially since it can be re-added easily by configuring `electric-indent-functions` for those modes/users who prefer it that way. Stefan