Unbalanced parentheses crash Xemacs+ESS

Mayeul KAUFFMANN mayeul.kauffmann at tiscali.fr
Fri Aug 20 21:27:23 CEST 2004


> "Richard M. Heiberger"
>wrote:
> I have always considered this to be a problem with S-Plus and R, not
with ESS.
> ESS and Emacs do syntax highlighting based on what they see.  They are
not able
> to impute what the user intended the code to look like.

Well, this makes me think that in fact, ESS could guess what to do.

In the inferior ESS buffer, new lines starting with '>' are recognized as
command lines. ESS even prints '>' in red.
Normally, it shouls not try to balance parentheses accross new lines.
However, currently,
typing '((]'  then 'Enter' then ')'      [Note: I type '((]' because I
need to create an error message so that I could creat unbalanced
parentheses without getting the '+' prompt]

gives logically

> ((]
Error: syntax error
> )

But putting the cursor after the last parenthesis will highlight the first
parenthesis !

If there is a way to tell ESS not to try and highlight parentheses beyond
'>' signs (at start of new lines), the problem will be solved.
This would still allow highlighting in very long functions, since no line
would presumably start with '>' within a function.

(I'm definitely NOT an ESS programmer, so I do not know how to do it, but
the logic seems OK, I hope)


Regards,

Mayeul KAUFFMANN
Univ. Pierre Mendes France
Grenoble - France




More information about the ESS-help mailing list