unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#14332: 24.3; Octave indentation bug
@ 2013-05-02  4:04 Leo Liu
  2013-05-05  5:29 ` Stefan Monnier
  0 siblings, 1 reply; 12+ messages in thread
From: Leo Liu @ 2013-05-02  4:04 UTC (permalink / raw)
  To: 14332

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)





^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-05-06 23:58 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-02  4:04 bug#14332: 24.3; Octave indentation bug Leo Liu
2013-05-05  5:29 ` Stefan Monnier
2013-05-05  5:35   ` Leo Liu
2013-05-05  7:17     ` Stefan Monnier
2013-05-05  7:28       ` Leo Liu
2013-05-06  1:04         ` Stefan Monnier
2013-05-06  3:29           ` Leo Liu
2013-05-06  8:26             ` Leo Liu
2013-05-06 14:48               ` Stefan Monnier
2013-05-06 15:57                 ` Leo Liu
2013-05-06 21:37                   ` Stefan Monnier
2013-05-06 23:58                     ` Leo Liu

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).