From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen 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: Thu, 27 May 2021 01:32:50 +0200 Message-ID: <871r9t6pgd.fsf@gnus.org> 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="23625"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Stefan Monnier , 20846@debbugs.gnu.org To: Robin Neatherway Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 27 01:34:15 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 1lm32V-0005wX-N0 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 27 May 2021 01:34:15 +0200 Original-Received: from localhost ([::1]:35324 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lm32T-0008HC-Vv for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 26 May 2021 19:34:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60374) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lm32I-0008E0-O4 for bug-gnu-emacs@gnu.org; Wed, 26 May 2021 19:34:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38777) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lm32I-0005tB-Gb for bug-gnu-emacs@gnu.org; Wed, 26 May 2021 19:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lm32I-0003jj-Dz for bug-gnu-emacs@gnu.org; Wed, 26 May 2021 19:34:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 May 2021 23:34: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.162207198214297 (code B ref 20846); Wed, 26 May 2021 23:34:02 +0000 Original-Received: (at 20846) by debbugs.gnu.org; 26 May 2021 23:33:02 +0000 Original-Received: from localhost ([127.0.0.1]:50323 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lm31K-0003iN-CS for submit@debbugs.gnu.org; Wed, 26 May 2021 19:33:02 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:35702) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lm31I-0003i1-T9 for 20846@debbugs.gnu.org; Wed, 26 May 2021 19:33:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=qIif4X7liNZAu7x9qLxWLWJgMDQ9PvGFASKjEwyRG7w=; b=ucWvSvrzTV8rzhFjmnvS0+eON6 Ief1nCSD0SNGk3aRl7Qsnw0r7ptSDf7E+DE7fOZlm4D6T7wKY7HcKTEf5BsLHMwCnSkzrFebFkuzE +GgbiOOxSIKBKUbXpIQushWIEHGPj+0XPuGs4Gp9Quewln8nxUemexDWC2HBZ88xDqGo=; Original-Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lm319-0004gf-Dh; Thu, 27 May 2021 01:32:53 +0200 X-Now-Playing: Santos Rodriguez's _Fabriclive 96 Mixed by Skream_: "Untitled B2" In-Reply-To: (Robin Neatherway's message of "Thu, 18 Jun 2015 16:40:27 +0100") 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:207343 Archived-At: Robin Neatherway writes: > Run `emacs -Q -l tmp.el` (major mode tmp defined in attached file > tmp.el). > Type `hello RET`, observe "Called indent-line!" in minibuffer. > Type `/* hello RET`, observe no message in minibuffer. (I'm going through old bug reports that unfortunately got no response at the time.) If I understand correctly, this bug report is about `indent-line-function' not being called in comments? In which case, this if an easier way to reproduce is: emacs -Q /tmp/foo.c M-: (setq-local indent-line-function (lambda () (message "indent"))) RET /* RET Inside the comment, the indentation function is not called, but it's called everywhere else. I'm not quite sure whether this is by design or not -- TAB is certainly meaningful in comments, so I'm not sure why RET is handled specially here. That is, with /* Yes no will indent to /* Yes no but RET doesn't move point the same way. Which seems inconsistent. Anybody have an opinion here? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no