emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] let octave-mode understand single-quoted strings


From: Stefan Monnier
Subject: Re: [PATCH] let octave-mode understand single-quoted strings
Date: Wed, 01 Sep 2010 08:46:58 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

>> I'm not familiar with Octave, so your code might be more correct in
>> some cases, OTOH my code handles multi-line strings. Do you think we
>> should try and get the best of both worlds, or should we replace my
>> code with yours, or should we just stick with my code?

> Daniel's code is correct in several cases I tried, so I would
> recommend it.  I don't know what you may have done with multiline
> strings, but they seem to work just as well.

IIUC Daniel's code, his multiline strings will only work if font-lock
happens to fontify the whole string at a time.  If it only needs to
update a single line (e.g. when you edit the first or last line of
a multiline single-quoted string), it will forget that it's a string (I
think it may even lead to nasty misfontifications where the rest of the
text gets fontified as a string).

> Of course it would be nice if both features worked.

That's definitely doable.  Tho if multiline strings are very rare and
are discouraged/deprecated, it might not be worth the trouble.

> Octave mode still requires a lot of work in other directions. Octave
> syntax has been enriched somewhat since the mode was first written.
> With time I may be able to provide these necessary patches myself.

Please check the new code in Emacs's trunk (uses the new SMIE package to
do the navigation and indentation) and report any missing feature (with
patch if you can: hopefully the new code makes it easier).


        Stefan



reply via email to

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