GNU bug report logs -
#67462
30.0.50; prog-fill-reindent-defun does not respect buffer-local fill-paragraph-function
Previous Next
Full log
Message #8 received at 67462 <at> debbugs.gnu.org (full text, mbox):
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'.
This bug report was last modified 1 year and 199 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.