GNU bug report logs - #17978
24.3; forward-paragraph broken with javadocs

Previous Next

Package: emacs;

Reported by: Justine Tunney <jart <at> google.com>

Date: Wed, 9 Jul 2014 18:14:02 UTC

Severity: wishlist

Tags: wontfix

Found in version 24.3

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 17978 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Justine Tunney <jart <at> google.com>
Cc: 17978 <at> debbugs.gnu.org
Subject: Re: bug#17978: 24.3; forward-paragraph broken with javadocs
Date: Wed, 09 Jul 2014 23:06:57 -0400
> 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.

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.

See lisp/vc/add-log.el for an example.


        Stefan




This bug report was last modified 3 years and 98 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.