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

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

bug#16526: 24.3.50; scroll-conservatively & c-mode regression


From: martin rudalics
Subject: bug#16526: 24.3.50; scroll-conservatively & c-mode regression
Date: Mon, 27 Jan 2014 18:25:41 +0100

> In general, that is true, but back_comment tries to be more clever, e.g,
> when it scans backward over code like
>
>    /* toto */
>    blabla
>    /* titi */
>
> it should not need to scan further than the end of line 1, since the
> "*/" there will tell it that the "/*" on line 3 can't be within
> another comment and is hence the one-true comment starter that matches
> the "*/" on line 3.

I recall now.  I tend to forget that C comments cannot be nested.

> Another option is to put a syntax-table property on those rare
> open-paren-in-column-0-inside-comment-or-string, so that
> open-paren-in-column-0-is-defun-start still works properly.

Wouldn't we then have to parse the entire buffer for strings and
comments in order to detect these parens?  More or less this would
duplicate the effort of `syntax-ppss'.

martin





reply via email to

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