GNU bug report logs - #14332
24.3; Octave indentation bug

Previous Next

Package: emacs;

Reported by: Leo Liu <sdl.web <at> gmail.com>

Date: Thu, 2 May 2013 04:06:02 UTC

Severity: normal

Found in version 24.3

Done: Leo Liu <sdl.web <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Leo Liu <sdl.web <at> gmail.com>
Subject: bug#14332: closed (Re: bug#14332: 24.3; Octave indentation bug)
Date: Tue, 07 May 2013 00:00:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#14332: 24.3; Octave indentation bug

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 14332 <at> debbugs.gnu.org.

-- 
14332: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14332
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Leo Liu <sdl.web <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 14332-done <at> debbugs.gnu.org
Subject: Re: bug#14332: 24.3; Octave indentation bug
Date: Tue, 07 May 2013 07:58:10 +0800
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

[Message part 3 (message/rfc822, inline)]
From: Leo Liu <sdl.web <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3; Octave indentation bug
Date: Thu, 02 May 2013 12:04:44 +0800
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)



This bug report was last modified 12 years and 14 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.