From unknown Fri Jun 20 07:09:21 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#1407 <1407@debbugs.gnu.org> To: bug#1407 <1407@debbugs.gnu.org> Subject: Status: octave end keyword bug Reply-To: bug#1407 <1407@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:09:21 +0000 retitle 1407 octave end keyword bug reassign 1407 emacs submitter 1407 "Daniel Elliott" severity 1407 normal thanks From rgm@gnu.org Fri Nov 21 15:55:27 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-17.0 required=4.0 tests=BAYES_00,HAS_PACKAGE, RCVD_IN_DNSWL_MED,X_DEBBUGS_NO_ACK autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at quiet) by emacsbugs.donarmstrong.com; 21 Nov 2008 23:55:27 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mALNtN3C020620 for ; Fri, 21 Nov 2008 15:55:25 -0800 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1L3fqB-0004aC-Db for quiet@emacsbugs.donarmstrong.com; Fri, 21 Nov 2008 18:55:11 -0500 From: "Daniel Elliott" To: quiet@debbugs.gnu.org Subject: end keyword bug Date: Fri, 26 Oct 2007 02:35:06 +0000 Lines: 26 X-From-Line: bug-gnu-emacs-bounces+rgm=gnu.org@gnu.org Fri Oct 26 06:21:22 2007 Received: from mx10.gnu.org ([199.232.76.166]) by fencepost.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IlMJe-0006xY-0z for rgm@gnu.org; Fri, 26 Oct 2007 06:21:22 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1IlMJW-0004mQ-4j for rgm@gnu.org; Fri, 26 Oct 2007 06:21:21 -0400 Received: from lists.gnu.org ([199.232.76.165]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IlMJV-0004mG-VW for rgm@gnu.org; Fri, 26 Oct 2007 06:21:14 -0400 Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IlMJV-0001F7-Kr for rgm@gnu.org; Fri, 26 Oct 2007 06:21:13 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IlF2X-0002NS-9F for bug-gnu-emacs@gnu.org; Thu, 25 Oct 2007 22:35:13 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IlF2T-0002H6-FO for bug-gnu-emacs@gnu.org; Thu, 25 Oct 2007 22:35:12 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IlF2T-0002Gp-6I for bug-gnu-emacs@gnu.org; Thu, 25 Oct 2007 22:35:09 -0400 Received: from py-out-1112.google.com ([64.233.166.182]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IlF2S-0001BL-G4 for bug-gnu-emacs@gnu.org; Thu, 25 Oct 2007 22:35:08 -0400 Received: by py-out-1112.google.com with SMTP id a73so1217530pye for ; Thu, 25 Oct 2007 19:35:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=Aul9KH5KpkqQxUuyIib6HSHkoYoPQ56JURr/NkEQFNM=; b=LzF2f4IWSdbBWKOZ4XRFI0rdUOuq/R7K81H0UsfKfUZM+PiaQqAIo1y/RhP4URuQcxZzbkN07ZdW0zrMw0ECDfBP9kUo66SoFytLJ6o9bVonzxZNRoGo2oA5Pj6UJcPWwbX8Bh+pAQWO2Oc536+HsPqD6ndVDpnCC1AD3jXCOh8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=jlKZh9nFc4grgE4zzR8Q04s4pUh29JERkmtwEo+WQP9T96ESajWZ9so7D/0FYLvGkHoGizsm+nliDp9z9yH8nPY4ot5XdgQZCXas6qBOXwwXU9O/Pxc2OVCUJwbodb5dzEdVzJsHsCi4H4gCj1ZIOFwP7MdJ5cdESmOdR4KjnZk= Received: by 10.65.74.9 with SMTP id b9mr5364975qbl.1193366106380; Thu, 25 Oct 2007 19:35:06 -0700 (PDT) Received: by 10.65.188.16 with HTTP; Thu, 25 Oct 2007 19:35:06 -0700 (PDT) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-Mailman-Approved-At: Fri, 26 Oct 2007 06:21:08 -0400 X-Debbugs-No-Ack: yes X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list 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+rgm=gnu.org@gnu.org X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: Glenn Morris Package: emacs,octave [ resent from http://lists.gnu.org/archive/html/bug-gnu-emacs/2007-10/msg00166.html ] Hello, Thank you for your work on the emacs octave-mode! Has the incorrect indentation when the end keyword is used as an array index been fixed? Currently, any use of end other than to close a loop or conditional block confuses the indentation of octave-mode. Example: for c=1:C Lambda(lastGood_Lambda(c)+1:end,c) = sigma;D_c(c) = M; endfor The octave-mode thinks that the end used as an array index is the end for the for loop. If this has been fixed, where should I download the latest, fixed, stable version? Thank you, dan elliott From lekktu@gmail.com Sun Nov 23 14:31:26 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-4.7 required=4.0 tests=AWL,BAYES_00,GMAIL autolearn=no version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1407) by emacsbugs.donarmstrong.com; 23 Nov 2008 22:31:26 +0000 Received: from rn-out-0910.google.com (rn-out-0910.google.com [64.233.170.191]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mANMVNg9014382 for <1407@emacsbugs.donarmstrong.com>; Sun, 23 Nov 2008 14:31:24 -0800 Received: by rn-out-0910.google.com with SMTP id j66so1542267rne.20 for <1407@emacsbugs.donarmstrong.com>; Sun, 23 Nov 2008 14:31:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=4p6U8RnR7++ynd1B+SCMQKfX5XRPyJh0OeGEj4Dzc0U=; b=mcAFWpgmdnzJQdizNXt1aIAvZvQMroF2GxP3j42OdNsKhrSk/P/TJSC5UlRF0o85PX xbb3WO1AyuYWRs/H/0Z11ZKcrNxQUR687G0cDliYjqr5GJ30Fgp3cNdHAvKlw6eiLsU7 3/SwtqBE+Tomap2832NqdGh0ftZo0d6AlKrWQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=nJovZCBAXRehuO+s4bJCJOcuKIZA1IJJqwLte6WwNOaX1cGnSEU01v+ynH7qE7Kg/2 RsQmqRYG2yNUgXmMQ0HdQbPaUcEgR9JO9ta/VU52cNVRyAZaRzvwmmStfdy0H+pf2UBL qkSasEgqNOdfEUf7BFSOio/idRppe9d3iiQxg= Received: by 10.100.124.6 with SMTP id w6mr1255199anc.80.1227479482641; Sun, 23 Nov 2008 14:31:22 -0800 (PST) Received: by 10.100.13.13 with HTTP; Sun, 23 Nov 2008 14:31:22 -0800 (PST) Message-ID: Date: Sun, 23 Nov 2008 23:31:22 +0100 From: "Juanma Barranquero" To: "Daniel Elliott" Subject: Re: end keyword bug Cc: 1407@debbugs.gnu.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: On Fri, Oct 26, 2007 at 03:35, Daniel Elliott wrote: > Example: > > for c=1:C > Lambda(lastGood_Lambda(c)+1:end,c) = sigma;D_c(c) = M; > endfor > > The octave-mode thinks that the end used as an array index is the end > for the for loop. Does this problem still happen with the latest Emacs code from the CVS? Apparently it was fixed some time ago. Juanma From rgm@gnu.org Sun Nov 23 23:45:18 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-12.4 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_MED,X_DEBBUGS_NO_ACK autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1407-done) by emacsbugs.donarmstrong.com; 24 Nov 2008 07:45:18 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mAO7jF81031819 for <1407-done@emacsbugs.donarmstrong.com>; Sun, 23 Nov 2008 23:45:16 -0800 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1L4W7w-0002ep-3t; Mon, 24 Nov 2008 02:45:00 -0500 From: Glenn Morris To: Juanma Barranquero Cc: 1407-done@debbugs.gnu.org Subject: Re: bug#1407: end keyword bug References: X-Spook: AVN AMEMB Peking plutonium argus clandestine Cohiba X-Ran: yfgv68xq~zU.%(#|^Vs@StB:t=)vro (Juanma Barranquero's message of "Sun, 23 Nov 2008 23:31:22 +0100") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii "Juanma Barranquero" wrote: > Does this problem still happen with the latest Emacs code from the > CVS? Apparently it was fixed some time ago. My mistake; I forwarded what I thought was an old unanswered bug, but you are right, it is fixed. (I was thinking it was about font-lock rather than indentation.) From danelliottster@gmail.com Wed Dec 10 08:12:44 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.0000 Tokens: new, 39; hammy, 147; neutral, 121; spammy, 4. spammytokens:0.995-1--HTo:U*1407, 0.995-1--H*Ad:U*1407, 0.993-1--considers, 0.987-1--unsatisfactory hammytokens:0.000-+--emacs, 0.000-+--Emacs, 0.000-+--cvs, 0.000-+--CVS, 0.000-+--HDKIM-Signature:sk:content X-Spam-Status: No, score=-6.0 required=4.0 tests=BAYES_00,GMAIL,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1407) by emacsbugs.donarmstrong.com; 10 Dec 2008 16:12:44 +0000 Received: from mail-qy0-f20.google.com (mail-qy0-f20.google.com [209.85.221.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mBAGCeG1012529 for <1407@emacsbugs.donarmstrong.com>; Wed, 10 Dec 2008 08:12:42 -0800 Received: by qyk13 with SMTP id 13so1510429qyk.1 for <1407@emacsbugs.donarmstrong.com>; Wed, 10 Dec 2008 08:12:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=yHBzL4ywLvtFh4qzwK1dqhldA7e5jlwaef5ok8LshOY=; b=vRxZ8PZb9IKOsIKwr50Yim5VtuuMNVLwZOXdshDCgaA8Xj59266rXQ1aP9ktylGRQc +qSGnHp1RHPvVT4WhW2ZNSX7ul3MIwmOB+4nFYv4B8/7qjf7qBAB4SsshagvfoZml6/6 ZcLZHj3RZ7OY3SxtQqJrn92zRX8NMdmkAwgUs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=rOB5GcSG/hlZiNImn6RSuZSExioPxd1YaoOI40FwJklneXwBiaw/iqTmyROx2HafDt +OgluQFcYj+QsX0lVuZ/HAc0/6te1mQCPKahzXNMjXHuZktmVbGnK8+CUpd4IKdFi16U pcMfrvjecPoPjihAF1UdKy7DF6t84rLducjxU= Received: by 10.142.169.4 with SMTP id r4mr289947wfe.105.1228925554626; Wed, 10 Dec 2008 08:12:34 -0800 (PST) Received: by 10.142.143.16 with HTTP; Wed, 10 Dec 2008 08:12:34 -0800 (PST) Message-ID: Date: Wed, 10 Dec 2008 10:12:34 -0600 From: "Daniel Elliott" To: 1407@debbugs.gnu.org Subject: Re: bug#1407 closed by Glenn Morris (Re: bug#1407: end keyword bug) In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: I would say that this is definately not fixed. Now the octave mode no longer considers end to be a valid keyword to end blocks like if, while, for, etc. Octave mode should allow end to close these things in the same way that it uses endif, endwhile, and endfor respectively. Thanks. - dan On Mon, Nov 24, 2008 at 1:55 AM, Emacs bug Tracking System wrote: > > This is an automatic notification regarding your bug report > which was filed against the emacs,octave package: > > #1407: end keyword bug > > It has been closed by Glenn Morris . > > Their explanation is attached below along with your original report. > If this explanation is unsatisfactory and you have not received a > better one in a separate message then please contact Glenn Morris by > replying to this email. > > > -- > 1407: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=1407 > Emacs Bug Tracking System > Contact don@donarmstrong.com with problems > > > ---------- Forwarded message ---------- > From: Glenn Morris > To: Juanma Barranquero > Date: Mon, 24 Nov 2008 02:45:00 -0500 > Subject: Re: bug#1407: end keyword bug > "Juanma Barranquero" wrote: > >> Does this problem still happen with the latest Emacs code from the >> CVS? Apparently it was fixed some time ago. > > My mistake; I forwarded what I thought was an old unanswered bug, but > you are right, it is fixed. (I was thinking it was about font-lock > rather than indentation.) > > > > ---------- Forwarded message ---------- > From: "Daniel Elliott" > To: quiet@emacsbugs.donarmstrong.com > Date: Fri, 26 Oct 2007 02:35:06 +0000 > Subject: end keyword bug > Package: emacs,octave > > [ resent from > http://lists.gnu.org/archive/html/bug-gnu-emacs/2007-10/msg00166.html ] > > Hello, > > Thank you for your work on the emacs octave-mode! > > Has the incorrect indentation when the end keyword is used as an array > index been fixed? Currently, any use of end other than to close a > loop or conditional block confuses the indentation of octave-mode. > > Example: > > for c=1:C > Lambda(lastGood_Lambda(c)+1:end,c) = sigma;D_c(c) = M; > endfor > > The octave-mode thinks that the end used as an array index is the end > for the for loop. > > If this has been fixed, where should I download the latest, fixed, > stable version? > > Thank you, > > dan elliott > > > > From rgm@gnu.org Wed Dec 10 10:40:52 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.0000 Tokens: new, 17; hammy, 31; neutral, 39; spammy, 0. spammytokens: hammytokens:0.000-+--H*UA:Emacs, 0.000-+--H*r:140.186.70, 0.000-+--H*r:ip*140.186.70.10, 0.000-+--H*r:sk:fencepo, 0.000-+--H*MI:fencepost X-Spam-Status: No, score=-8.7 required=4.0 tests=AWL,BAYES_00,MISSING_SUBJECT, NOSUBJECT,RCVD_IN_DNSWL_MED,TVD_SPACE_RATIO,VALID_BTS_CONTROL, X_DEBBUGS_NO_ACK autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at control) by emacsbugs.donarmstrong.com; 10 Dec 2008 18:40:52 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mBAIenO5029274 for ; Wed, 10 Dec 2008 10:40:50 -0800 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1LATyl-00062Y-Kt; Wed, 10 Dec 2008 13:40:11 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18752.3339.508897.882941@fencepost.gnu.org> Date: Wed, 10 Dec 2008 13:40:11 -0500 From: Glenn Morris To: control X-Attribution: GM X-Mailer: VM (www.wonderworks.com/vm), GNU Emacs (www.gnu.org/software/emacs) X-Hue: cyan X-Ran: %r1Z8EMfa8a."*Hh'WI?L@oa%~vGTAFIdc5ng[7*7"8'yiQl5ET+Ds#v)GB-u]*^zg8mX9 X-Debbugs-No-Ack: yes reopen 1407 From rgm@gnu.org Wed Dec 17 10:36:39 2008 Received: (at 1407-quiet) by emacsbugs.donarmstrong.com; 17 Dec 2008 18:36:39 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.9 required=4.0 tests=FOURLA,FVGT_m_MULTI_ODD,GMAIL, HAS_BUG_NUMBER,IMPRONONCABLE_2,X_DEBBUGS_NO_ACK autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mBHIaZEh029634 for <1407-quiet@emacsbugs.donarmstrong.com>; Wed, 17 Dec 2008 10:36:36 -0800 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1LD1FN-00008i-Nn for 1407-quiet@emacsbugs.donarmstrong.com; Wed, 17 Dec 2008 13:35:49 -0500 From: dan To: 1407-quiet@debbugs.gnu.org Subject: Re: bug#1407: end keyword bug Date: Tue, 16 Dec 2008 14:10:03 -0800 (PST) Organization: http://groups.google.com Lines: 163 References: X-From-Line: bug-gnu-emacs-bounces+rgm=gnu.org@gnu.org Tue Dec 16 17:39:46 2008 Received: from mx10.gnu.org ([199.232.76.166]:34795) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1LCiZu-0006vZ-LQ for rgm@gnu.org; Tue, 16 Dec 2008 17:39:46 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1LCiaV-0002Rz-Qu for rgm@gnu.org; Tue, 16 Dec 2008 17:40:29 -0500 Received: from lists.gnu.org ([199.232.76.165]:56020) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LCiaV-0002Rm-2J for rgm@gnu.org; Tue, 16 Dec 2008 17:40:23 -0500 Received: from localhost ([127.0.0.1]:59841 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LCiaU-0003vL-SB for rgm@gnu.org; Tue, 16 Dec 2008 17:40:22 -0500 Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!d42g2000prb.googlegroups.com!not-for-mail X-Debbugs-No-Ack: yes NNTP-Posting-Host: 72.196.4.158 X-Trace: posting.google.com 1229465404 25767 127.0.0.1 (16 Dec 2008 22:10:04 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 16 Dec 2008 22:10:04 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: d42g2000prb.googlegroups.com; posting-host=72.196.4.158; posting-account=n5vr7AoAAAAodRRH-CCmDpUqYJ5l6u3i X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4,gzip(gfe),gzip(gfe) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list 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+rgm=gnu.org@gnu.org X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Sender: Glenn Morris Hello. Here is my suggested fix for this problem. It has the negative aspect of identifying all end keywords between parens as not block-ending keywords. However, I doubt that is a problem. I've used this for a couple days and everything seems fine. I'm also not certain if we can add end as a valid keyword for things in the octave-block-match-alist. - dan elliott --- octave-mod.bak.el 2008-12-16 14:35:14.000000000 -0700 +++ octave-mod.el 2008-12-16 14:45:53.000000000 -0700 @@ -101,11 +101,9 @@ '("do" "for" "function" "if" "switch" "try" "unwind_protect" "while")) (defvar octave-else-keywords '("case" "catch" "else" "elseif" "otherwise" "unwind_protect_cleanup")) -;; FIXME: only use specific "end" tokens here to avoid confusion when "end" -;; is used in indexing (the real fix is much more complex). (defvar octave-end-keywords '("endfor" "endfunction" "endif" "endswitch" "end_try_catch" - "end_unwind_protect" "endwhile" "until")) + "end_unwind_protect" "endwhile" "until" "end")) (defvar octave-reserved-words (append octave-begin-keywords @@ -346,13 +344,13 @@ ;; is used in indexing (the real fix is much more complex). (defvar octave-block-match-alist '(("do" . ("until")) - ("for" . ("endfor")) + ("for" . ("endfor" "end")) ("function" . ("endfunction")) - ("if" . ("else" "elseif" "endif")) - ("switch" . ("case" "otherwise" "endswitch")) + ("if" . ("else" "elseif" "endif" "end")) + ("switch" . ("case" "otherwise" "endswitch" "end")) ("try" . ("catch" "end_try_catch")) ("unwind_protect" . ("unwind_protect_cleanup" "end_unwind_protect")) - ("while" . ("endwhile"))) + ("while" . ("endwhile" "end"))) "Alist with Octave's matching block keywords. Has Octave's begin keywords as keys and a list of the matching else or end keywords as associated values.") @@ -680,7 +678,8 @@ (if (=3D bot (point)) (setq icol (+ icol octave-block-offset)))) ((octave-looking-at-kw octave-block-end-regexp) - (if (not (=3D bot (point))) + (if (and (not (=3D bot (point))) + (not (octave-end-as-array-index- p))) ;special case for end keyword but is applied to all keywords (setq icol (- icol (octave-block-end- offset))))))) (forward-char))) @@ -1525,3 +1524,14 @@ ;; arch-tag: 05f1ce09-be87-4c00-803e-4919ffa26c23 ;;; octave-mod.el ends here + + +;; TODO: this should probably also make sure we are actually looking at and "end" keyword +(defun octave-end-as-array-index-p () + "pos is the position of the end keyword (end 'e', 'n', or 'd')" + (save-excursion + (condition-case nil ;test if point is between parens + (progn + (up-list 1) + t) + (error nil)))) On Dec 10, 10:12=A0am, "Daniel Elliott" wrote: > I would say that this is definately not fixed. =A0Now the octave mode no > longer considers end to be a valid keyword to end blocks like if, > while, for, etc. =A0Octave mode should allow end to close these things > in the same way that it uses endif, endwhile, and endfor respectively. > > Thanks. > > - dan > > On Mon, Nov 24, 2008 at 1:55 AM, Emacs bug Tracking System > > wrote: > > > This is an automatic notification regarding your bug report > > which was filed against the emacs,octave package: > > > #1407: end keyword bug > > > It has been closed by Glenn Morris . > > > Their explanation is attached below along with your original report. > > If this explanation is unsatisfactory and you have not received a > > better one in a separate message then please contact Glenn Morris by > > replying to this email. > > > -- > > 1407:http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D1407 > > Emacs Bug Tracking System > > Contact d...@donarmstrong.com with problems > > > ---------- Forwarded message ---------- > > From: Glenn Morris > > To: Juanma Barranquero > > Date: Mon, 24 Nov 2008 02:45:00 -0500 > > Subject: Re: bug#1407: end keyword bug > > "Juanma Barranquero" wrote: > > >> Does this problem still happen with the latest Emacs code from the > >> CVS? Apparently it was fixed some time ago. > > > My mistake; I forwarded what I thought was an old unanswered bug, but > > you are right, it is fixed. (I was thinking it was about font-lock > > rather than indentation.) > > > ---------- Forwarded message ---------- > > From: "Daniel Elliott" > > To: qu...@emacsbugs.donarmstrong.com > > Date: Fri, 26 Oct 2007 02:35:06 +0000 > > Subject: end keyword bug > > Package: emacs,octave > > > [ resent from > > =A0http://lists.gnu.org/archive/html/bug-gnu-emacs/2007-10/msg00166.htm= l] > > > Hello, > > > Thank you for your work on the emacs octave-mode! > > > Has the incorrect indentation when the end keyword is used as an array > > index been fixed? =A0Currently, any use of end other than to close a > > loop or conditional block confuses the indentation of octave-mode. > > > Example: > > > for c=3D1:C > > =A0 =A0Lambda(lastGood_Lambda(c)+1:end,c) =3D sigma;D_c(c) =3D M; > > =A0endfor > > > The octave-mode thinks that the end used as an array index is the end > > for the for loop. > > > If this has been fixed, where should I download the latest, fixed, > > stable version? > > > Thank you, > > > dan elliott From rgm@gnu.org Sun Apr 19 12:16:46 2009 Received: (at control) by emacsbugs.donarmstrong.com; 19 Apr 2009 19:16:46 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-5.0 required=4.0 tests=VALID_BTS_CONTROL, X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n3JJGhH0023421 for ; Sun, 19 Apr 2009 12:16:44 -0700 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1LvcVO-0007tL-1r; Sun, 19 Apr 2009 15:16:42 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18923.30873.979179.15578@fencepost.gnu.org> Date: Sun, 19 Apr 2009 15:16:41 -0400 From: Glenn Morris To: control Subject: control message X-Attribution: GM X-Mailer: VM (www.wonderworks.com/vm), GNU Emacs (www.gnu.org/software/emacs) X-Hue: black X-Ran: WvNCgf:_UX$k.fAv8&TGfWaYcubY$m->T+lE_U6YBa2t\YJ.<(i\KjAZsfX;A}kiE0>W}J X-Debbugs-No-Ack: yes reopen 1407 reassign 3045 spam reassign 3046 spam reassign 3047 spam reassign 3049 spam reassign 3050 spam reassign 3051 spam From rgm@gnu.org Mon Apr 20 14:22:32 2009 Received: (at control) by emacsbugs.donarmstrong.com; 20 Apr 2009 21:22:33 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-5.0 required=4.0 tests=VALID_BTS_CONTROL, X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n3KLMUbY006199 for ; Mon, 20 Apr 2009 14:22:31 -0700 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1Lw0wf-0005dO-D4; Mon, 20 Apr 2009 17:22:29 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18924.59285.349868.380816@fencepost.gnu.org> Date: Mon, 20 Apr 2009 17:22:29 -0400 From: Glenn Morris To: control Subject: control message X-Debbugs-No-Ack: yes reassign 3056 spam reassign 3057 spam reassign 3058 spam reassign 3059 spam clone 1407 -1 reopen -1 From unknown Fri Jun 20 07:09:21 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 30 Sep 2009 14:24:12 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A long time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 13 13:57:47 2010 Received: (at control) by debbugs.gnu.org; 13 Jan 2010 18:57:47 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NV8Pb-0006o7-MR for submit@debbugs.gnu.org; Wed, 13 Jan 2010 13:57:47 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NV8PX-0006no-Ki for control@debbugs.gnu.org; Wed, 13 Jan 2010 13:57:44 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1NV8PS-0003HD-U8; Wed, 13 Jan 2010 13:57:39 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19278.6050.644808.704561@fencepost.gnu.org> Date: Wed, 13 Jan 2010 13:57:38 -0500 From: Glenn Morris To: control Subject: control X-Attribution: GM X-Mailer: VM (www.wonderworks.com/vm), GNU Emacs (www.gnu.org/software/emacs) X-Hue: cyan X-Ran: sxkwQq4QG]d6pysL(o\QVgJ#[0t=ex%Ci!{Us=V2!Sg\()z9^,i.}}jfQ`,gs@ 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.9 (----) unarchive 1407 merge 1407 3061 close 5237 tags 1955 moreinfo unreproducible reassign 5261 emacs,ns tags 5261 moreinfo From unknown Fri Jun 20 07:09:21 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 11 Feb 2010 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A long time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator