unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry <dgutov@yandex.ru>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Justine Tunney <jart@google.com>, 17978@debbugs.gnu.org
Subject: bug#17978: 24.3; forward-paragraph broken with javadocs
Date: Fri, 11 Jul 2014 09:54:45 +0300	[thread overview]
Message-ID: <864myoe66i.fsf@yandex.ru> (raw)
In-Reply-To: <jwvbnsxq5hn.fsf-monnier+emacsbugs@gnu.org> (Stefan Monnier's message of "Wed, 09 Jul 2014 23:06:57 -0400")

Stefan Monnier <monnier@iro.umontreal.ca> 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	other threads:[~2014-07-11  6:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-09 17:53 bug#17978: 24.3; forward-paragraph broken with javadocs Justine Tunney
2014-07-09 19:26 ` Stefan Monnier
2014-07-09 21:11   ` Justine Tunney
2014-07-09 22:28     ` Stefan Monnier
2014-07-09 23:40       ` Justine Tunney
2014-07-10  3:06         ` Stefan Monnier
2014-07-11  6:54           ` Dmitry [this message]
2014-07-11  7:46             ` Dmitry
2014-07-11 13:51               ` Stefan Monnier
2014-07-13  0:48                 ` Dmitry Gutov
2014-07-13 13:23                   ` Alan Mackenzie
2022-02-10  8:23                     ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=864myoe66i.fsf@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=17978@debbugs.gnu.org \
    --cc=jart@google.com \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).