unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Andrew Hyatt <ahyatt@gmail.com>
To: Lennart Borgman <lennart.borgman@gmail.com>
Cc: Alan Mackenzie <acm@muc.de>, 3972@debbugs.gnu.org
Subject: bug#3972: 23.1.50; c-mode sets M-q to c-fill-paragraph
Date: Thu, 11 Feb 2016 23:17:13 -0500	[thread overview]
Message-ID: <m2r3gizho6.fsf@gmail.com> (raw)
In-Reply-To: <e01d8a50907301752r7b9cd343xa00d8244f6feace8@mail.gmail.com> (Lennart Borgman's message of "Fri, 31 Jul 2009 02:52:02 +0200")

Lennart Borgman <lennart.borgman@gmail.com> writes:

> On Thu, Jul 30, 2009 at 4:44 PM, Lennart
> Borgman<lennart.borgman@gmail.com> wrote:
>> On Thu, Jul 30, 2009 at 3:40 PM, Lennart
>> Borgman<lennart.borgman@gmail.com> wrote:
>>
>>> The problem I am actually fighting is a bit different I believe.
>>> c-fill-paragraph is a bit complicated so I am not sure. What I see
>>> when I am testing is that c-fill-paragraph works in some MuMaMo chunks
>>> (ie a chunk of the buffer with one major mode, other than in the
>>> chunks before and after it) and not others, though in both cases the
>>> major mode is php-mode. My guess so far is that it is because of a
>>> (widen) somewhere inside c-fill-paragraph that makes a call to
>>> something, perhaps to syntax-ppss or similar, come back with bad
>>> information (since it is influenced by contents in other chunks).
>>>
>>> What do you think about this guess?
>>
>> I tried to flet widen to ignore. That worked, but when trying to byte
>> compile I got:
>>
>>  mumamo.el:6734:57:Error: Byte-compiling a redefinition of `widen'
>> will not work - use `labels' instead
>>
>> But `labels' does a lexical binding, not a dynamic binding so that
>> obviously will not work. So now I don't know what to do...
>> defadvice...?
>
>
> I decided to use defadvice on `widen' (+ enable/disable) for the
> moment. It seems to work fine.
>
> However that c-fill-paragraph is bound to M-q is still a problem, I
> had to rebind that.
>
> I noticed some other problems:
>
> - The doc string for fill-paragraph-function does not say anything
> about the functions arguments.
> - The arguments to c-fill-paragraph is not the expected ones though it
> is used as fill-paragraph-function. (But it works - and I don't
> understand why at the moment...)
>
> Also the double role of c-fill-paragraph is perhaps a difficult design
> (it is used both for M-x and fill-paragraph-function).

This bug feels like a wishlist to me. I don't see a user-visible issue,
just (valid-seeming) design issues. The documentation does seem like a
potential bug, but I'd assume that any function defined in
fill-paragraph-function won't be called with any arguments, since they
aren't mentioned (and I'm not sure which arguments would make sense
anyway).

I'm going to mark this as wishlist, but feel free to disagree.





  parent reply	other threads:[~2016-02-12  4:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-30  5:47 bug#3972: 23.1.50; c-mode sets M-q to c-fill-paragraph Lennart Borgman
2009-07-30 10:47 ` Alan Mackenzie
2009-07-30 13:40   ` Lennart Borgman
2009-07-30 14:44     ` Lennart Borgman
     [not found]       ` <e01d8a50907301752r7b9cd343xa00d8244f6feace8@mail.gmail.com>
2016-02-12  4:17         ` Andrew Hyatt [this message]
2009-07-30 21:12   ` Stefan Monnier

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=m2r3gizho6.fsf@gmail.com \
    --to=ahyatt@gmail.com \
    --cc=3972@debbugs.gnu.org \
    --cc=acm@muc.de \
    --cc=lennart.borgman@gmail.com \
    /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).