[Top][All Lists]

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

bug#17978: 24.3; forward-paragraph broken with javadocs

From: Dmitry
Subject: bug#17978: 24.3; forward-paragraph broken with javadocs
Date: Fri, 11 Jul 2014 09:54:45 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.92 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> C-{ and C-} should cycle between blank lines. But the reason why this
>> doesn't happen in java-mode, is because Java redefines the definition of a
>> paragraph. It sets the paragraph-start variable (among other variables) so
>> that when I M-q to fill-paragraph, it'll work correctly *within* the
>> Javadoc, rather than reflowing my code into a jumbled mess.

Hi Stefan,

> Ah, I see, yes, that makes sense.  The fix is to not change
> paragraph-start (and friends) in the major-mode hook but instead to
> define override the fill-forward-paragraph-function with a function
> which let-binds those vars and then calls forward-paragraph.

Thanks for the vertict, I'll fix that in js2-mode, 

This doesn't look straightforward to do, though: the final
`paragraph-start' is obtained by calling `c-setup-paragraph-variables',
so to get the value computed both ways, guess we'll have to call it at
least twice.

reply via email to

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