From unknown Mon Jun 16 23:46:59 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#14332 <14332@debbugs.gnu.org> To: bug#14332 <14332@debbugs.gnu.org> Subject: Status: 24.3; Octave indentation bug Reply-To: bug#14332 <14332@debbugs.gnu.org> Date: Tue, 17 Jun 2025 06:46:59 +0000 retitle 14332 24.3; Octave indentation bug reassign 14332 emacs submitter 14332 Leo Liu severity 14332 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Thu May 02 00:05:30 2013 Received: (at submit) by debbugs.gnu.org; 2 May 2013 04:05:30 +0000 Received: from localhost ([127.0.0.1]:54308 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UXklt-0003vw-UM for submit@debbugs.gnu.org; Thu, 02 May 2013 00:05:30 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37777) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UXkls-0003vf-18 for submit@debbugs.gnu.org; Thu, 02 May 2013 00:05:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UXklK-00013h-9I for submit@debbugs.gnu.org; Thu, 02 May 2013 00:04:55 -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,FREEMAIL_FROM, T_DKIM_INVALID,USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:49070) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXklK-00013c-6y for submit@debbugs.gnu.org; Thu, 02 May 2013 00:04:54 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49123) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXklJ-0002WS-7S for bug-gnu-emacs@gnu.org; Thu, 02 May 2013 00:04:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UXklI-00012w-FK for bug-gnu-emacs@gnu.org; Thu, 02 May 2013 00:04:53 -0400 Received: from mail-da0-x22a.google.com ([2607:f8b0:400e:c00::22a]:63762) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXklI-00012k-8P for bug-gnu-emacs@gnu.org; Thu, 02 May 2013 00:04:52 -0400 Received: by mail-da0-f42.google.com with SMTP id r6so108717dad.1 for ; Wed, 01 May 2013 21:04:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:subject:x-debbugs-cc:date:message-id :mime-version:content-type; bh=GInNEXNPyi7pZBkIlWkxyrLZigopoQsFerTDBCvZSyA=; b=vUOSbo7VcwN3zJokouaAv46SFIfwuICtUlCe8rqcZreGWe9qKIu4C5xBiE63Fpw+AV RrPGAljFtdaU05YxIxllHXZjLrmKOnGQR035OsVA0E0ftA42d3dTRY5LLLgw1ROcidKv ftnT01p51945C5ODe3XwSxADtmlVcvBWn0lkULevPPMa2f8ptcy5+kydKitXUpk7KrOT me5JcgTeG8B4n9eO1sdik/Ke+eeJGxdjSNzn82zr5f6/sQn1dHNkl1WGR6umy237+UJU 2tSNe0kkD38lur8xMhcxlDpj0NKRWbQHUrgxBTR2JyyEFny+tASWvXNC0+Lr/KRAR9Py YJyw== X-Received: by 10.68.176.197 with SMTP id ck5mr6860610pbc.165.1367467490890; Wed, 01 May 2013 21:04:50 -0700 (PDT) Received: from Zeuss-MacBook.local ([110.172.225.137]) by mx.google.com with ESMTPSA id br2sm5525202pbc.46.2013.05.01.21.04.49 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 01 May 2013 21:04:50 -0700 (PDT) From: Leo Liu To: bug-gnu-emacs@gnu.org Subject: 24.3; Octave indentation bug X-Debbugs-CC: Stefan Monnier Date: Thu, 02 May 2013 12:04:44 +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: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) 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 (------) Indent the following lines in octave mode if (true) a = (1 \(2-3)); else a = 0; endif gives me if (true) a = (1 \(2-3)); else a = 0; endif It seems treating \ as escape outside strings is incorrect. Is the following fix is correct? diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el index a58fdefb..1e2c2425 100644 --- a/lisp/progmodes/octave.el +++ b/lisp/progmodes/octave.el @@ -233,7 +233,7 @@ (defvar octave-mode-syntax-table (modify-syntax-entry ?& "." table) (modify-syntax-entry ?| "." table) (modify-syntax-entry ?! "." table) - (modify-syntax-entry ?\\ "\\" table) + (modify-syntax-entry ?\\ "." table) (modify-syntax-entry ?\' "." table) ;; Was "w" for abbrevs, but now that it's not necessary any more, (modify-syntax-entry ?\` "." table) From debbugs-submit-bounces@debbugs.gnu.org Sun May 05 01:30:38 2013 Received: (at 14332) by debbugs.gnu.org; 5 May 2013 05:30:38 +0000 Received: from localhost ([127.0.0.1]:58387 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UYrWw-0004yX-GG for submit@debbugs.gnu.org; Sun, 05 May 2013 01:30:38 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:29088) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UYrWu-0004yJ-7o for 14332@debbugs.gnu.org; Sun, 05 May 2013 01:30:36 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFMCqRF/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDpHqBXoMT X-IPAS-Result: Av4EABK/CFFMCqRF/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDpHqBXoMT X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="11064208" Received: from 76-10-164-69.dsl.teksavvy.com (HELO pastel.home) ([76.10.164.69]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 05 May 2013 01:29:42 -0400 Received: by pastel.home (Postfix, from userid 20848) id E897767917; Sun, 5 May 2013 01:29:45 -0400 (EDT) From: Stefan Monnier To: Leo Liu Subject: Re: bug#14332: 24.3; Octave indentation bug Message-ID: References: Date: Sun, 05 May 2013 01:29:45 -0400 In-Reply-To: (Leo Liu's message of "Thu, 02 May 2013 12:04:44 +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-Debbugs-Envelope-To: 14332 Cc: 14332@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 (-) > It seems treating \ as escape outside strings is incorrect. Is the > following fix is correct? [..] > - (modify-syntax-entry ?\\ "\\" table) > + (modify-syntax-entry ?\\ "." table) Wouldn't that mess up the case of a = "hello\"there"; ? Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun May 05 01:36:39 2013 Received: (at 14332) by debbugs.gnu.org; 5 May 2013 05:36:39 +0000 Received: from localhost ([127.0.0.1]:58391 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UYrcl-0005NJ-9c for submit@debbugs.gnu.org; Sun, 05 May 2013 01:36:39 -0400 Received: from mail-pd0-f172.google.com ([209.85.192.172]:56824) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UYrci-0005N6-Vn for 14332@debbugs.gnu.org; Sun, 05 May 2013 01:36:38 -0400 Received: by mail-pd0-f172.google.com with SMTP id 5so1523688pdd.17 for <14332@debbugs.gnu.org>; Sat, 04 May 2013 22:35:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:references:face:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=2pX9YmZgQUZrTduYorm1kJYGFme143cdqlyCYLP2FNc=; b=LpUfAPsscNqDBgavXb5sEuND5lcJ1uW/1ZMKMtnGyjr0tX84OVrhx/LjhQSnxXA9mS qmsgoRqnz3d6Q9Qnyat9UqsMwvklhPDCN4nwrI8DUvGuNxxFJUJCXcrIk4d0+Y3UGGK5 0Xdc08tayBC144gEk9VgzPuOMmu209cmFBsev0u2ngM8QC1k7L45kC4bZj5oKCdH+ESP ox8nm2Hek0JzD25kM4fHLfiiyUm+zQkXNvVBtJCQ+yXZA7aRsoagzaV1nvX0sSADy4DY Xlw29XFM3Gh2n/EzNtndZehLbyPNihZNDeT/owPEmD7ITv9PUjvhqDb+D7SDHyijqAxH C5MQ== X-Received: by 10.66.26.71 with SMTP id j7mr21115901pag.209.1367732146689; Sat, 04 May 2013 22:35:46 -0700 (PDT) Received: from Zeuss-MacBook.local (li511-224.members.linode.com. [66.175.216.224]) by mx.google.com with ESMTPSA id qr7sm18393235pbc.16.2013.05.04.22.35.44 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 04 May 2013 22:35:46 -0700 (PDT) From: Leo Liu To: Stefan Monnier Subject: Re: bug#14332: 24.3; Octave indentation bug References: Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAGFBMVEUzRVhbQj4eZqO6SjnT eWpxnMetm5b6/PmidmqrAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1F B9cBBwMLBfKABCMAAAFoSURBVCjPtZI9a8MwEIaFoc7aYDdelQMna0Em3tsSr0XUeE2Q6a22a+v+ fk8fSSBkbDUI6dHpfe9OEvRgiD+ApqKPJgJeB6iUUXWESjUe/ig38AJrhqqvaU2nTIXbNvOQ40fe qdry4kyGoVWsfCQalXpHnJGM01wjWdYbMlXNFdsZDO69m9aqNqxEJqTEgbM5OF7wlEfIoll1Ked4 LbM5X2EdILLokEdmI8z7g5cKED0cuTC930TYhy7ZDekkXVGw/L60TguJePPxcJF48lpsSUWEA/Ju jGFNgJOXc4Hz7TmAdBeu5Ve4AEjOi2/2jfd3cAJZ+IbNrvdjgBZY01b+HTuG3cLws6BJZqVOj/pp T0OqVwx3rFq+QmJwx3loK5JSLEhDIt62+mtC2C+SrAUxEbV6C6v2BRbd6pILBKFpepKZJHgGgrKF sptSUUoczpwg2pQ7ZH1tgs0ou/917mzz6Cs2//C978cv5l07L02orIEAAAAASUVORK5CYII= Date: Sun, 05 May 2013 13:35:49 +0800 In-Reply-To: (Stefan Monnier's message of "Sun, 05 May 2013 01:29:45 -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.5 (/) X-Debbugs-Envelope-To: 14332 Cc: 14332@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-05 13:29 +0800, Stefan Monnier wrote: > Wouldn't that mess up the case of > > a = "hello\"there"; Yes it does. How to fix this bug properly? Leo From debbugs-submit-bounces@debbugs.gnu.org Sun May 05 03:18:06 2013 Received: (at 14332) by debbugs.gnu.org; 5 May 2013 07:18:06 +0000 Received: from localhost ([127.0.0.1]:58431 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UYtCv-00047U-NS for submit@debbugs.gnu.org; Sun, 05 May 2013 03:18:05 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:48101) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UYtCt-00047K-Ha for 14332@debbugs.gnu.org; Sun, 05 May 2013 03:18:04 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFMCqRF/2dsb2JhbABEvw4Xc4IeAQEEAVYjEAsOJhIUGA0kiB4GwS2RCgOkeoFegxM X-IPAS-Result: Av4EABK/CFFMCqRF/2dsb2JhbABEvw4Xc4IeAQEEAVYjEAsOJhIUGA0kiB4GwS2RCgOkeoFegxM X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="11069148" Received: from 76-10-164-69.dsl.teksavvy.com (HELO pastel.home) ([76.10.164.69]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 05 May 2013 03:17:08 -0400 Received: by pastel.home (Postfix, from userid 20848) id 1C02167917; Sun, 5 May 2013 03:17:11 -0400 (EDT) From: Stefan Monnier To: Leo Liu Subject: Re: bug#14332: 24.3; Octave indentation bug Message-ID: References: Date: Sun, 05 May 2013 03:17:11 -0400 In-Reply-To: (Leo Liu's message of "Sun, 05 May 2013 13:35:49 +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.5 (/) X-Debbugs-Envelope-To: 14332 Cc: 14332@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 (-) >> Wouldn't that mess up the case of >> a = "hello\"there"; > Yes it does. How to fix this bug properly? You'll probably need to add some syntax-propertize case. What does "(1 \(2-3))" mean in Octave? Where else can \ appear in Octave code? Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun May 05 03:29:16 2013 Received: (at 14332) by debbugs.gnu.org; 5 May 2013 07:29:16 +0000 Received: from localhost ([127.0.0.1]:58435 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UYtNi-0004rb-R3 for submit@debbugs.gnu.org; Sun, 05 May 2013 03:29:15 -0400 Received: from mail-pb0-f53.google.com ([209.85.160.53]:35256) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UYtNf-0004rK-8O for 14332@debbugs.gnu.org; Sun, 05 May 2013 03:29:12 -0400 Received: by mail-pb0-f53.google.com with SMTP id un1so1515118pbc.12 for <14332@debbugs.gnu.org>; Sun, 05 May 2013 00:28:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:references:face:date:in-reply-to :message-id:user-agent:mime-version:content-type :content-transfer-encoding; bh=eKXCsSx9Rklx6yhtsU61+6AUWILS37iNo2v01qyoiHg=; b=p9xmdBHb+5LeXU4fvIkBP1ockxvttMItK3paRIiafwZknlhwjEevSlfBRIj1vqrR3j f/uJWPCkPUjk4VKlmkNVsXSLtDJnScDNDOKk+A06Z0oHV0fZSCQJ0FA1xVSS2tqdBbBL +yfrWOpydVf8sFOrpFverWzK0+0kJ88goh9n07VtVE+LhUlXw2siEHyi7f2LUqimnUQl gcwFeOiGpkNGtHrt3bO9lxCLQgE+7pn32uonVMbvKcqzQmWhDaiZfBDDahHuSjLBn6xg ea251XRkO6xY5V+wIoKuIKWxDSOfuim00YgdAto+fEF+QiYOB/bKunz074TFd/VRnd6Q c1OA== X-Received: by 10.68.195.234 with SMTP id ih10mr20281043pbc.162.1367738900265; Sun, 05 May 2013 00:28:20 -0700 (PDT) Received: from Zeuss-MacBook.local (li511-224.members.linode.com. [66.175.216.224]) by mx.google.com with ESMTPSA id ak1sm18748708pbc.10.2013.05.05.00.28.17 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 05 May 2013 00:28:19 -0700 (PDT) From: Leo Liu To: Stefan Monnier Subject: Re: bug#14332: 24.3; Octave indentation bug References: Face: iVBORw0KGgoAAAANSUhEUgAAACkAAAApAQAAAACAGz1bAAABKElEQVQYlWNg3NIt5FDPUPt7 4+X79Qyucz5/ugik+L2PBgKpyphaIK921q23QDnG0NBQoMr/vaWl9f8ZLL78uPv5PwN7RETfzXoG jhmFz27XM0RXmpuY/WfY+fv0Mc56BvFybfXA/wwL5t/wF61n2PU59axXPcOVzbmSW/8zrNt1benC /ww70hqUU/4zKCtrT9jwn8FhwynbufUMendE2aLqGRpdX9al1zM8eh17lKeeQcTMrdD5P8P3j/YT Q/8zXHSb7p1Qz/C4OM2JuZ7hgtI7K6AjqsMnf8j4z8C6xG1tw3+GqpqvsVn/GTzmpD9j/8/wP/oZ S/l/Bka+QO/g/wy15ueeFQL9N1O8mPU/g+umV3t1gdT0/1bTgHLqYVeXAlWKpMWt+w8Az82C9nHf X0cAAAAASUVORK5CYII= Date: Sun, 05 May 2013 15:28:13 +0800 In-Reply-To: (Stefan Monnier's message of "Sun, 05 May 2013 03:17:11 -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; charset=gb2312 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 14332 Cc: 14332@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: -2.6 (--) On 2013-05-05 15:17 +0800, Stefan Monnier wrote: > You'll probably need to add some syntax-propertize case. > What does "(1 \(2-3))" mean in Octave? Where else can \ appear in > Octave code? A \ 1 =A1=D4 inv(A) # one over matrix A, with some optimisation if A is a scalar, A \ 1 =3D 1 / A. so \ is an operator. Leo From debbugs-submit-bounces@debbugs.gnu.org Sun May 05 21:05:11 2013 Received: (at 14332) by debbugs.gnu.org; 6 May 2013 01:05:11 +0000 Received: from localhost ([127.0.0.1]:59207 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UZ9rb-0007eS-BG for submit@debbugs.gnu.org; Sun, 05 May 2013 21:05:11 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:45907) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UZ9rZ-0007eI-Hl for 14332@debbugs.gnu.org; Sun, 05 May 2013 21:05:09 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAFABK/CFFMCqRF/2dsb2JhbABEhke4Rxdzgh4BAQQBIzMjBQsLDgwCGA4CAhQYDSSIHgauX5JOgSOOVIETA6R6gV6DEw X-IPAS-Result: AgAFABK/CFFMCqRF/2dsb2JhbABEhke4Rxdzgh4BAQQBIzMjBQsLDgwCGA4CAhQYDSSIHgauX5JOgSOOVIETA6R6gV6DEw X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="11126968" Received: from 76-10-164-69.dsl.teksavvy.com (HELO pastel.home) ([76.10.164.69]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 05 May 2013 21:04:10 -0400 Received: by pastel.home (Postfix, from userid 20848) id 21E6C67A30; Sun, 5 May 2013 21:04:14 -0400 (EDT) From: Stefan Monnier To: Leo Liu Subject: Re: bug#14332: 24.3; Octave indentation bug Message-ID: References: Date: Sun, 05 May 2013 21:04:14 -0400 In-Reply-To: (Leo Liu's message of "Sun, 05 May 2013 15:28:13 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 14332 Cc: 14332@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: -0.5 (/) >> You'll probably need to add some syntax-propertize case. >> What does "(1 \(2-3))" mean in Octave? Where else can \ appear in >> Octave code? > A \ 1 =E2=89=A1 inv(A) # one over matrix A, with some optimisation > if A is a scalar, A \ 1 =3D 1 / A. > so \ is an operator. Then your best bet is probably to put in the mode's syntax-table the syntax corresponding to the most common use of \ (either as an escape char in strings or as an operator), and then use syntax-propertize to put the other syntax on the other case (where you can check (nth 3 (syntax-ppss (math-beginning 0))) to see if you're within a string). Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun May 05 23:30:54 2013 Received: (at 14332) by debbugs.gnu.org; 6 May 2013 03:30:54 +0000 Received: from localhost ([127.0.0.1]:59273 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UZC8b-00083L-Mj for submit@debbugs.gnu.org; Sun, 05 May 2013 23:30:54 -0400 Received: from mail-pd0-f182.google.com ([209.85.192.182]:52842) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UZC8X-00082e-Jd for 14332@debbugs.gnu.org; Sun, 05 May 2013 23:30:50 -0400 Received: by mail-pd0-f182.google.com with SMTP id 3so1772594pdj.27 for <14332@debbugs.gnu.org>; Sun, 05 May 2013 20:29:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:references:face:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=H8mBm2SbLKpXXZPJMKs/p5DA4Wa1qfixrVLq1Eby418=; b=Y+GSVpv1UKK+XPORW1yfs7R5mqnB181lzJjdzpHD9RyFphYpYidzRRv2Zn/hQncC0C C9rc2b57/cHQwTBSK2rQJi/8V3FdbWPjNyVAkMKYEaUy8ouvSzlfnOmIPP3AN+YzJ48N NFE6bnsbe8yMTcTcDl1EoLzu89RoBEkmde6oOonEbmXe3EoypOxmm/xdkFrv6A/06sS1 qmNbtIpL/LjGyiUkUng+4+/gYXN1PZeJg60aNYM3AjjfoM+YUhpM8pXCZKlC1M1lYGiH dMtPN8hXPUu7yUNwxFlbFz85B8M12XJLd5KcupvLttsHGLBLQ/qHHm4AC8WIfLfrtRLd Kv5w== X-Received: by 10.68.211.73 with SMTP id na9mr24107699pbc.90.1367810993788; Sun, 05 May 2013 20:29:53 -0700 (PDT) Received: from Zeuss-MacBook.local (li511-224.members.linode.com. [66.175.216.224]) by mx.google.com with ESMTPSA id br2sm21930851pbc.46.2013.05.05.20.29.51 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 05 May 2013 20:29:52 -0700 (PDT) From: Leo Liu To: Stefan Monnier Subject: Re: bug#14332: 24.3; Octave indentation bug 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: Mon, 06 May 2013 11:29:42 +0800 In-Reply-To: (Stefan Monnier's message of "Sun, 05 May 2013 21:04:14 -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: multipart/mixed; boundary="=-=-=" X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 14332 Cc: 14332@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 (-) --=-=-= Content-Type: text/plain On 2013-05-06 09:04 +0800, Stefan Monnier wrote: > Then your best bet is probably to put in the mode's syntax-table the > syntax corresponding to the most common use of \ (either as an escape > char in strings or as an operator), and then use syntax-propertize to > put the other syntax on the other case (where you can check (nth > 3 (syntax-ppss (math-beginning 0))) to see if you're within a string). What I would like is to have \ mean "." unless it is in double-quoted strings where it should be "\\". I have the following non-working patch. Ideas? diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el index 2e848600..d5a1af2b 100644 --- a/lisp/progmodes/octave.el +++ b/lisp/progmodes/octave.el @@ -137,6 +137,8 @@ (defun octave-syntax-propertize-function (start end) (goto-char start) (octave-syntax-propertize-sqs end) (funcall (syntax-propertize-rules + ("\\\\" (0 (when (eq (nth 3 (syntax-ppss (match-beginning 0))) ?\") + "\\"))) ;; Try to distinguish the string-quotes from the transpose-quotes. ("\\(?:^\\|[[({,; ]\\)\\('\\)" (1 (prog1 "\"'" (octave-syntax-propertize-sqs end))))) @@ -242,7 +244,7 @@ (defvar octave-mode-syntax-table (modify-syntax-entry ?& "." table) (modify-syntax-entry ?| "." table) (modify-syntax-entry ?! "." table) - (modify-syntax-entry ?\\ "\\" table) + (modify-syntax-entry ?\\ "." table) (modify-syntax-entry ?\' "." table) ;; Was "w" for abbrevs, but now that it's not necessary any more, (modify-syntax-entry ?\` "." table) --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=oct_ind.m Content-Description: oct_ind.m ## -*-Octave-*- "abc\"abc" if (true) a = (1 \(2-3)); else a = 0; endif --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon May 06 04:27:18 2013 Received: (at 14332) by debbugs.gnu.org; 6 May 2013 08:27:18 +0000 Received: from localhost ([127.0.0.1]:59451 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UZGlR-0003wo-If for submit@debbugs.gnu.org; Mon, 06 May 2013 04:27:18 -0400 Received: from mail-pb0-f48.google.com ([209.85.160.48]:49359) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UZGlP-0003wc-7n for 14332@debbugs.gnu.org; Mon, 06 May 2013 04:27:16 -0400 Received: by mail-pb0-f48.google.com with SMTP id ma3so1858363pbc.7 for <14332@debbugs.gnu.org>; Mon, 06 May 2013 01:26:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:references:face:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=aYIFT0AWzZKxW9TA5o7ajL4AFBP0t4c3HXlgiSduowc=; b=vC1eZMQo43Zziskk06+8NgVxKWNtW2wLl9+tMsjo9dxvX7+DzRhVrJMZymxVGmfCPe pkkfXvJ+YK8Sb+GF0wAmj0gcby7NK8TgyuFCcRWS1j63XeaV0Ax6VYwkJX/4H9UK43sC rcgfVhDFnpD0tgkrIHH89IezO5XTUAnMaUDC7GodVyEPD2P9tvHdAIiJ9HOxTU7O5RoX iUH5yXzA7LO9YhF/JaVYCh22gfLoMIBHR32aUfMcI586jEpYoebR6qixKtvXhf6Fr+O3 pzgJYS2xOZiWC8IlrOysUma2hFdvIB0I/WK+zB8C4Nn4PHXeu1gbXOBJBHDEsL7wddZi qYbg== X-Received: by 10.68.132.101 with SMTP id ot5mr1550079pbb.11.1367828778670; Mon, 06 May 2013 01:26:18 -0700 (PDT) Received: from Zeuss-MacBook.local (li511-224.members.linode.com. [66.175.216.224]) by mx.google.com with ESMTPSA id aj2sm23034788pbc.1.2013.05.06.01.26.16 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 06 May 2013 01:26:18 -0700 (PDT) From: Leo Liu To: Stefan Monnier Subject: Re: bug#14332: 24.3; Octave indentation bug References: Face: iVBORw0KGgoAAAANSUhEUgAAACkAAAApAQAAAACAGz1bAAABKElEQVQYlWNg3NIt5FDPUPt7 4+X79Qyucz5/ugik+L2PBgKpyphaIK921q23QDnG0NBQoMr/vaWl9f8ZLL78uPv5PwN7RETfzXoG jhmFz27XM0RXmpuY/WfY+fv0Mc56BvFybfXA/wwL5t/wF61n2PU59axXPcOVzbmSW/8zrNt1benC /ww70hqUU/4zKCtrT9jwn8FhwynbufUMendE2aLqGRpdX9al1zM8eh17lKeeQcTMrdD5P8P3j/YT Q/8zXHSb7p1Qz/C4OM2JuZ7hgtI7K6AjqsMnf8j4z8C6xG1tw3+GqpqvsVn/GTzmpD9j/8/wP/oZ S/l/Bka+QO/g/wy15ueeFQL9N1O8mPU/g+umV3t1gdT0/1bTgHLqYVeXAlWKpMWt+w8Az82C9nHf X0cAAAAASUVORK5CYII= Date: Mon, 06 May 2013 16:26:13 +0800 In-Reply-To: (Leo Liu's message of "Mon, 06 May 2013 11:29:42 +0800") 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: -2.6 (--) X-Debbugs-Envelope-To: 14332 Cc: 14332@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: -2.6 (--) On 2013-05-06 11:29 +0800, Leo Liu wrote: > What I would like is to have \ mean "." unless it is in double-quoted > strings where it should be "\\". This patch seems working. This is the first time I am using the syntax-table property. Stefan, do you see any problem with the patch? diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el index 2e848600..66fda302 100644 --- a/lisp/progmodes/octave.el +++ b/lisp/progmodes/octave.el @@ -134,6 +134,12 @@ (defvar octave-font-lock-keywords "Additional Octave expressions to highlight.") (defun octave-syntax-propertize-function (start end) + (funcall (syntax-propertize-rules + ("\\\\" (0 (when (eq (nth 3 (save-excursion + (syntax-ppss (match-beginning 0)))) + ?\") + (string-to-syntax "\\"))))) + start end) (goto-char start) (octave-syntax-propertize-sqs end) (funcall (syntax-propertize-rules @@ -242,7 +248,7 @@ (defvar octave-mode-syntax-table (modify-syntax-entry ?& "." table) (modify-syntax-entry ?| "." table) (modify-syntax-entry ?! "." table) - (modify-syntax-entry ?\\ "\\" table) + (modify-syntax-entry ?\\ "." table) (modify-syntax-entry ?\' "." table) ;; Was "w" for abbrevs, but now that it's not necessary any more, (modify-syntax-entry ?\` "." table) From debbugs-submit-bounces@debbugs.gnu.org Mon May 06 10:49:23 2013 Received: (at 14332) by debbugs.gnu.org; 6 May 2013 14:49:23 +0000 Received: from localhost ([127.0.0.1]:59954 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UZMjC-0000Mo-NE for submit@debbugs.gnu.org; Mon, 06 May 2013 10:49:23 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:28417) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UZMj9-0000MX-Jq for 14332@debbugs.gnu.org; Mon, 06 May 2013 10:49:19 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFMCqRF/2dsb2JhbABEvw4Xc4IfAQVWIxALDiYSFBgNJIgkwS2RCgOkeoFegxM X-IPAS-Result: Av4EABK/CFFMCqRF/2dsb2JhbABEvw4Xc4IfAQVWIxALDiYSFBgNJIgkwS2RCgOkeoFegxM X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="11281677" Received: from 76-10-164-69.dsl.teksavvy.com (HELO pastel.home) ([76.10.164.69]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 06 May 2013 10:48:16 -0400 Received: by pastel.home (Postfix, from userid 20848) id 0BDAF6BFD7; Mon, 6 May 2013 10:48:19 -0400 (EDT) From: Stefan Monnier To: Leo Liu Subject: Re: bug#14332: 24.3; Octave indentation bug Message-ID: References: Date: Mon, 06 May 2013 10:48:18 -0400 In-Reply-To: (Leo Liu's message of "Mon, 06 May 2013 16:26:13 +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: -1.9 (-) X-Debbugs-Envelope-To: 14332 Cc: 14332@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 (-) > + ("\\\\" (0 (when (eq (nth 3 (save-excursion > + (syntax-ppss (match-beginning 0)))) > + ?\") > + (string-to-syntax "\\"))))) The rule looks OK, but why not put it inside the subsequent `syntax-propertize-rules'? Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon May 06 11:58:34 2013 Received: (at 14332) by debbugs.gnu.org; 6 May 2013 15:58:34 +0000 Received: from localhost ([127.0.0.1]:60010 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UZNo7-0003sC-Sg for submit@debbugs.gnu.org; Mon, 06 May 2013 11:58:33 -0400 Received: from mail-pd0-f170.google.com ([209.85.192.170]:64970) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UZNo5-0003rx-HY for 14332@debbugs.gnu.org; Mon, 06 May 2013 11:58:30 -0400 Received: by mail-pd0-f170.google.com with SMTP id 10so2079068pdi.1 for <14332@debbugs.gnu.org>; Mon, 06 May 2013 08:57:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:in-reply-to:references:user-agent :face:date:message-id:mime-version:content-type; bh=ppwPSlcRudPdv3V6whaeRXQIVsKSzXDzEm7Uyfavi/0=; b=SX7kCs2Xnrjn7Byzl3NYWzh/RmQAu1jHV5yLGhYaDGSLqhsQdcSx54uaBpc9etoqOQ oPKsw2xqxW1RL1ZNopSd9Ootng9gl58P6tzlZdraaPqj0EnC1+4iQbP0XjVx8376Q26B j+kgGb6t4Hp9kRtrEHbCDkoGryaGNipn2IQ++7TItgaYbvoApiNGY2TkIa428cc1dY4l xyes9KOuB4oXnu9/RK8pMUTe4xLLCgqhp8mZsi6wWlwYcM8iSh0hre9GENgdRUpEfRjE mMsUfj5dBJDFfWmN7KvusZ5ezdiSdPnnucqWgvOmpuRoI+Ho1uDR9Fz1LIfwmAiK1yUo FvpQ== X-Received: by 10.66.233.97 with SMTP id tv1mr14415458pac.96.1367855851101; Mon, 06 May 2013 08:57:31 -0700 (PDT) Received: from Zeuss-MacBook.local (li511-224.members.linode.com. [66.175.216.224]) by mx.google.com with ESMTPSA id br2sm24348170pbc.46.2013.05.06.08.57.26 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 06 May 2013 08:57:30 -0700 (PDT) From: Leo Liu To: Stefan Monnier Subject: Re: bug#14332: 24.3; Octave indentation bug In-Reply-To: (Stefan Monnier's message of "Mon, 06 May 2013 10:48:18 -0400") References: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (OS X 10.8.3) Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAGFBMVEUzRVhbQj4eZqO6SjnT eWpxnMetm5b6/PmidmqrAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1F B9cBBwMLBfKABCMAAAFoSURBVCjPtZI9a8MwEIaFoc7aYDdelQMna0Em3tsSr0XUeE2Q6a22a+v+ fk8fSSBkbDUI6dHpfe9OEvRgiD+ApqKPJgJeB6iUUXWESjUe/ig38AJrhqqvaU2nTIXbNvOQ40fe qdry4kyGoVWsfCQalXpHnJGM01wjWdYbMlXNFdsZDO69m9aqNqxEJqTEgbM5OF7wlEfIoll1Ked4 LbM5X2EdILLokEdmI8z7g5cKED0cuTC930TYhy7ZDekkXVGw/L60TguJePPxcJF48lpsSUWEA/Ju jGFNgJOXc4Hz7TmAdBeu5Ve4AEjOi2/2jfd3cAJZ+IbNrvdjgBZY01b+HTuG3cLws6BJZqVOj/pp T0OqVwx3rFq+QmJwx3loK5JSLEhDIt62+mtC2C+SrAUxEbV6C6v2BRbd6pILBKFpepKZJHgGgrKF sptSUUoczpwg2pQ7ZH1tgs0ou/917mzz6Cs2//C978cv5l07L02orIEAAAAASUVORK5CYII= Date: Mon, 06 May 2013 23:57:20 +0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 14332 Cc: 14332@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-06 22:48 +0800, Stefan Monnier wrote: > The rule looks OK, but why not put it inside the subsequent > `syntax-propertize-rules'? Wouldn't this (octave-syntax-propertize-sqs end) before the syntax-propertize-rules form causes some \'s to be missed? Leo From debbugs-submit-bounces@debbugs.gnu.org Mon May 06 17:38:41 2013 Received: (at 14332) by debbugs.gnu.org; 6 May 2013 21:38:41 +0000 Received: from localhost ([127.0.0.1]:60267 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UZT7J-0003RE-7c for submit@debbugs.gnu.org; Mon, 06 May 2013 17:38:41 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:23909) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UZT7H-0003Qy-TO for 14332@debbugs.gnu.org; Mon, 06 May 2013 17:38:40 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: At0KABK/CFG4rwb8/2dsb2JhbABEvg0EAnsXc4IeAQEEAVYjEAsOJhIUGA0kiB4GwS2RCgOkeoFegxM X-IPAS-Result: At0KABK/CFG4rwb8/2dsb2JhbABEvg0EAnsXc4IeAQEEAVYjEAsOJhIUGA0kiB4GwS2RCgOkeoFegxM X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="11408324" Received: from 184-175-6-252.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([184.175.6.252]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 06 May 2013 17:37:35 -0400 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id B51C6AE168; Mon, 6 May 2013 17:37:39 -0400 (EDT) From: Stefan Monnier To: Leo Liu Subject: Re: bug#14332: 24.3; Octave indentation bug Message-ID: References: Date: Mon, 06 May 2013 17:37:39 -0400 In-Reply-To: (Leo Liu's message of "Mon, 06 May 2013 23:57:20 +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: -1.9 (-) X-Debbugs-Envelope-To: 14332 Cc: 14332@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 (-) >> The rule looks OK, but why not put it inside the subsequent >> `syntax-propertize-rules'? > Wouldn't this (octave-syntax-propertize-sqs end) before the > syntax-propertize-rules form causes some \'s to be missed? No, octave-syntax-propertize-sqs just skips over the contents of single-quoted strings and from what you say you only want to handle backslash in double-quoted strings. Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon May 06 19:59:18 2013 Received: (at 14332-done) by debbugs.gnu.org; 6 May 2013 23:59:18 +0000 Received: from localhost ([127.0.0.1]:60334 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UZVJN-0001vC-Ak for submit@debbugs.gnu.org; Mon, 06 May 2013 19:59:18 -0400 Received: from mail-da0-f53.google.com ([209.85.210.53]:39646) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UZVJK-0001uu-Ln for 14332-done@debbugs.gnu.org; Mon, 06 May 2013 19:59:15 -0400 Received: by mail-da0-f53.google.com with SMTP id o9so2049853dan.40 for <14332-done@debbugs.gnu.org>; Mon, 06 May 2013 16:58:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:references:face:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=7cPIaUDD1tnvtQFZJbCJXtxUOMWxu0KUiq5q2dJoAg8=; b=YSF+TKM3XYuhQhpPx/TVWsvR/KKE1VrxyZMVivMqNohlZP1stH674/nxdzOMdG7yx6 8+ln+DFZH7Ghwo2ExIcLp5PcbUOxyIllcFnWf8I3J0yXCNdmKvstLA+7PxtL78qkzeS8 kuxnTxBM/6sN0RmK7F9Q3tPveIj4esnTP2TLtsWwNstyM5GhJgXH896DTfiHZJM0+09v ad0ggPyn0OWSRNB2katt4oGwOrNxRWtEI+jeDXiyeHpeYN6oPa74kvSWSqZy7icbI2q6 cxVD4Z4yasIPAxRDAEJkCDEGUWc1kbV5B0qXPOpYzP9w2YxgHAxyfsBBUY6HK1k80vTM fxpw== X-Received: by 10.66.27.68 with SMTP id r4mr119028pag.151.1367884694420; Mon, 06 May 2013 16:58:14 -0700 (PDT) Received: from Zeuss-MacBook.local (li511-224.members.linode.com. [66.175.216.224]) by mx.google.com with ESMTPSA id ze11sm27637311pab.22.2013.05.06.16.58.12 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 06 May 2013 16:58:13 -0700 (PDT) From: Leo Liu To: Stefan Monnier Subject: Re: bug#14332: 24.3; Octave indentation bug References: Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAGFBMVEUzRVhbQj4eZqO6SjnT eWpxnMetm5b6/PmidmqrAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1F B9cBBwMLBfKABCMAAAFoSURBVCjPtZI9a8MwEIaFoc7aYDdelQMna0Em3tsSr0XUeE2Q6a22a+v+ fk8fSSBkbDUI6dHpfe9OEvRgiD+ApqKPJgJeB6iUUXWESjUe/ig38AJrhqqvaU2nTIXbNvOQ40fe qdry4kyGoVWsfCQalXpHnJGM01wjWdYbMlXNFdsZDO69m9aqNqxEJqTEgbM5OF7wlEfIoll1Ked4 LbM5X2EdILLokEdmI8z7g5cKED0cuTC930TYhy7ZDekkXVGw/L60TguJePPxcJF48lpsSUWEA/Ju jGFNgJOXc4Hz7TmAdBeu5Ve4AEjOi2/2jfd3cAJZ+IbNrvdjgBZY01b+HTuG3cLws6BJZqVOj/pp T0OqVwx3rFq+QmJwx3loK5JSLEhDIt62+mtC2C+SrAUxEbV6C6v2BRbd6pILBKFpepKZJHgGgrKF sptSUUoczpwg2pQ7ZH1tgs0ou/917mzz6Cs2//C978cv5l07L02orIEAAAAASUVORK5CYII= Date: Tue, 07 May 2013 07:58:10 +0800 In-Reply-To: (Stefan Monnier's message of "Mon, 06 May 2013 17:37:39 -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: -2.6 (--) X-Debbugs-Envelope-To: 14332-done Cc: 14332-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: -2.6 (--) Fixed in trunk. On 2013-05-07 05:37 +0800, Stefan Monnier wrote: > No, octave-syntax-propertize-sqs just skips over the contents of > single-quoted strings and from what you say you only want to handle > backslash in double-quoted strings. Thank you, Stefan, for the help. Much appreciated. Leo From unknown Mon Jun 16 23:46:59 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 04 Jun 2013 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator