From: Dmitry Gutov <dmitry@gutov.dev>
To: Jens Schmidt <jschmidt4gnu@vodafonemail.de>, 67462@debbugs.gnu.org
Subject: bug#67462: 30.0.50; prog-fill-reindent-defun does not respect buffer-local fill-paragraph-function
Date: Sun, 26 Nov 2023 23:23:04 +0200 [thread overview]
Message-ID: <f01c770d-67b4-c811-e039-6b6ebf66f60e@gutov.dev> (raw)
In-Reply-To: <87zfz09q9d.fsf@sappc2.fritz.box>
On 26/11/2023 23:08, Jens Schmidt via Bug reports for GNU Emacs, the
Swiss army knife of text editors wrote:
> diff --git a/lisp/progmodes/prog-mode.el b/lisp/progmodes/prog-mode.el
> index 37c54a90f42..1bb2b678d94 100644
> --- a/lisp/progmodes/prog-mode.el
> +++ b/lisp/progmodes/prog-mode.el
> @@ -163,7 +163,8 @@ prog-fill-reindent-defun
> (treesit-parser-list)
> (treesit-node-match-p
> (treesit-node-at (point)) 'text t))))
> - (if (or treesit-text-node
> + (if (or (local-variable-p 'fill-paragraph-function)
> + treesit-text-node
> (nth 8 (syntax-ppss))
> (re-search-forward "\\s-*\\s<" (line-end-position) t))
> (fill-paragraph argument (region-active-p))
I'm not sure this is going to work well because c-mode (for example)
also has a buffer-local value of fill-paragraph-function.
makefile-mode does look special in this regard. Perhaps it's one of
those modes that don't really use indentation in the same way as an
average "prog mode" does.
Maybe makefile-mode-map should simply rebind "M-q" back to 'fill-paragraph'.
next prev parent reply other threads:[~2023-11-26 21:23 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-26 21:08 bug#67462: 30.0.50; prog-fill-reindent-defun does not respect buffer-local fill-paragraph-function Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-26 21:23 ` Dmitry Gutov [this message]
2023-11-26 22:52 ` Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-27 12:16 ` Eli Zaretskii
2023-11-27 20:08 ` Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-27 20:40 ` Dmitry Gutov
2023-11-28 21:28 ` Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-27 20:55 ` Eli Zaretskii
2023-11-28 21:10 ` Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-28 21:41 ` Dmitry Gutov
2023-11-29 12:38 ` Eli Zaretskii
2023-11-29 21:28 ` Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-30 6:39 ` Eli Zaretskii
2023-11-30 20:40 ` Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-30 23:56 ` Dmitry Gutov
2023-11-27 17:02 ` Juri Linkov
2023-11-27 19:46 ` Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-27 20:46 ` Dmitry Gutov
2023-11-27 12:05 ` Eli Zaretskii
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=f01c770d-67b4-c811-e039-6b6ebf66f60e@gutov.dev \
--to=dmitry@gutov.dev \
--cc=67462@debbugs.gnu.org \
--cc=jschmidt4gnu@vodafonemail.de \
/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).