From unknown Sat Aug 09 01:12:11 2025 X-Loop: help-debbugs@gnu.org Subject: bug#14457: 24.3; buggy forward-sexp in octave mode? Resent-From: Leo Liu Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 May 2013 03:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 14457 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 14457@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.13693649028281 (code B ref -1); Fri, 24 May 2013 03:09:02 +0000 Received: (at submit) by debbugs.gnu.org; 24 May 2013 03:08:22 +0000 Received: from localhost ([127.0.0.1]:59198 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UfiMf-00029V-St for submit@debbugs.gnu.org; Thu, 23 May 2013 23:08:22 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41712) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UfiMa-00028Y-BP for submit@debbugs.gnu.org; Thu, 23 May 2013 23:08:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UfiLb-0001VE-6R for submit@debbugs.gnu.org; Thu, 23 May 2013 23:07:17 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-100.7 required=5.0 tests=BAYES_20,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,T_DKIM_INVALID,USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:34783) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfiLb-0001VA-2v for submit@debbugs.gnu.org; Thu, 23 May 2013 23:07:15 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53057) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfiLZ-00076H-Tv for bug-gnu-emacs@gnu.org; Thu, 23 May 2013 23:07:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UfiLY-0001Tx-M3 for bug-gnu-emacs@gnu.org; Thu, 23 May 2013 23:07:13 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:44676) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfiLY-0001Td-Em for bug-gnu-emacs@gnu.org; Thu, 23 May 2013 23:07:12 -0400 Received: by mail-pa0-f45.google.com with SMTP id lj1so3750498pab.32 for ; Thu, 23 May 2013 20:07:11 -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=5xZiRTcQGV8ikTgWZswkGxTzTuZCzH/2D2Md8pn78gQ=; b=DW1mj8G3KO4s5gZ/Stgji2UzBFFx80gMqT9JzfqEtGPvMNAY2Bh5P3EMvlICerynnK 3YNzifvITX2fBT10uioOwls9A+ZEmfXfgsDNkxfvSc0WrClm9OrBNp/9O3csWCdM5ted 6rYWHdZ19Mvup4DI+iZen2mFEmto91GoDMKmptOc36MxyXFHMUdskdGgoZv0nUL+x+/X D/I6RmoY+HoG2nYjFlBmFgpnqKKpE40LlpYWMUY6dsA3HxqvrYXgdQa1xlCaed6YVouZ CZOP9Dc2quYGPfEG5woF7ILTpw6lOozyWEj5RETTCkVjj6hfgy+LPmlPloTZpIG5vtd2 AQWw== X-Received: by 10.66.154.195 with SMTP id vq3mr16351233pab.105.1369364831318; Thu, 23 May 2013 20:07:11 -0700 (PDT) Received: from Zeuss-MacBook.local ([119.161.133.157]) by mx.google.com with ESMTPSA id cp1sm14169497pbc.42.2013.05.23.20.07.09 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 23 May 2013 20:07:10 -0700 (PDT) From: Leo Liu Date: Fri, 24 May 2013 11:07:02 +0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.7 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) --=-=-= Content-Type: text/plain 1. Open the attached file 2. Move point to end of the word 'otherwise' 3. M-: (forward-sexp -1) Is this correct behaviour? I noticed this via smie-highlight-matching-block-mode. Leo --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=unimplemented.m Content-Description: unimplemented.m ## -*- mode: octave; -*- function txt = unimplemented (fcn) is_matlab_function = true; ## Some smarter cases, add more as needed. switch (fcn) case "importdata" txt = ["importdata is not implemented. Similar functionality is ",... "available through @code{load}, @code{dlmread}, @code{csvread}, ",... "or @code{textscan}."]; case "quad2d" txt = ["quad2d is not implemented. Consider using dblquad."]; case "gsvd" txt = ["gsvd is not currently part of core Octave. See the ",... "linear-algebra package at ",... "@url{http://octave.sourceforge.net/linear-algebra/}."]; case "linprog" txt = ["Octave does not currently provide linprog. ",... "Linear programming problems may be solved using @code{glpk}. ",... "Try @code{help glpk} for more info."]; case {"ode113", "ode15i", "ode15s", "ode23", "ode23s", "ode23t", "ode45", "odeget", "odeset"} txt = ["Octave provides lsode for solving differential equations. ",... "For more information try @code{help lsode}. ",... "Matlab-compatible ODE functions are provided by the odepkg package. ",... "See @url{http://octave.sourceforge.net/odepkg/}."]; otherwise if (ismember (fcn, missing_functions ())) txt = sprintf ("the '%s' function is not yet implemented in Octave", fcn); else is_matlab_function = false; txt = ""; endif endswitch if (is_matlab_function) txt = [txt, "\n\n@noindent\nPlease read ",... "@url{http://www.octave.org/missing.html} to learn how ",... "you can contribute missing functionality."]; txt = __makeinfo__ (txt); endif if (nargout == 0) warning ("Octave:missing-function", "%s", txt); endif endfunction --=-=-=-- From unknown Sat Aug 09 01:12:11 2025 X-Loop: help-debbugs@gnu.org Subject: bug#14457: 24.3; buggy forward-sexp in octave mode? Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 May 2013 04:09:02 +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: To: Leo Liu Cc: 14457@debbugs.gnu.org Received: via spool by 14457-submit@debbugs.gnu.org id=B14457.136936851918478 (code B ref 14457); Fri, 24 May 2013 04:09:02 +0000 Received: (at 14457) by debbugs.gnu.org; 24 May 2013 04:08:39 +0000 Received: from localhost ([127.0.0.1]:59295 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UfjJ1-0004ny-IH for submit@debbugs.gnu.org; Fri, 24 May 2013 00:08:39 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:34334) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UfjJ0-0004nj-IS for 14457@debbugs.gnu.org; Fri, 24 May 2013 00:08:38 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFFpZoF/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDpHqBXoMT X-IPAS-Result: Av4EABK/CFFFpZoF/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDpHqBXoMT X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="14293545" Received: from 69-165-154-5.dsl.teksavvy.com (HELO pastel.home) ([69.165.154.5]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 24 May 2013 00:07:35 -0400 Received: by pastel.home (Postfix, from userid 20848) id C588A678C4; Fri, 24 May 2013 00:07:38 -0400 (EDT) From: Stefan Monnier Message-ID: References: Date: Fri, 24 May 2013 00:07:38 -0400 In-Reply-To: (Leo Liu's message of "Fri, 24 May 2013 11:07:02 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.5 (/) > 1. Open the attached file > 2. Move point to end of the word 'otherwise' > 3. M-: (forward-sexp -1) Please in your bug reports, do mention the behavior that you see rather than assume that I will see the same one. Also, try to explain the behavior you would have liked to see instead. What I see is that it jumps to "right after the previous matching case". Is that what you see? > Is this correct behaviour? It's the expected behavior, at least (IOW if it changes, you'll have to adjust the indentation rules accordingly). Since "after otherwise" is not a position that corresponds to the end of a "sexp", the meaning of (forward-sexp -1) is unclear. SMIE defines such things in a way I found useful, but admittedly, it might take some time to get used to it. What behavior did you expect? Stefan From unknown Sat Aug 09 01:12:11 2025 X-Loop: help-debbugs@gnu.org Subject: bug#14457: 24.3; buggy forward-sexp in octave mode? Resent-From: Andreas =?UTF-8?Q?R=C3=B6hler?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 May 2013 05:30:02 +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: To: 14457@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.136937337830528 (code B ref -1); Fri, 24 May 2013 05:30:02 +0000 Received: (at submit) by debbugs.gnu.org; 24 May 2013 05:29:38 +0000 Received: from localhost ([127.0.0.1]:59354 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UfkZM-0007wK-Pn for submit@debbugs.gnu.org; Fri, 24 May 2013 01:29:37 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33980) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UfkZJ-0007w2-0A for submit@debbugs.gnu.org; Fri, 24 May 2013 01:29:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UfkYH-00048O-Fq for submit@debbugs.gnu.org; Fri, 24 May 2013 01:28:34 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-101.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:36942) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfkYH-00048K-Dg for submit@debbugs.gnu.org; Fri, 24 May 2013 01:28:29 -0400 Received: from eggs.gnu.org ([208.118.235.92]:45300) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfkYC-0006qo-OO for bug-gnu-emacs@gnu.org; Fri, 24 May 2013 01:28:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UfkY7-00042n-UG for bug-gnu-emacs@gnu.org; Fri, 24 May 2013 01:28:24 -0400 Received: from moutng.kundenserver.de ([212.227.17.8]:54746) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfkY7-00042Z-LH for bug-gnu-emacs@gnu.org; Fri, 24 May 2013 01:28:19 -0400 Received: from [192.168.178.21] (brln-4db9dd50.pool.mediaWays.net [77.185.221.80]) by mrelayeu.kundenserver.de (node=mrbap4) with ESMTP (Nemesis) id 0M7sQq-1UJWnQ1fXs-00vPkX; Fri, 24 May 2013 07:28:16 +0200 Message-ID: <519EFB0E.9020900@easy-emacs.de> Date: Fri, 24 May 2013 07:30:54 +0200 From: Andreas =?UTF-8?Q?R=C3=B6hler?= User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:oWBxjOMONIvUchU/3vicKog8fqVMXDcR8d2eZQf3Jh3 xulKJ2u3Icoxign1xtGDkUVvOVoLPwiE2lPYAcuoJbB13BA8q/ 6POswFNZJBooN9I09AUOv6UsQPouct23t40fuzd+ICFr4Viv6n T7ER5Vp7ZcSnDXiqx5f8RXmeqk7Swj3SU7ZxHBPRhqLxPUTDA1 dXFEwxpH0O2cJdLQi5I6wI5Z1a9TyvBmrAfDJnSIXJXoTnZixT Sa7fKr5dgcoXomNM18n6F+rBgmTP0gEYAtsCD2wBHp649K7MbB ZNmjP2y1n4pzYj1L1A0X+qXJl3aYvndy3uQQy5+Gg6xUGlVdof IFSdJrGnFlJdzhU568H59zBypp4Q4yp8i15hAaSf6 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -5.5 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Am 24.05.2013 05:07, schrieb Leo Liu: > 1. Open the attached file > 2. Move point to end of the word 'otherwise' > 3. M-: (forward-sexp -1) > > Is this correct behaviour? I noticed this via > smie-highlight-matching-block-mode. > > Leo > forward-sexp isn't able to leave a string when called from inside. Which constitutes a bug. For example curser at end inside string: case "importdata" ^ First backward-sexp would reach beginning of string, OK. Second call fails. forward-sexp called at beginning or end should go one level up or return nil if BOB/EOB Andreas From unknown Sat Aug 09 01:12:11 2025 X-Loop: help-debbugs@gnu.org Subject: bug#14457: 24.3; buggy forward-sexp in octave mode? Resent-From: Leo Liu Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 May 2013 04:19: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: To: Stefan Monnier Cc: 14457@debbugs.gnu.org Received: via spool by 14457-submit@debbugs.gnu.org id=B14457.136945552732102 (code B ref 14457); Sat, 25 May 2013 04:19:01 +0000 Received: (at 14457) by debbugs.gnu.org; 25 May 2013 04:18:47 +0000 Received: from localhost ([127.0.0.1]:33239 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ug5wK-0008Ld-LQ for submit@debbugs.gnu.org; Sat, 25 May 2013 00:18:46 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:39408) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ug5wI-0008LG-64 for 14457@debbugs.gnu.org; Sat, 25 May 2013 00:18:43 -0400 Received: by mail-pa0-f44.google.com with SMTP id wp1so2403497pac.31 for <14457@debbugs.gnu.org>; Fri, 24 May 2013 21:17:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:face:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=z9rXgDv35jqucap6F8Dtd+q1Tz+XoJqgruubYHLohY4=; b=msBiWFiNLSVdz8t2oCYoCJWP4oGwIwN/Kt20BN2v3KdwLZZMCSlQaQMeEEerQAeooP ACC3fjXYvSBdXl8kDLATg7MSn0BOEsMQzbpVYuLfCbWpBebsk7t0RLZVAA4r65BrscGp NV2m7DCLZlIolA8pee5gL/PZKPC5me7s8hwjayt2ZV3wMiPdXHRyIt4MNn+XSW1ruzgU 1cdVAnJfFfhKQO4CBoRCOVupzvmRu2VCv8CHxBNDt0GH0nzx1VWAZKjOVyrWPvxahXwE Et4R/9dECK4QwZ8sQ476nqGSagYkpr9oPWDMAS1glSgk7WQLoTvOeYoejmJO+nSaDBLz cbrA== X-Received: by 10.68.185.162 with SMTP id fd2mr20526504pbc.176.1369455457199; Fri, 24 May 2013 21:17:37 -0700 (PDT) Received: from Zeuss-MacBook.local ([119.161.133.157]) by mx.google.com with ESMTPSA id do4sm18845661pbc.8.2013.05.24.21.17.34 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 24 May 2013 21:17:36 -0700 (PDT) From: Leo Liu References: Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAGFBMVEUKDAg1NjRWV1V9fnyg op/DxcLk5uP8/voi63ReAAAACXBIWXMAAAWJAAAFiQFtaJ36AAAAB3RJTUUH1goZAgAz00bgXgAA AeVJREFUKM9lk0Fz2jAQhQXJD3CCO70CmcC1YMtcWyTZ14Bl69xats4N9r6/3zWQBlodNKNPu/s0 b1cCQFuZGpfVVh3vAvBJolIXRkapSuoRUtIdFyo1Y5xSdlAj7OtvD1XnXxmWRi+eWgcxyCed1lVV B1CrKyujMoi+eLA5kU1SsjoHlW+nQjTtFxk4MXgrOxvIqzoTZR8XgPaLl419zgsMaSGFPiUOZCIh thsx5Xy9NsK8Kwf/JoQgMxcVJ301HKkcSWaT0O7FY056J4U9xcYfnmVXG4801lW6lqwu2nKFZoHC HuzvaTVndZ+LaRQgZdthXw1cpynEkLEwyFHXk/aIxNQ6QeooJuzPMB+wn+D7JJNsiCcVA13/A3h/ xE9J+WidpAwoYNmRFwyvSRhNVtsdaAewzZZP5uw82QL9+tyNfocyP0McAzICUr5Mk9RdIjWasUNx aIIt6NK4ZtXIMdfMQt3nuMAyWbLI4DqZ4xPq/ag8jPond4XU/cLuOgw6XCFX/YCUfcDAMMH58fD4 G9kDchwfqVefkBwup2uZM+Q4WhJt5jN3AxXCsaS2yXEDuWgS8VOzW0gFjhEPmLyFMKBFaLb1HRwc DiaKwx0EeTMRYnYPQRW3PP4HApvlMv0PttX5v/D6Aws3IOSEwzmLAAAAAElFTkSuQmCC Date: Sat, 25 May 2013 12:17:28 +0800 In-Reply-To: (Stefan Monnier's message of "Fri, 24 May 2013 00:07:38 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (OS X 10.8.3) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On 2013-05-24 12:07 +0800, Stefan Monnier wrote: > Please in your bug reports, do mention the behavior that you see rather > than assume that I will see the same one. Also, try to explain the > behavior you would have liked to see instead. Sorry, Stefan, that was an oversight. > > What I see is that it jumps to "right after the previous matching >case". Is that what you see? It jumps to the previous 'case' with point on the opening '{'. > >> Is this correct behaviour? > > It's the expected behavior, at least (IOW if it changes, you'll have to > adjust the indentation rules accordingly). > > Since "after otherwise" is not a position that corresponds to the end of > a "sexp", the meaning of (forward-sexp -1) is unclear. SMIE defines > such things in a way I found useful, but admittedly, it might take some > time to get used to it. > > What behavior did you expect? 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? Leo From unknown Sat Aug 09 01:12:11 2025 X-Loop: help-debbugs@gnu.org Subject: bug#14457: 24.3; buggy forward-sexp in octave mode? Resent-From: Leo Liu Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 May 2013 04:23:02 +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: To: Andreas =?UTF-8?Q?R=C3=B6hler?= Cc: 14457@debbugs.gnu.org Received: via spool by 14457-submit@debbugs.gnu.org id=B14457.136945573432671 (code B ref 14457); Sat, 25 May 2013 04:23:02 +0000 Received: (at 14457) by debbugs.gnu.org; 25 May 2013 04:22:14 +0000 Received: from localhost ([127.0.0.1]:33249 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ug5zh-0008Uu-Pm for submit@debbugs.gnu.org; Sat, 25 May 2013 00:22:14 -0400 Received: from mail-pd0-f169.google.com ([209.85.192.169]:61826) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ug5zf-0008Ue-BQ for 14457@debbugs.gnu.org; Sat, 25 May 2013 00:22:12 -0400 Received: by mail-pd0-f169.google.com with SMTP id y11so4830570pdj.0 for <14457@debbugs.gnu.org>; Fri, 24 May 2013 21:21:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:face:date:in-reply-to:message-id :user-agent:mime-version:content-type:content-transfer-encoding; bh=Xs3jPOApjx+sWQuSAkSoxNa0OJKrDi0cs15oLvILHNc=; b=eMaYVsxlL/HzE2fkopC7vUur6SrZngz5YWY0FV39Ur3PduCsyT8wVpKUbiLncS9qb1 0bFM7qIkTBt56M/kTzd9CQDUKlsSyOWBOo6vBCfneboGmUfIvChrooCasbHVdprrs4L+ TJl0p/NQAu6RUCd+Rj1G1kROtE9RbLYJXT0Jp8/1QFVqLJYx+MWOC6sFke9SbV6+gvcp AOBWRY9oafjplUyKfKZzJa/rhfcPKcD1By7np0XmbzzPAAE8wK5zSQpynkiFNW4aaDQC eylX0ssFrsnuw9tuIN+XPzJnYWMRId20NZgN6jFEm2ZJ44AYbaYtsUTz++icLZfZRsMo LSiw== X-Received: by 10.68.171.226 with SMTP id ax2mr20814922pbc.201.1369455666567; Fri, 24 May 2013 21:21:06 -0700 (PDT) Received: from Zeuss-MacBook.local ([119.161.133.157]) by mx.google.com with ESMTPSA id vz8sm20223516pac.20.2013.05.24.21.21.04 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 24 May 2013 21:21:06 -0700 (PDT) From: Leo Liu References: <519EFB0E.9020900@easy-emacs.de> Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoAgMAAADxkFD+AAAADFBMVEUvT09qWs3/pQD///+J kUVcAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9cBBwMLOd3veKQA AACuSURBVBjTldE9CgIxEAXgB+lEyFUC2wo5ikdZ8DSypxhMY7H9VuIVwlqkGRgnm59VsHGafIQ3 CZlAtmKIRaHETgYa12lqvEsPYKf8wXHsPGfqPaUM0g9aJPKFXkmNQmSDqwzz4Fpgpz+6WAPY2z5o uPJJpu0uypcl4nyCibMLQ8lCiVjayLoQvw5LsVKQuHPRR958HZbOcVsKeepcLxpByjycGvnKmY+c MBvrtyjfe0vmuLvdq/kAAAAASUVORK5CYII= Date: Sat, 25 May 2013 12:20:58 +0800 In-Reply-To: <519EFB0E.9020900@easy-emacs.de> ("Andreas \=\?iso-8859-1\?Q\?R\?\= \=\?iso-8859-1\?Q\?\=F6hler\=22's\?\= message of "Fri, 24 May 2013 07:30:54 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (OS X 10.8.3) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) On 2013-05-24 13:30 +0800, Andreas R=F6hler wrote: > forward-sexp isn't able to leave a string when called from inside. > Which constitutes a bug. > > For example curser at end inside string: > > case "importdata" > ^ > First backward-sexp would reach beginning of string, OK. > Second call fails. This is a different issue and I am not sure what to do here. Maybe it makes more sense to let forward-list and backward-up-list move out of strings. Feel free to make a proposal. Leo From unknown Sat Aug 09 01:12:11 2025 X-Loop: help-debbugs@gnu.org Subject: bug#14457: 24.3; buggy forward-sexp in octave mode? 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: To: Leo Liu Cc: 14457@debbugs.gnu.org Received: via spool by 14457-submit@debbugs.gnu.org id=B14457.136946521932494 (code B ref 14457); Sat, 25 May 2013 07:01:01 +0000 Received: (at 14457) by debbugs.gnu.org; 25 May 2013 07:00:19 +0000 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 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 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 Received: by pastel.home (Postfix, from userid 20848) id B1ACE6C0BC; Sat, 25 May 2013 02:59:08 -0400 (EDT) From: Stefan Monnier Message-ID: References: Date: Sat, 25 May 2013 02:59:08 -0400 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) MIME-Version: 1.0 Content-Type: text/plain 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-Spam-Score: -4.6 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.6 (----) > 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 From unknown Sat Aug 09 01:12:11 2025 X-Loop: help-debbugs@gnu.org Subject: bug#14457: 24.3; buggy forward-sexp in octave mode? Resent-From: Andreas =?UTF-8?Q?R=C3=B6hler?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 May 2013 17:45: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: To: Leo Liu Cc: 14457@debbugs.gnu.org Received: via spool by 14457-submit@debbugs.gnu.org id=B14457.136950386026283 (code B ref 14457); Sat, 25 May 2013 17:45:01 +0000 Received: (at 14457) by debbugs.gnu.org; 25 May 2013 17:44:20 +0000 Received: from localhost ([127.0.0.1]:34432 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UgIVw-0006pr-0n for submit@debbugs.gnu.org; Sat, 25 May 2013 13:44:20 -0400 Received: from moutng.kundenserver.de ([212.227.126.187]:63405) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UgIVr-0006pT-TP for 14457@debbugs.gnu.org; Sat, 25 May 2013 13:44:18 -0400 Received: from [192.168.178.21] (brln-4d0c12e3.pool.mediaWays.net [77.12.18.227]) by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis) id 0M7DXi-1UUX2i3ZME-00wsMc; Sat, 25 May 2013 19:43:07 +0200 Message-ID: <51A0F8CF.6050003@easy-emacs.de> Date: Sat, 25 May 2013 19:45:51 +0200 From: Andreas =?UTF-8?Q?R=C3=B6hler?= User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 References: <519EFB0E.9020900@easy-emacs.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Provags-ID: V02:K0:KMfWrmSD6SmFiYTHkwAcdVGP+NUvrZAfXJr8ep/rity 4BxXmm5Uh9j9xVotzt/Piu82iqHGMGK8sHUBjlWYIDc26/8P4+ YHOxq1AP7r4ovJdJMVZ/bg/zpK3CbLPBt2uBu0uB30TmPhXZxs 3khfwFHeBjg0dNW/o7SoPORszSm2aQ6kobRs6/CtSbp5BPbj0H aOkumvHLnwrRHm4aTr94vW4muigMYsF5q6WlZp0uTeWiS/oLk1 6Bcmwq46VXZeLKGbbUlAV08d9h/MH1Oc5dGebPY4TuTx4pMTnd sTKAGg93An/nhl0BJkMwYyKZLazG3901qOdLAaR6zPVABaPgfV m0Z4Jx/7vMQHlmMtBupQXb7y/tlj7U1ciJTnPJT4m X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Am 25.05.2013 06:20, schrieb Leo Liu: > On 2013-05-24 13:30 +0800, Andreas Röhler wrote: >> forward-sexp isn't able to leave a string when called from inside. >> Which constitutes a bug. >> >> For example curser at end inside string: >> >> case "importdata" >> ^ >> First backward-sexp would reach beginning of string, OK. >> Second call fails. > > This is a different issue That's right. Sorry mixing that up. and I am not sure what to do here. Maybe it > makes more sense to let forward-list and backward-up-list move out of > strings. Feel free to make a proposal. > > Leo > If backward-sexp is called from inside a string, would assume the string being the balanced expression then. I.e. it should go to the beginning of string. From there proceed as now. Andreas From unknown Sat Aug 09 01:12:11 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.428 (Entity 5.428) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Leo Liu Subject: bug#14457: closed (Re: bug#14457: 24.3; buggy forward-sexp in octave mode?) Message-ID: References: X-Gnu-PR-Message: they-closed 14457 X-Gnu-PR-Package: emacs Reply-To: 14457@debbugs.gnu.org Date: Sat, 08 Jun 2013 03:38:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1370662682-19333-1" This is a multi-part message in MIME format... ------------=_1370662682-19333-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #14457: 24.3; buggy forward-sexp in octave mode? which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 14457@debbugs.gnu.org. --=20 14457: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D14457 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1370662682-19333-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 14457-done) by debbugs.gnu.org; 8 Jun 2013 03:37:05 +0000 Received: from localhost ([127.0.0.1]:57323 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ul9xg-0004yZ-RO for submit@debbugs.gnu.org; Fri, 07 Jun 2013 23:37:05 -0400 Received: from mail-pd0-f177.google.com ([209.85.192.177]:34145) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ul9xf-0004xa-2n for 14457-done@debbugs.gnu.org; Fri, 07 Jun 2013 23:37:03 -0400 Received: by mail-pd0-f177.google.com with SMTP id p10so28877pdj.22 for <14457-done@debbugs.gnu.org>; Fri, 07 Jun 2013 20:36:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:face:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=p52HQYJgEEPcqysTdxK7b4xgJwsbKbh8+BCVkjr65wc=; b=FuhjhBqXqCTJbnDv2ivpYn54L763qIAs55Bjm2yrfacIv7/akFZlxqQjpXj6rmlfZE yPgKtXmq2m32p7XAGRmPLfVSv+2y5dMyk1FRUMiGiC9a8/0Dozrg4hxOw6T+TJn+ICdj jMvSSfRS33EZF+iac8jLAhcvho4EsvVWNbOR9NU3xVdJU2Ld21HKdo5R/Gx5V7EO4HBu YipSfwVr2ZAxyKAiRK6SNc6M+XWfoZktz440q8KN6sfe1giKFKiG0yp/2IDJiouK2DFV whn5bOy6liJ41j9BU2PZkVwhsZM8EQAnxwdsbxGTSosOs3GBcynmref0IMPPTuwlvqlA OsXQ== X-Received: by 10.68.89.226 with SMTP id br2mr1458110pbb.101.1370662613176; Fri, 07 Jun 2013 20:36:53 -0700 (PDT) Received: from localhost ([119.161.133.157]) by mx.google.com with ESMTPSA id l4sm1446170pbo.6.2013.06.07.20.36.51 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 07 Jun 2013 20:36:52 -0700 (PDT) From: Leo Liu To: Stefan Monnier Subject: Re: bug#14457: 24.3; buggy forward-sexp in octave mode? References: Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAG1BMVEUAAAA9Cgm3Hx1WWFWA gn+WmJWsrqv4+vcCAwCRl2MkAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAYoA AAGKATOXMFgAAAAHdElNRQfXAQwDNR+ZJmElAAABIklEQVQoz22SPW+DQAyGWUq65qasd9PNUSX4 AZHK2C1rJy5jpDS4IwRVup9dn7GNafpKIPPgzztXFSujqq1eM2n8h22oMkvxI/i9C97kRfMRUN55 dS3BrsAwBXUtMLAO4lryh8kTjOxKpQNniNxAgZOEe4bZwsDTFhKdqZRLNII4OQNHhEuq/RMkm6Cj TnnEA/fk0BorcYn5qA3oaeAxbaBOLrX+9G48NZ2Fzc2tzDM8Q+tMypEOqYHh8mAWaaK3U/cDMOT5 aMZMABgPXc7zPMs1A8DXO756GFJ/4fMEq47hTsAdn5avoxZ4ywl0c2w4Flu2Ybeyb3S+EqxX2DYA H8veJGEDTnHnrXvRaPyt+2kSfK6rfBZ2tUtfP/mR+pR6sX8BUZ/cDV7tvkoAAAAASUVORK5CYII= Date: Sat, 08 Jun 2013 11:36:47 +0800 In-Reply-To: (Stefan Monnier's message of "Sat, 25 May 2013 02:59:08 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (OS X 10.8.3) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 14457-done Cc: 14457-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) On 2013-05-25 14:59 +0800, Stefan Monnier wrote: > 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"). I have noticed with your last change to smie, 'case' 'elseif' are now nicely highlighted. So I agree with your points and consider this done ;) Leo ------------=_1370662682-19333-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 24 May 2013 03:08:22 +0000 Received: from localhost ([127.0.0.1]:59198 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UfiMf-00029V-St for submit@debbugs.gnu.org; Thu, 23 May 2013 23:08:22 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41712) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UfiMa-00028Y-BP for submit@debbugs.gnu.org; Thu, 23 May 2013 23:08:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UfiLb-0001VE-6R for submit@debbugs.gnu.org; Thu, 23 May 2013 23:07:17 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-100.7 required=5.0 tests=BAYES_20,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,T_DKIM_INVALID,USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:34783) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfiLb-0001VA-2v for submit@debbugs.gnu.org; Thu, 23 May 2013 23:07:15 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53057) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfiLZ-00076H-Tv for bug-gnu-emacs@gnu.org; Thu, 23 May 2013 23:07:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UfiLY-0001Tx-M3 for bug-gnu-emacs@gnu.org; Thu, 23 May 2013 23:07:13 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:44676) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfiLY-0001Td-Em for bug-gnu-emacs@gnu.org; Thu, 23 May 2013 23:07:12 -0400 Received: by mail-pa0-f45.google.com with SMTP id lj1so3750498pab.32 for ; Thu, 23 May 2013 20:07:11 -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=5xZiRTcQGV8ikTgWZswkGxTzTuZCzH/2D2Md8pn78gQ=; b=DW1mj8G3KO4s5gZ/Stgji2UzBFFx80gMqT9JzfqEtGPvMNAY2Bh5P3EMvlICerynnK 3YNzifvITX2fBT10uioOwls9A+ZEmfXfgsDNkxfvSc0WrClm9OrBNp/9O3csWCdM5ted 6rYWHdZ19Mvup4DI+iZen2mFEmto91GoDMKmptOc36MxyXFHMUdskdGgoZv0nUL+x+/X D/I6RmoY+HoG2nYjFlBmFgpnqKKpE40LlpYWMUY6dsA3HxqvrYXgdQa1xlCaed6YVouZ CZOP9Dc2quYGPfEG5woF7ILTpw6lOozyWEj5RETTCkVjj6hfgy+LPmlPloTZpIG5vtd2 AQWw== X-Received: by 10.66.154.195 with SMTP id vq3mr16351233pab.105.1369364831318; Thu, 23 May 2013 20:07:11 -0700 (PDT) Received: from Zeuss-MacBook.local ([119.161.133.157]) by mx.google.com with ESMTPSA id cp1sm14169497pbc.42.2013.05.23.20.07.09 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 23 May 2013 20:07:10 -0700 (PDT) From: Leo Liu To: bug-gnu-emacs@gnu.org Subject: 24.3; buggy forward-sexp in octave mode? Date: Fri, 24 May 2013 11:07:02 +0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.7 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) --=-=-= Content-Type: text/plain 1. Open the attached file 2. Move point to end of the word 'otherwise' 3. M-: (forward-sexp -1) Is this correct behaviour? I noticed this via smie-highlight-matching-block-mode. Leo --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=unimplemented.m Content-Description: unimplemented.m ## -*- mode: octave; -*- function txt = unimplemented (fcn) is_matlab_function = true; ## Some smarter cases, add more as needed. switch (fcn) case "importdata" txt = ["importdata is not implemented. Similar functionality is ",... "available through @code{load}, @code{dlmread}, @code{csvread}, ",... "or @code{textscan}."]; case "quad2d" txt = ["quad2d is not implemented. Consider using dblquad."]; case "gsvd" txt = ["gsvd is not currently part of core Octave. See the ",... "linear-algebra package at ",... "@url{http://octave.sourceforge.net/linear-algebra/}."]; case "linprog" txt = ["Octave does not currently provide linprog. ",... "Linear programming problems may be solved using @code{glpk}. ",... "Try @code{help glpk} for more info."]; case {"ode113", "ode15i", "ode15s", "ode23", "ode23s", "ode23t", "ode45", "odeget", "odeset"} txt = ["Octave provides lsode for solving differential equations. ",... "For more information try @code{help lsode}. ",... "Matlab-compatible ODE functions are provided by the odepkg package. ",... "See @url{http://octave.sourceforge.net/odepkg/}."]; otherwise if (ismember (fcn, missing_functions ())) txt = sprintf ("the '%s' function is not yet implemented in Octave", fcn); else is_matlab_function = false; txt = ""; endif endswitch if (is_matlab_function) txt = [txt, "\n\n@noindent\nPlease read ",... "@url{http://www.octave.org/missing.html} to learn how ",... "you can contribute missing functionality."]; txt = __makeinfo__ (txt); endif if (nargout == 0) warning ("Octave:missing-function", "%s", txt); endif endfunction --=-=-=-- ------------=_1370662682-19333-1--