From unknown Tue Jun 24 22:38:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17955: 24.3.92; octave.el: indentation following ... or \ Resent-From: Leo Liu Original-Sender: "Debbugs-submit" Resent-CC: monnier@iro.umontreal.ca, bug-gnu-emacs@gnu.org Resent-Date: Sun, 06 Jul 2014 09:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 17955 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 17955@debbugs.gnu.org Cc: Stefan Monnier X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: Stefan Monnier Received: via spool by submit@debbugs.gnu.org id=B.140463943218699 (code B ref -1); Sun, 06 Jul 2014 09:38:02 +0000 Received: (at submit) by debbugs.gnu.org; 6 Jul 2014 09:37:12 +0000 Received: from localhost ([127.0.0.1]:44536 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X3isi-0004rW-1F for submit@debbugs.gnu.org; Sun, 06 Jul 2014 05:37:12 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43922) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X3isf-0004rG-Cm for submit@debbugs.gnu.org; Sun, 06 Jul 2014 05:37:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X3isU-0001EG-3c for submit@debbugs.gnu.org; Sun, 06 Jul 2014 05:37:04 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:51804) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X3isU-0001Dv-0X for submit@debbugs.gnu.org; Sun, 06 Jul 2014 05:36:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45635) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X3isN-00065q-Rv for bug-gnu-emacs@gnu.org; Sun, 06 Jul 2014 05:36:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X3isH-0000wT-Pc for bug-gnu-emacs@gnu.org; Sun, 06 Jul 2014 05:36:51 -0400 Received: from mail-pa0-x229.google.com ([2607:f8b0:400e:c03::229]:52549) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X3isH-0000wF-It for bug-gnu-emacs@gnu.org; Sun, 06 Jul 2014 05:36:45 -0400 Received: by mail-pa0-f41.google.com with SMTP id fb1so3885566pad.14 for ; Sun, 06 Jul 2014 02:36:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version:content-type; bh=C4Q5lTJcRc8WZuJerSbpVnak5oVm4d259Th7rYBCTzg=; b=rNpsRtMN3jeCdQqcTbcPnvmbYzfQK+dNNC1B2GaAv/gGjTuXsb4jxqVVWLfQyVUk9Q 9A9htcGk3bEK7zFssw9g+2ANj0zi9HV0aKaiYoTeqaKXI9v2qaiOBz4S+63/0bWMKqfO xyKSqt8GvsMmLfCtXQPIFXQ7COK734iLJUl1g98MgksyYSz6e8JFsB8Rc0E0uNnVHi5T tJP0c2ZfPvIjWdb3q7NyAcSwQtrTPLN1+RPbKHWArMEjCS8rfNiwUzCN03cSjVPxU6Zl 0nyU4pA8wfiMO83F9A58iop6iox5J+Snm4aj6TaYPUsC7DOWrZePsjaI0ZHLKaXUl3o1 pQMQ== X-Received: by 10.70.138.45 with SMTP id qn13mr20876170pdb.20.1404639403351; Sun, 06 Jul 2014 02:36:43 -0700 (PDT) Received: from fortuna ([114.248.251.184]) by mx.google.com with ESMTPSA id mj9sm151734306pab.20.2014.07.06.02.36.41 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Sun, 06 Jul 2014 02:36:42 -0700 (PDT) From: Leo Liu Date: Sun, 06 Jul 2014 17:36:38 +0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) As reported on 2013-07-03 in http://article.gmane.org/gmane.comp.gnu.octave.maintainers/33796 In octave mode: a = \ b b is aligned to a. Previously there was an offset per octave-continuation-offset. The octave smie lexer may or may not return the continuation token (... or \), any idea why it is made to behave like this? octave-continuation-offset is also unused. Comments? Leo From unknown Tue Jun 24 22:38:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17955: 24.3.92; octave.el: indentation following ... or \ Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 07 Jul 2014 01:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17955 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Leo Liu Cc: 17955@debbugs.gnu.org Received: via spool by 17955-submit@debbugs.gnu.org id=B17955.140469779020339 (code B ref 17955); Mon, 07 Jul 2014 01:50:02 +0000 Received: (at 17955) by debbugs.gnu.org; 7 Jul 2014 01:49:50 +0000 Received: from localhost ([127.0.0.1]:45377 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X3y3x-0005Hz-Oc for submit@debbugs.gnu.org; Sun, 06 Jul 2014 21:49:50 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:48010) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X3y3v-0005Hi-Ju for 17955@debbugs.gnu.org; Sun, 06 Jul 2014 21:49:48 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwY7gw/APYEXF3SCJQEBAQECAVYjBQsLDiYSFBgNJIgECA3SDBeOegeEOASaAY8YgWqDTCE X-IPAS-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwY7gw/APYEXF3SCJQEBAQECAVYjBQsLDiYSFBgNJIgECA3SDBeOegeEOASaAY8YgWqDTCE X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="76631810" Received: from 75-119-224-253.dsl.teksavvy.com (HELO pastel.home) ([75.119.224.253]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 06 Jul 2014 21:49:41 -0400 Received: by pastel.home (Postfix, from userid 20848) id 9EB7D616FA; Sun, 6 Jul 2014 21:49:41 -0400 (EDT) From: Stefan Monnier Message-ID: References: Date: Sun, 06 Jul 2014 21:49:41 -0400 In-Reply-To: (Leo Liu's message of "Sun, 06 Jul 2014 17:36:38 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > As reported on 2013-07-03 in > http://article.gmane.org/gmane.comp.gnu.octave.maintainers/33796 > In octave mode: > a = \ > b > b is aligned to a. Previously there was an offset per > octave-continuation-offset. > The octave smie lexer may or may not return the continuation token (... > or \), any idea why it is made to behave like this? > octave-continuation-offset is also unused. Comments? Same as for sh-script's SMIE support, the new indentation code performs indentation of continued lines as if the "backslash newline" was a normal newline except it doesn't contain an implicit semi-colon. So you should get indentation like: a = b + a * \ c So you should be able to control indentation of "b" above by tweaking the (:after . "=") or (:before . "=") rule. That indentation style is incompatible with octave-continuation-offset (which basically assumes that continued lines are just a single line wrapped). But, just like we did in sh-script.el, we could/should probably add an indentation rule to SMIE to make sure that continued lines are indented at least as much as octave-continuation-offset. Stefan From unknown Tue Jun 24 22:38:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17955: 24.3.92; octave.el: indentation following ... or \ Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 May 2021 05:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17955 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 17955@debbugs.gnu.org, Leo Liu Received: via spool by 17955-submit@debbugs.gnu.org id=B17955.162226481829059 (code B ref 17955); Sat, 29 May 2021 05:07:02 +0000 Received: (at 17955) by debbugs.gnu.org; 29 May 2021 05:06:58 +0000 Received: from localhost ([127.0.0.1]:55710 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lmrBZ-0007Yd-QY for submit@debbugs.gnu.org; Sat, 29 May 2021 01:06:58 -0400 Received: from quimby.gnus.org ([95.216.78.240]:34880) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lmrBW-0007YJ-4H for 17955@debbugs.gnu.org; Sat, 29 May 2021 01:06:55 -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=xASCnIHgt6WpW+a6nEVjzRC0VjQ03vp4lNcwqjXOhKw=; b=XpQ82jVruc7qL7BDomavsKD3Bg NUoiMhWc1F4myzorUqZ2KTCrRUlYa9cZqv5P5haB0ETmqrbpAXbbcc8VE3yKM20cSSaSsefJJWCOu z2K/FtnUjr1XEsIimjgexc8ms8oGXA7Qton9WUxvI3xm1j+6wUxtDUncyuGjMDW2V0is=; 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 1lmrBK-0001iN-CO; Sat, 29 May 2021 07:06:47 +0200 From: Lars Ingebrigtsen References: X-Now-Playing: Joni Mitchell's _For The Roses_: "You Turn Me On I'm A Radio" Date: Sat, 29 May 2021 07:06:41 +0200 In-Reply-To: (Stefan Monnier's message of "Sun, 06 Jul 2014 21:49:41 -0400") Message-ID: <87a6oet9ge.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Stefan Monnier writes: > So you should be able to control indentation of "b" above by tweaking > the (:after . "=") or (:before . "=") rule. I've never played around with the SMIE indentation before, but looking at other examples, I came up with this: Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Stefan Monnier writes: > So you should be able to control indentation of "b" above by tweaking > the (:after . "=") or (:before . "=") rule. I've never played around with the SMIE indentation before, but looking at other examples, I came up with this: diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el index a1a5192ee1..5d877fc6ba 100644 --- a/lisp/progmodes/octave.el +++ b/lisp/progmodes/octave.el @@ -460,7 +460,8 @@ octave-smie-rules (smie-rule-parent octave-block-offset) ;; For (invalid) code between switch and case. ;; (if (smie-rule-parent-p "switch") 4) - nil)))) + nil)) + ('(:after . "=") octave-block-offset))) (defun octave-indent-comment () "A function for `smie-indent-functions' (which see)." And the results look OK to me: a = \ b foo = \ dasd So I've pushed this to Emacs 28; feel free to tweak further. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat May 29 01:07:02 2021 Received: (at control) by debbugs.gnu.org; 29 May 2021 05:07:02 +0000 Received: from localhost ([127.0.0.1]:55713 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lmrBe-0007Z8-1h for submit@debbugs.gnu.org; Sat, 29 May 2021 01:07:02 -0400 Received: from quimby.gnus.org ([95.216.78.240]:34896) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lmrBb-0007YU-4J for control@debbugs.gnu.org; Sat, 29 May 2021 01:06:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=DpWPMtQbhd56bWFnGWjqmAH9OJRIlV2gDxeooBYdgFk=; b=fm/wscaFriNRYLeQQbOoZr5cCj 5MxvDGG1/EkjCZmWtQ3PXguCqfVA6sYUg8Wpfttu3hlY3EmV9//6o9+tjx5+aYrKKsDpiLvjLQI1K BaVe+MAn3xBP2cMm/ukwkvS1tKVeeetVM07ePUteJP089FUJ3/HCPTsCUozfWXW2tSf4=; 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 1lmrBT-0001iZ-Ok for control@debbugs.gnu.org; Sat, 29 May 2021 07:06:53 +0200 Date: Sat, 29 May 2021 07:06:51 +0200 Message-Id: <878s3yt9g4.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #17955 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 17955 fixed close 17955 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 17955 fixed close 17955 28.1 quit From unknown Tue Jun 24 22:38:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17955: 24.3.92; octave.el: indentation following ... or \ Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 May 2021 14:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17955 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed To: Lars Ingebrigtsen Cc: 17955@debbugs.gnu.org, Leo Liu Received: via spool by 17955-submit@debbugs.gnu.org id=B17955.162229946124597 (code B ref 17955); Sat, 29 May 2021 14:45:02 +0000 Received: (at 17955) by debbugs.gnu.org; 29 May 2021 14:44:21 +0000 Received: from localhost ([127.0.0.1]:57523 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ln0CL-0006Oe-0U for submit@debbugs.gnu.org; Sat, 29 May 2021 10:44:21 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:11002) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ln0CI-0006ON-1M for 17955@debbugs.gnu.org; Sat, 29 May 2021 10:44:19 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 8BDD38066C; Sat, 29 May 2021 10:44:12 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 37286801F2; Sat, 29 May 2021 10:44:11 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1622299451; bh=dcY45PNw+izyxU7tPc7Vyeqb8SHDBHdCLMJ8RrHaiDo=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=jF0UJSSOaO7mb7ikm3lnkbwWJwvYE9tcftjOO8EF4kaJAeadMzVJqU1LYfuWdLhbd Gx6NFAqZCaKxW0t2kNmP1Ij16Wim7+FtnBLDux1Fpob2edwhqa1VGs70V+YGJDGJr+ qpOh6AZzqPKQOrPMVBX9vbIpmPKczdKtdwtvtXVX0Cusc/is3xTsZd294aKEOCP302 hBUwu8XFz03Tjfj7kQuqq9yVyn31Pi/z2PUIWOjxZXn8AZrEVw4TzeqtYBFaoYGPNd 5s3pRk+BT43PZsRrbh2/QusAwXuqx2UPbTt0n80BN7jEYIdYzADU2wBYfOXjsHMCmb 4H2EloOg9NL4w== Received: from alfajor (69-196-163-239.dsl.teksavvy.com [69.196.163.239]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id E7916120C86; Sat, 29 May 2021 10:44:10 -0400 (EDT) From: Stefan Monnier Message-ID: References: <87a6oet9ge.fsf@gnus.org> Date: Sat, 29 May 2021 10:44:10 -0400 In-Reply-To: <87a6oet9ge.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 29 May 2021 07:06:41 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.086 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Lars Ingebrigtsen [2021-05-29 07:06:41] wrote: > Stefan Monnier writes: >> So you should be able to control indentation of "b" above by tweaking >> the (:after . "=") or (:before . "=") rule. > > I've never played around with the SMIE indentation before, but looking > at other examples, I came up with this: > > diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el > index a1a5192ee1..5d877fc6ba 100644 > --- a/lisp/progmodes/octave.el > +++ b/lisp/progmodes/octave.el > @@ -460,7 +460,8 @@ octave-smie-rules > (smie-rule-parent octave-block-offset) > ;; For (invalid) code between switch and case. > ;; (if (smie-rule-parent-p "switch") 4) > - nil)))) > + nil)) > + ('(:after . "=") octave-block-offset))) > > (defun octave-indent-comment () > "A function for `smie-indent-functions' (which see)." > > And the results look OK to me: > > a = \ > b > foo = \ > dasd > > So I've pushed this to Emacs 28; feel free to tweak further. I suspect this behavior, is still not quite what users would want: why break the line if the continuation starts where you broke? Maybe ('(:after . "=") (smie-rule-parent octave-block-offset)))) would work better? And we should add tests for these changes, since regressions are all too easy to introduce when it comes to indentation rules. Stefan From unknown Tue Jun 24 22:38:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17955: 24.3.92; octave.el: indentation following ... or \ Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 30 May 2021 04:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17955 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed To: Stefan Monnier Cc: 17955@debbugs.gnu.org, Leo Liu Received: via spool by 17955-submit@debbugs.gnu.org id=B17955.162234878629939 (code B ref 17955); Sun, 30 May 2021 04:27:01 +0000 Received: (at 17955) by debbugs.gnu.org; 30 May 2021 04:26:26 +0000 Received: from localhost ([127.0.0.1]:58062 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnD1t-0007mp-S3 for submit@debbugs.gnu.org; Sun, 30 May 2021 00:26:26 -0400 Received: from quimby.gnus.org ([95.216.78.240]:44532) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnD1r-0007mb-Jr for 17955@debbugs.gnu.org; Sun, 30 May 2021 00:26:24 -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=OvD+iUqHnYbEpOhX49z05qdSPCYKO4jaDy5MkXZCzhI=; b=afFhBDaKBEmlZwhy+LxUyYkZmu CidQNwTDVs/+RBZ064bAVXrgcu1HepcLxB2DPnviL4ASOlsfU9JsXWFXxPjyq16BMcGtb2PwBr48P dk8zStDlZpe6U4mxqrQEkzcsY1yPJliwJiz4ZDfvryA/wWPmCg1u1JWmyyo+AQwp/SMs=; 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 1lnD1i-0005k3-Hd; Sun, 30 May 2021 06:26:16 +0200 From: Lars Ingebrigtsen References: <87a6oet9ge.fsf@gnus.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEVNHBlwSymUXCQz GRLAk0r///+AteMNAAAAAWJLR0QF+G/pxwAAAAd0SU1FB+UFHgM5NN8NSBsAAAGVSURBVDjLrZTb dcMwCEBBLCAkD2DTDIDDBHG1/0wFO/IjTT56TvlwZF/xhgD8SfL65I88jQRQcAQhQJz0ADzJWERy EkkgfujAzyOWFaY8+cvJ3Pjm5IJ7JPjifhoxM/AI5QWIsMjk5svVwymrfxF5Y34NdLm1K8DfGrk/ 7c09FwsBrzCQ2VHbeDuL4gXoDg4f272up6BXYNSBdfD8Ej/wdHHSCKn6FRoD5F0jbgKS1lAb1sg3 jeJMGw/tYYaN6x6vuM4s0lozGlqqW5ZItni4cymt3SpJS71lNi92r6kMt1zyzLspsiI1kcrAdP/W oY1T1wAlJsOSLX0RC49HtZQ55lbnGhXpIJLDoIiYATnvGl4Ot2bRI87MPSiESH1to49jLvhMA8LK XLObosJAiD3xrb5Y3Qcvrox0BqA16AqO79HXFcyPML3Pw9aNyXulD4/uGKbnEKivZ3a6Aw9ntWWl dNA7qOF+Jl+sHM1HmQ6gkMDurO4YpT2OKfF/ADKOSH2vb5epZ2RmzH6/LS8bEgX04n7Yny4/6PdH 7AKsn3wAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjEtMDUtMzBUMDM6NTc6NTIrMDA6MDCHmhC0AAAA JXRFWHRkYXRlOm1vZGlmeQAyMDIxLTA1LTMwVDAzOjU3OjUyKzAwOjAw9seoCAAAAABJRU5ErkJg gg== X-Now-Playing: Crosby, Stills, Nash & Young's =?UTF-8?Q?=5FD=C3=A9j=C3=A0?= Vu_: "Country Girl (Whiskey Boot Hill; Down, Down, Down; Country Girl, I Think You're Pretty)" Date: Sun, 30 May 2021 06:26:14 +0200 In-Reply-To: (Stefan Monnier's message of "Sat, 29 May 2021 10:44:10 -0400") Message-ID: <87y2bw6e55.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Stefan Monnier writes: > I suspect this behavior, is still not quite what users would want: > why break the line if the continuation starts where you broke? > Maybe > > ('(:after . "=") (smie-rule-parent octave-block-offset [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Stefan Monnier writes: > I suspect this behavior, is still not quite what users would want: > why break the line if the continuation starts where you broke? > Maybe > > ('(:after . "=") (smie-rule-parent octave-block-offset)))) > > would work better? > > And we should add tests for these changes, since regressions are all too > easy to introduce when it comes to indentation rules. OK; now done. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no