[Top][All Lists]

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

Re: comment-filling fixes

From: Stefan Monnier
Subject: Re: comment-filling fixes
Date: 18 Mar 2004 12:32:10 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

>> The difference with yours is that it only uses syntax-ppss if the major
>> mode sets a specific variable.  The reason for it is that in major modes
>> like tex-mode or perl-mode where the syntax-tables are not quite up to the
>> task, using syntax-ppss means that if the syntax functions get confused the
>> comment-related operations suddenly don't work at all any more.

> That seems backwards to me.  Why penalize most modes?

Actually, another reason is the difference in failure mode:
when the non-syntax-ppss code fails, it's generally "easy" for the user to
see why because it only depends on the current line, and for that same
reason it will only impact her on the few lines that suffer from the
same problem.  OTOH, if you use syntax-ppss, when it works it's great, but
when it doesn't the reason for it might be very much non-obvious and it
might impact the user on all subsequent lines.


reply via email to

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