--- Begin Message ---
Subject: |
24.3.50; do-auto-fill "continues" comment from inside a string |
Date: |
Tue, 03 Sep 2013 04:26:26 +0300 |
In certain conditions, if I press SPC, and a string on the current line
contains text matching `comment-start-skip', the filling is performed,
and the newly created line starts with a comment.
Examples (point is at |, fill-column is 70):
ruby-mode:
aa = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa#{}a" a|
press SPC =>
aa = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa#{}a"
#a
js-mode:
aa = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa//a" aa|
press SPC =>
aa = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa//a"
//aa
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#15251: 24.3.50; do-auto-fill "continues" comment from inside a string |
Date: |
Tue, 01 Oct 2013 04:18:25 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 |
Version: 24.4
On 30.09.2013 21:27, Stefan Monnier wrote:
Stefan, can we consider `syntax-ppss' fast enough at this point?
If comment-use-syntax is t, yes.
Done, in 114486.
I kept the rest of `comment-beginning' definition, in case
non-syntax-table-using comments can still be font-locked in some modes.
Also, `comment-use-global-state' looks like a better var to base the
choice on, semantically, but it's not auto-detected, and it's only used
in `comment-search-forward'.
--- End Message ---