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: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Leo Liu <sdl.web <at> gmail.com>
Cc: 14332 <at> debbugs.gnu.org
Subject: bug#14332: 24.3; Octave indentation bug
Date: Sun, 05 May 2013 21:04:14 -0400
>> 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 ≡ inv(A) # one over matrix A, with some optimisation

> if A is a scalar, A \ 1 = 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




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.