From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#14457: 24.3; buggy forward-sexp in octave mode? Date: Sat, 25 May 2013 02:59:08 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1369465221 375 80.91.229.3 (25 May 2013 07:00:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 25 May 2013 07:00:21 +0000 (UTC) Cc: 14457@debbugs.gnu.org To: Leo Liu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat May 25 09:00:20 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ug8Sg-0004AX-W2 for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 May 2013 09:00:19 +0200 Original-Received: from localhost ([::1]:57347 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ug8Sg-00063l-LM for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 May 2013 03:00:18 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34320) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ug8SY-00062m-UJ for bug-gnu-emacs@gnu.org; Sat, 25 May 2013 03:00:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ug8SR-0001Jx-Id for bug-gnu-emacs@gnu.org; Sat, 25 May 2013 03:00:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44998) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ug8SR-0001IP-GA for bug-gnu-emacs@gnu.org; Sat, 25 May 2013 03:00:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Ug8TO-0008Tr-2P for bug-gnu-emacs@gnu.org; Sat, 25 May 2013 03:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 May 2013 07:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14457 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 14457-submit@debbugs.gnu.org id=B14457.136946521932494 (code B ref 14457); Sat, 25 May 2013 07:01:01 +0000 Original-Received: (at 14457) by debbugs.gnu.org; 25 May 2013 07:00:19 +0000 Original-Received: from localhost ([127.0.0.1]:33356 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ug8Sf-0008Rw-Lc for submit@debbugs.gnu.org; Sat, 25 May 2013 03:00:19 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:45967) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ug8SZ-0008RR-0c for 14457@debbugs.gnu.org; Sat, 25 May 2013 03:00:15 -0400 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id r4P6x8cW013677; Sat, 25 May 2013 02:59:09 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id B1ACE6C0BC; Sat, 25 May 2013 02:59:08 -0400 (EDT) In-Reply-To: (Leo Liu's message of "Sat, 25 May 2013 12:17:28 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4589=0 X-NAI-Spam-Version: 2.3.0.9362 : core <4589> : streams <966940> : uri <1429582> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:74554 Archived-At: > Since 'case', 'otherwise' are closers to 'switch' as in > smie-closer-alist, I was expecting (forward-sexp -1) to jump back to > 'switch', much like from 'elseif' to 'if'. Does this make sense? Both behaviors make sense. Note that elseif/else behaves just like case/otherwise: if will stop at the previous matching elseif. For indentation purpose it's better if it doesn't jump too far, which is why octave-mode currently behaves this way. The reason why it's better is: - faster indentation since we parse less of the buffer. - more local decision means that the behavior is easier to understand for the user. - also means that it better takes into account choices of the user: if the user decides to place his "case" at some other indentation, only the first "case" after "switch" will disagree with the user, all the other ones will simply align under the first. Ideally, this behavior would also allow to use C-M-t to transpose two cases, just like you can do with the usual infix operators/separators, but currently this doesn't work (and it can't be done with "otherwise"). Stefan