[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#15251: 24.3.50; do-auto-fill "continues" comment from inside a strin
bug#15251: 24.3.50; do-auto-fill "continues" comment from inside a string
Wed, 02 Oct 2013 03:50:34 +0300
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0
On 02.10.2013 03:32, Stefan Monnier wrote:
- Change code that uses comment-use-global-state to use (and
comment-use-syntax comment-use-global-state) instead.
This is already the case: `comment-search-forward' consults the value of
`comment-use-global-state' only when `comment-use-syntax' is truthy.
- Maybe make comment-use-global-state obsolete.
Context: the problem with syntax-ppss is not so much performance as
correctness, because syntax-ppss can get confused if you use several
syntax-tables in the same buffer (e.g. via font-lock-syntax-table), or
if you use narrowing.
Yes, that seems hard to test for.
And if `syntax-ppss' can be borked in some modes, using its value in
`comment-beginning' like I did in the respective patch, also seems unsafe.