[Top][All Lists]

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

bug#703: Octave comments in emacs

From: Kurt Hornik
Subject: bug#703: Octave comments in emacs
Date: Wed, 20 Aug 2008 18:55:50 +0200

>>>>> Chong Yidong writes:

> Hi Kurt,
> Could you take a look at this bug report?

> http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=697
> http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=703

> Thanks.


I am not quite sure I understand what the issue is.

Octave mode has never provided syntax support for single quoted strings
because there is no way (short of actually parsing the code) of telling
these apart from single quotes used for transposition.

The comment style provided by Octave mode is the same as for Lisp mode,
so a single comment char is aligned at the comment column.


> 2008/8/11 Rosen Diankov <address@hidden>:

>> The % also messes up formatting when seen in strings, ie
>> 'my value: %d'
>> For some reason, the octave syntax does not recognize that single
>> quotes are strings (it might be because the transpose character is
>> also ' and it is hard to differentiate between a string and the
>> transposing).
>> In any case, writing the above example will treat the % as a comment.
>> The indenting engine will skip the closing parenthesis )... resulting
>> in all the rest of the indents looking like garbage.
> ....
>> In calculate-octave-indent, just delete the entire expression
>> ((looking-at "\\s<\\S<")
>> (setq icol (list comment-column icol)))
>> that forces comments to comment-column (which is 32). Was there a
>> reason for this?

reply via email to

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