bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#14332: 24.3; Octave indentation bug


From: Stefan Monnier
Subject: bug#14332: 24.3; Octave indentation bug
Date: Sun, 05 May 2013 21:04:14 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

>> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]