GNU logs - #67462, boring messages


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#67462: 30.0.50; prog-fill-reindent-defun does not respect buffer-local fill-paragraph-function
Resent-From: Jens Schmidt <jschmidt4gnu@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 26 Nov 2023 21:10:02 +0000
Resent-Message-ID: <handler.67462.B.170103294412821 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 67462
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 67462 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.170103294412821
          (code B ref -1); Sun, 26 Nov 2023 21:10:02 +0000
Received: (at submit) by debbugs.gnu.org; 26 Nov 2023 21:09:04 +0000
Received: from localhost ([127.0.0.1]:42776 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1r7MNA-0003KP-Sf
	for submit <at> debbugs.gnu.org; Sun, 26 Nov 2023 16:09:03 -0500
Received: from lists.gnu.org ([2001:470:142::17]:39464)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jschmidt4gnu@HIDDEN>) id 1r7MN6-0003K9-Uy
 for submit <at> debbugs.gnu.org; Sun, 26 Nov 2023 16:08:59 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <jschmidt4gnu@HIDDEN>)
 id 1r7MMu-0004mn-Vp
 for bug-gnu-emacs@HIDDEN; Sun, 26 Nov 2023 16:08:45 -0500
Received: from mr3.vodafonemail.de ([145.253.228.163])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <jschmidt4gnu@HIDDEN>)
 id 1r7MMr-0003KR-LA
 for bug-gnu-emacs@HIDDEN; Sun, 26 Nov 2023 16:08:44 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de;
 s=vfde-mb-mr2-23sep; t=1701032918;
 bh=+a/SP3cq1H0GHZ8AoFlxUyqXjKP1tZhE0mKbHZ2+AZU=;
 h=From:To:Subject:Date:Message-ID:Content-Type:From;
 b=P2FxMNiQVYFkMXa1Yr8XX/s+JlF27UqRN9iWmk0zG0RK1lFsB7NHFcj3SV+ZIiQyP
 phCO2QMezU2C9bfsPS23egX2sjl97ty7uc1HBM2A6MnB0cCfQbICzrtCirEko9Co0B
 A9eABIaxUjQbsjbVUb1MjCkpV8taYKnuvrbKe9C4=
Received: from smtp.vodafone.de (unknown [10.0.0.2])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by mr3.vodafonemail.de (Postfix) with ESMTPS id 4SdhCV3fkxz1yls
 for <bug-gnu-emacs@HIDDEN>; Sun, 26 Nov 2023 21:08:38 +0000 (UTC)
Received: from sappc2 (port-83-236-7-18.dynamic.as20676.net [83.236.7.18])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits)
 server-digest SHA256) (No client certificate requested)
 by smtp.vodafone.de (Postfix) with ESMTPSA id 4SdhCP6pkBz9s62
 for <bug-gnu-emacs@HIDDEN>; Sun, 26 Nov 2023 21:08:30 +0000 (UTC)
From: Jens Schmidt <jschmidt4gnu@HIDDEN>
Date: Sun, 26 Nov 2023 22:08:30 +0100
Message-ID: <87zfz09q9d.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-purgate-type: clean
X-purgate: clean
X-purgate-size: 19675
X-purgate-ID: 155817::1701032914-DCFF67FF-AEB114A3/0/0
Received-SPF: pass client-ip=145.253.228.163;
 envelope-from=jschmidt4gnu@HIDDEN; helo=mr3.vodafonemail.de
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain


There seems to be a regression introduced with function
`prog-fill-reindent-defun' from commit b889eced4449.  To see the
difference in behavior, start

  emacs -Q test.mk

with attached test.mk and try filling (with M-q) the paragraphs starting
with "FOO = ..." and "foo: ..." both in Emacs 29 and in Emacs 30.  With
Emacs 29, I get as result:

------------------------- test.mk -------------------------
FOO = barbarbarbar barbarbarbar barbarbarbar barbarbarbar;	\
	barbarbarbar barbarbarbar barbarbarbar barbarbarbar	\
	barbarbarbar; foobarbaz

foo: ; barbarbarbar barbarbarbar barbarbarbar barbarbarbar;	\
	barbarbarbar barbarbarbar barbarbarbar barbarbarbar	\
	barbarbarbar; foobarbaz
------------------------- test.mk -------------------------

In Emacs 30, M-q does not have any effect on the paragraphs.

My analysis:

- In Emacs 29, M-q is bound to `fill-paragraph' in makefile-mode buffers
  through global bindings.  That function respects the makefile-mode
  specific setting of `fill-paragraph-function':

    ;; Filling.
    (setq-local fill-paragraph-function 'makefile-fill-paragraph)

- In Emacs 30, M-q is bound to `prog-fill-reindent-defun' in
  makefile-mode buffers through `prog-mode-map'.  That function does not
  care about any buffer-local values of `fill-paragraph-function'
  outside of comments and strings.

Personally, I find the filling done by `makefile-fill-paragraph'
questionable, and I really don't use it.  But others probably care more,
in particular for modes having implementations of
`fill-paragraph-function' that actually do something useful on code ...

A possible fix might look like this:

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 can provide a patch along those lines, but a "wontfix" is also fine
with me.


--=-=-=
Content-Type: application/octet-stream
Content-Disposition: attachment; filename=test.mk
Content-Transfer-Encoding: base64

Rk9PID0JYmFyYmFyYmFyYmFyIGJhcmJhcmJhcmJhciBiYXJiYXJiYXJiYXIgYmFyYmFyYmFyYmFy
OyBcCgliYXJiYXJiYXJiYXIgYmFyYmFyYmFyYmFyIGJhcmJhcmJhcmJhciBiYXJiYXJiYXJiYXIg
YmFyYmFyYmFyYmFyOyBcCglmb29iYXJiYXoKCmZvbzogOwliYXJiYXJiYXJiYXIgYmFyYmFyYmFy
YmFyIGJhcmJhcmJhcmJhciBiYXJiYXJiYXJiYXI7IFwKCWJhcmJhcmJhcmJhciBiYXJiYXJiYXJi
YXIgYmFyYmFyYmFyYmFyIGJhcmJhcmJhcmJhciBiYXJiYXJiYXJiYXI7IFwKCWZvb2JhcmJhego=
--=-=-=
Content-Type: text/plain




In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.24, cairo version 1.16.0) of 2023-11-26 built on sappc2
Repository revision: ea4c5fcd77257d7a7c050714b809b1507d93a6ef
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Debian GNU/Linux 11 (bullseye)

Configured using:
 'configure -C --with-native-compilation --with-mailutils'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES
NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF
TOOLKIT_SCROLL_BARS X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB

Important settings:
  value of $LC_COLLATE: POSIX
  value of $LC_TIME: POSIX
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  display-time-mode: t
  delete-selection-mode: t
  show-paren-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  minibuffer-regexp-mode: t
  line-number-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/home/jschmidt/.emacs.d/elpa/transient-20231123.2131/transient hides /home/jschmidt/work/emacs-master/lisp/transient
/home/jschmidt/work/org-mode/lisp/org-attach hides /home/jschmidt/work/emacs-master/lisp/org/org-attach
/home/jschmidt/work/org-mode/lisp/ob-scheme hides /home/jschmidt/work/emacs-master/lisp/org/ob-scheme
/home/jschmidt/work/org-mode/lisp/ob-processing hides /home/jschmidt/work/emacs-master/lisp/org/ob-processing
/home/jschmidt/work/org-mode/lisp/ob-gnuplot hides /home/jschmidt/work/emacs-master/lisp/org/ob-gnuplot
/home/jschmidt/work/org-mode/lisp/org-element hides /home/jschmidt/work/emacs-master/lisp/org/org-element
/home/jschmidt/work/org-mode/lisp/ob-org hides /home/jschmidt/work/emacs-master/lisp/org/ob-org
/home/jschmidt/work/org-mode/lisp/ob-sql hides /home/jschmidt/work/emacs-master/lisp/org/ob-sql
/home/jschmidt/work/org-mode/lisp/oc-bibtex hides /home/jschmidt/work/emacs-master/lisp/org/oc-bibtex
/home/jschmidt/work/org-mode/lisp/ox-koma-letter hides /home/jschmidt/work/emacs-master/lisp/org/ox-koma-letter
/home/jschmidt/work/org-mode/lisp/ox-icalendar hides /home/jschmidt/work/emacs-master/lisp/org/ox-icalendar
/home/jschmidt/work/org-mode/lisp/ol-gnus hides /home/jschmidt/work/emacs-master/lisp/org/ol-gnus
/home/jschmidt/work/org-mode/lisp/ob-sqlite hides /home/jschmidt/work/emacs-master/lisp/org/ob-sqlite
/home/jschmidt/work/org-mode/lisp/ob-clojure hides /home/jschmidt/work/emacs-master/lisp/org/ob-clojure
/home/jschmidt/work/org-mode/lisp/org-indent hides /home/jschmidt/work/emacs-master/lisp/org/org-indent
/home/jschmidt/work/org-mode/lisp/org-persist hides /home/jschmidt/work/emacs-master/lisp/org/org-persist
/home/jschmidt/work/org-mode/lisp/ol-eww hides /home/jschmidt/work/emacs-master/lisp/org/ol-eww
/home/jschmidt/work/org-mode/lisp/ol-info hides /home/jschmidt/work/emacs-master/lisp/org/ol-info
/home/jschmidt/work/org-mode/lisp/ol-rmail hides /home/jschmidt/work/emacs-master/lisp/org/ol-rmail
/home/jschmidt/work/org-mode/lisp/oc-basic hides /home/jschmidt/work/emacs-master/lisp/org/oc-basic
/home/jschmidt/work/org-mode/lisp/ob-forth hides /home/jschmidt/work/emacs-master/lisp/org/ob-forth
/home/jschmidt/work/org-mode/lisp/org-timer hides /home/jschmidt/work/emacs-master/lisp/org/org-timer
/home/jschmidt/work/org-mode/lisp/ob-makefile hides /home/jschmidt/work/emacs-master/lisp/org/ob-makefile
/home/jschmidt/work/org-mode/lisp/ob-fortran hides /home/jschmidt/work/emacs-master/lisp/org/ob-fortran
/home/jschmidt/work/org-mode/lisp/ox-html hides /home/jschmidt/work/emacs-master/lisp/org/ox-html
/home/jschmidt/work/org-mode/lisp/ob-lob hides /home/jschmidt/work/emacs-master/lisp/org/ob-lob
/home/jschmidt/work/org-mode/lisp/org-plot hides /home/jschmidt/work/emacs-master/lisp/org/org-plot
/home/jschmidt/work/org-mode/lisp/ob-js hides /home/jschmidt/work/emacs-master/lisp/org/ob-js
/home/jschmidt/work/org-mode/lisp/ob-R hides /home/jschmidt/work/emacs-master/lisp/org/ob-R
/home/jschmidt/work/org-mode/lisp/org-inlinetask hides /home/jschmidt/work/emacs-master/lisp/org/org-inlinetask
/home/jschmidt/work/org-mode/lisp/ol-mhe hides /home/jschmidt/work/emacs-master/lisp/org/ol-mhe
/home/jschmidt/work/org-mode/lisp/ob-dot hides /home/jschmidt/work/emacs-master/lisp/org/ob-dot
/home/jschmidt/work/org-mode/lisp/ol-docview hides /home/jschmidt/work/emacs-master/lisp/org/ol-docview
/home/jschmidt/work/org-mode/lisp/ob-C hides /home/jschmidt/work/emacs-master/lisp/org/ob-C
/home/jschmidt/work/org-mode/lisp/ol-man hides /home/jschmidt/work/emacs-master/lisp/org/ol-man
/home/jschmidt/work/org-mode/lisp/org-cycle hides /home/jschmidt/work/emacs-master/lisp/org/org-cycle
/home/jschmidt/work/org-mode/lisp/org-pcomplete hides /home/jschmidt/work/emacs-master/lisp/org/org-pcomplete
/home/jschmidt/work/org-mode/lisp/org-faces hides /home/jschmidt/work/emacs-master/lisp/org/org-faces
/home/jschmidt/work/org-mode/lisp/org hides /home/jschmidt/work/emacs-master/lisp/org/org
/home/jschmidt/work/org-mode/lisp/ol hides /home/jschmidt/work/emacs-master/lisp/org/ol
/home/jschmidt/work/org-mode/lisp/ob-haskell hides /home/jschmidt/work/emacs-master/lisp/org/ob-haskell
/home/jschmidt/work/org-mode/lisp/ob-lisp hides /home/jschmidt/work/emacs-master/lisp/org/ob-lisp
/home/jschmidt/work/org-mode/lisp/org-mobile hides /home/jschmidt/work/emacs-master/lisp/org/org-mobile
/home/jschmidt/work/org-mode/lisp/org-agenda hides /home/jschmidt/work/emacs-master/lisp/org/org-agenda
/home/jschmidt/work/org-mode/lisp/ob-perl hides /home/jschmidt/work/emacs-master/lisp/org/ob-perl
/home/jschmidt/work/org-mode/lisp/org-lint hides /home/jschmidt/work/emacs-master/lisp/org/org-lint
/home/jschmidt/work/org-mode/lisp/org-id hides /home/jschmidt/work/emacs-master/lisp/org/org-id
/home/jschmidt/work/org-mode/lisp/ox-man hides /home/jschmidt/work/emacs-master/lisp/org/ox-man
/home/jschmidt/work/org-mode/lisp/ol-bbdb hides /home/jschmidt/work/emacs-master/lisp/org/ol-bbdb
/home/jschmidt/work/org-mode/lisp/ob-lilypond hides /home/jschmidt/work/emacs-master/lisp/org/ob-lilypond
/home/jschmidt/work/org-mode/lisp/org-archive hides /home/jschmidt/work/emacs-master/lisp/org/org-archive
/home/jschmidt/work/org-mode/lisp/ox-publish hides /home/jschmidt/work/emacs-master/lisp/org/ox-publish
/home/jschmidt/work/org-mode/lisp/ob-core hides /home/jschmidt/work/emacs-master/lisp/org/ob-core
/home/jschmidt/work/org-mode/lisp/ob-groovy hides /home/jschmidt/work/emacs-master/lisp/org/ob-groovy
/home/jschmidt/work/org-mode/lisp/ox-org hides /home/jschmidt/work/emacs-master/lisp/org/ox-org
/home/jschmidt/work/org-mode/lisp/org-entities hides /home/jschmidt/work/emacs-master/lisp/org/org-entities
/home/jschmidt/work/org-mode/lisp/org-goto hides /home/jschmidt/work/emacs-master/lisp/org/org-goto
/home/jschmidt/work/org-mode/lisp/ob-awk hides /home/jschmidt/work/emacs-master/lisp/org/ob-awk
/home/jschmidt/work/org-mode/lisp/ol-eshell hides /home/jschmidt/work/emacs-master/lisp/org/ol-eshell
/home/jschmidt/work/org-mode/lisp/org-num hides /home/jschmidt/work/emacs-master/lisp/org/org-num
/home/jschmidt/work/org-mode/lisp/oc-csl hides /home/jschmidt/work/emacs-master/lisp/org/oc-csl
/home/jschmidt/work/org-mode/lisp/org-capture hides /home/jschmidt/work/emacs-master/lisp/org/org-capture
/home/jschmidt/work/org-mode/lisp/ob-ref hides /home/jschmidt/work/emacs-master/lisp/org/ob-ref
/home/jschmidt/work/org-mode/lisp/org-list hides /home/jschmidt/work/emacs-master/lisp/org/org-list
/home/jschmidt/work/org-mode/lisp/org-macro hides /home/jschmidt/work/emacs-master/lisp/org/org-macro
/home/jschmidt/work/org-mode/lisp/org-clock hides /home/jschmidt/work/emacs-master/lisp/org/org-clock
/home/jschmidt/work/org-mode/lisp/ob-table hides /home/jschmidt/work/emacs-master/lisp/org/ob-table
/home/jschmidt/work/org-mode/lisp/org-datetree hides /home/jschmidt/work/emacs-master/lisp/org/org-datetree
/home/jschmidt/work/org-mode/lisp/org-mouse hides /home/jschmidt/work/emacs-master/lisp/org/org-mouse
/home/jschmidt/work/org-mode/lisp/ob-latex hides /home/jschmidt/work/emacs-master/lisp/org/ob-latex
/home/jschmidt/work/org-mode/lisp/org-keys hides /home/jschmidt/work/emacs-master/lisp/org/org-keys
/home/jschmidt/work/org-mode/lisp/org-compat hides /home/jschmidt/work/emacs-master/lisp/org/org-compat
/home/jschmidt/work/org-mode/lisp/org-habit hides /home/jschmidt/work/emacs-master/lisp/org/org-habit
/home/jschmidt/work/org-mode/lisp/org-tempo hides /home/jschmidt/work/emacs-master/lisp/org/org-tempo
/home/jschmidt/work/org-mode/lisp/org-refile hides /home/jschmidt/work/emacs-master/lisp/org/org-refile
/home/jschmidt/work/org-mode/lisp/ob-ruby hides /home/jschmidt/work/emacs-master/lisp/org/ob-ruby
/home/jschmidt/work/org-mode/lisp/org-attach-git hides /home/jschmidt/work/emacs-master/lisp/org/org-attach-git
/home/jschmidt/work/org-mode/lisp/org-loaddefs hides /home/jschmidt/work/emacs-master/lisp/org/org-loaddefs
/home/jschmidt/work/org-mode/lisp/org-duration hides /home/jschmidt/work/emacs-master/lisp/org/org-duration
/home/jschmidt/work/org-mode/lisp/ob-ocaml hides /home/jschmidt/work/emacs-master/lisp/org/ob-ocaml
/home/jschmidt/work/org-mode/lisp/org-fold hides /home/jschmidt/work/emacs-master/lisp/org/org-fold
/home/jschmidt/work/org-mode/lisp/ox-ascii hides /home/jschmidt/work/emacs-master/lisp/org/ox-ascii
/home/jschmidt/work/org-mode/lisp/ob-css hides /home/jschmidt/work/emacs-master/lisp/org/ob-css
/home/jschmidt/work/org-mode/lisp/ob-tangle hides /home/jschmidt/work/emacs-master/lisp/org/ob-tangle
/home/jschmidt/work/org-mode/lisp/ob-python hides /home/jschmidt/work/emacs-master/lisp/org/ob-python
/home/jschmidt/work/org-mode/lisp/org-crypt hides /home/jschmidt/work/emacs-master/lisp/org/org-crypt
/home/jschmidt/work/org-mode/lisp/ol-bibtex hides /home/jschmidt/work/emacs-master/lisp/org/ol-bibtex
/home/jschmidt/work/org-mode/lisp/oc-biblatex hides /home/jschmidt/work/emacs-master/lisp/org/oc-biblatex
/home/jschmidt/work/org-mode/lisp/org-protocol hides /home/jschmidt/work/emacs-master/lisp/org/org-protocol
/home/jschmidt/work/org-mode/lisp/org-feed hides /home/jschmidt/work/emacs-master/lisp/org/org-feed
/home/jschmidt/work/org-mode/lisp/ob-maxima hides /home/jschmidt/work/emacs-master/lisp/org/ob-maxima
/home/jschmidt/work/org-mode/lisp/org-colview hides /home/jschmidt/work/emacs-master/lisp/org/org-colview
/home/jschmidt/work/org-mode/lisp/ol-w3m hides /home/jschmidt/work/emacs-master/lisp/org/ol-w3m
/home/jschmidt/work/org-mode/lisp/ob-ditaa hides /home/jschmidt/work/emacs-master/lisp/org/ob-ditaa
/home/jschmidt/work/org-mode/lisp/ob-plantuml hides /home/jschmidt/work/emacs-master/lisp/org/ob-plantuml
/home/jschmidt/work/org-mode/lisp/org-src hides /home/jschmidt/work/emacs-master/lisp/org/org-src
/home/jschmidt/work/org-mode/lisp/ob-sed hides /home/jschmidt/work/emacs-master/lisp/org/ob-sed
/home/jschmidt/work/org-mode/lisp/ox-latex hides /home/jschmidt/work/emacs-master/lisp/org/ox-latex
/home/jschmidt/work/org-mode/lisp/ob-exp hides /home/jschmidt/work/emacs-master/lisp/org/ob-exp
/home/jschmidt/work/org-mode/lisp/ob-lua hides /home/jschmidt/work/emacs-master/lisp/org/ob-lua
/home/jschmidt/work/org-mode/lisp/ox hides /home/jschmidt/work/emacs-master/lisp/org/ox
/home/jschmidt/work/org-mode/lisp/org-footnote hides /home/jschmidt/work/emacs-master/lisp/org/org-footnote
/home/jschmidt/work/org-mode/lisp/ol-doi hides /home/jschmidt/work/emacs-master/lisp/org/ol-doi
/home/jschmidt/work/org-mode/lisp/ob-emacs-lisp hides /home/jschmidt/work/emacs-master/lisp/org/ob-emacs-lisp
/home/jschmidt/work/org-mode/lisp/ox-odt hides /home/jschmidt/work/emacs-master/lisp/org/ox-odt
/home/jschmidt/work/org-mode/lisp/ob-eval hides /home/jschmidt/work/emacs-master/lisp/org/ob-eval
/home/jschmidt/work/org-mode/lisp/ob-matlab hides /home/jschmidt/work/emacs-master/lisp/org/ob-matlab
/home/jschmidt/work/org-mode/lisp/ob-sass hides /home/jschmidt/work/emacs-master/lisp/org/ob-sass
/home/jschmidt/work/org-mode/lisp/ob-java hides /home/jschmidt/work/emacs-master/lisp/org/ob-java
/home/jschmidt/work/org-mode/lisp/ob-julia hides /home/jschmidt/work/emacs-master/lisp/org/ob-julia
/home/jschmidt/work/org-mode/lisp/org-version hides /home/jschmidt/work/emacs-master/lisp/org/org-version
/home/jschmidt/work/org-mode/lisp/ob-calc hides /home/jschmidt/work/emacs-master/lisp/org/ob-calc
/home/jschmidt/work/org-mode/lisp/org-table hides /home/jschmidt/work/emacs-master/lisp/org/org-table
/home/jschmidt/work/org-mode/lisp/ol-irc hides /home/jschmidt/work/emacs-master/lisp/org/ol-irc
/home/jschmidt/work/org-mode/lisp/ob-eshell hides /home/jschmidt/work/emacs-master/lisp/org/ob-eshell
/home/jschmidt/work/org-mode/lisp/org-fold-core hides /home/jschmidt/work/emacs-master/lisp/org/org-fold-core
/home/jschmidt/work/org-mode/lisp/org-macs hides /home/jschmidt/work/emacs-master/lisp/org/org-macs
/home/jschmidt/work/org-mode/lisp/ob-comint hides /home/jschmidt/work/emacs-master/lisp/org/ob-comint
/home/jschmidt/work/org-mode/lisp/ox-texinfo hides /home/jschmidt/work/emacs-master/lisp/org/ox-texinfo
/home/jschmidt/work/org-mode/lisp/oc-natbib hides /home/jschmidt/work/emacs-master/lisp/org/oc-natbib
/home/jschmidt/work/org-mode/lisp/ob-screen hides /home/jschmidt/work/emacs-master/lisp/org/ob-screen
/home/jschmidt/work/org-mode/lisp/ox-beamer hides /home/jschmidt/work/emacs-master/lisp/org/ox-beamer
/home/jschmidt/work/org-mode/lisp/ob-octave hides /home/jschmidt/work/emacs-master/lisp/org/ob-octave
/home/jschmidt/work/org-mode/lisp/ob hides /home/jschmidt/work/emacs-master/lisp/org/ob
/home/jschmidt/work/org-mode/lisp/ob-shell hides /home/jschmidt/work/emacs-master/lisp/org/ob-shell
/home/jschmidt/work/org-mode/lisp/ox-md hides /home/jschmidt/work/emacs-master/lisp/org/ox-md
/home/jschmidt/work/org-mode/lisp/oc hides /home/jschmidt/work/emacs-master/lisp/org/oc
/home/jschmidt/work/org-mode/lisp/org-ctags hides /home/jschmidt/work/emacs-master/lisp/org/org-ctags

Features:
(shadow sort mail-extr emacsbug message yank-media puny dired
dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config
gnus-util time-date mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils compile text-property-search comint
ansi-osc ansi-color ring comp-run comp-common rx time delsel cus-load
advice finder-inf git-commit-autoloads magit-section-autoloads
simple-httpd-autoloads transient-autoloads info compat-autoloads
xr-autoloads yaml-mode-autoloads package browse-url url url-proxy
url-privacy url-expand url-methods url-history url-cookie
generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs password-cache json subr-x
map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc
iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win
term/common-win x-dnd touch-screen tool-bar dnd fontset image regexp-opt
fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode
register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer nadvice seq simple cl-generic indonesian philippine
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads dbusbind inotify lcms2 dynamic-setting system-font-setting
font-render-setting cairo gtk x-toolkit xinput2 x multi-tty move-toolbar
make-network-process native-compile emacs)

Memory information:
((conses 16 131427 11427) (symbols 48 10928 0)
 (strings 32 40700 4994) (string-bytes 1 1376609)
 (vectors 16 23122) (vector-slots 8 386746 15291)
 (floats 8 39 21) (intervals 56 278 0) (buffers 984 11))

--=-=-=--




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Jens Schmidt <jschmidt4gnu@HIDDEN>
Subject: bug#67462: Acknowledgement (30.0.50; prog-fill-reindent-defun
 does not respect buffer-local fill-paragraph-function)
Message-ID: <handler.67462.B.170103294412821.ack <at> debbugs.gnu.org>
References: <87zfz09q9d.fsf@HIDDEN>
X-Gnu-PR-Message: ack 67462
X-Gnu-PR-Package: emacs
Reply-To: 67462 <at> debbugs.gnu.org
Date: Sun, 26 Nov 2023 21:10:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 67462 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
67462: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D67462
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#67462: 30.0.50; prog-fill-reindent-defun does not respect buffer-local fill-paragraph-function
Resent-From: Dmitry Gutov <dmitry@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 26 Nov 2023 21:24:01 +0000
Resent-Message-ID: <handler.67462.B67462.170103380314170 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 67462
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Jens Schmidt <jschmidt4gnu@HIDDEN>, 67462 <at> debbugs.gnu.org
Received: via spool by 67462-submit <at> debbugs.gnu.org id=B67462.170103380314170
          (code B ref 67462); Sun, 26 Nov 2023 21:24:01 +0000
Received: (at 67462) by debbugs.gnu.org; 26 Nov 2023 21:23:23 +0000
Received: from localhost ([127.0.0.1]:42787 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1r7Mb5-0003gU-7G
	for submit <at> debbugs.gnu.org; Sun, 26 Nov 2023 16:23:23 -0500
Received: from out2-smtp.messagingengine.com ([66.111.4.26]:60443)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1r7Mb2-0003gH-CC
 for 67462 <at> debbugs.gnu.org; Sun, 26 Nov 2023 16:23:21 -0500
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
 by mailout.nyi.internal (Postfix) with ESMTP id DEC3F5C00BF;
 Sun, 26 Nov 2023 16:23:08 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162])
 by compute1.internal (MEProxy); Sun, 26 Nov 2023 16:23:08 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :content-transfer-encoding:content-type:content-type:date:date
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:sender:subject:subject:to:to; s=fm3; t=
 1701033788; x=1701120188; bh=gKdQwsVwV0swjX2E9trzcdSpq9Em1fgmDY+
 Nzsm/SU8=; b=lWtONle6tIM1ReWGV1z9HKMWWU/hcxFEoCB91q7opMjPBm8OO2u
 VsVAYmwjtKtLqs+tGz0uC1ftgcBfrQf1FugVL0jPm6HIGdD591lgU0+50Taz9K09
 f7dtdQsc8sAbdRGgkQLzvMuWPAQtSa+V5PQYnYxVEojvVH1xAno6nrzR8pfvrSp/
 Bdv2qjYD/NBWmTYml4pvY147RfarRMkknkZdXMifz2d1g6gN0ovCOVC7cQs9XZH0
 UomOl0gQH5cGG0GCY0jHvfR6QGDdHHgjRplzRm2cotlYOHFFXwKejLBw0m9vEKbC
 K1uPtokPPsx0C1I6dZMiiv4ZyQZiuFeM3aQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-transfer-encoding:content-type
 :content-type:date:date:feedback-id:feedback-id:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1701033788; x=
 1701120188; bh=gKdQwsVwV0swjX2E9trzcdSpq9Em1fgmDY+Nzsm/SU8=; b=Y
 O1q7YoKkou6GTYvwG+kk7feXr1lcudhoZakLUw3rC7qhkvbP5y1QzCucUWhKNXDE
 ZASMUBYiPT+R2ewDxviunK3YJKBEm9K0gcU3Vi0JI23canEEZtmUxZeccBqBSXqA
 sQ2FISlpJvaBCheXPmgOtMxYY11YOgy9F4+KmbM8V2229NqWRwCOtwtRQ3UFDahH
 K8kgfIdz/nPpJuWGR8bzgXru63azItsMkwvCvfNlEy2Hdnvv/3rTn3LfwKQPqxmA
 JjqH8ZDC82AnRlKDVY/JZbtVdTZNUCqMeXZ/VTBZeRqSBEqQw9BWLYZFl0dbUKeW
 IItFfGZfU3rWiFYrHR6Rg==
X-ME-Sender: <xms:PLdjZTXOqiIpWwxSQTpSiUnmAl_mwil93TE-1Z2QSP98fG46s3xAgA>
 <xme:PLdjZbmGz46Oj4bFP_nGA1WeZdKASZsSSB8ZXYbP9qHxpxEo4OvwLReizK4oo6rF-
 10_IulUn92Jnl4Amjw>
X-ME-Received: <xmr:PLdjZfbqUtlzZ2iGtCDw9HlZO-9nKzktUKDRbGrzeYqb9GpPx_xBdkTEqRaolQwaBcYLCw>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudehledgudehudcutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuffvfhfhjggtgfesth
 ejredttdefjeenucfhrhhomhepffhmihhtrhihucfiuhhtohhvuceoughmihhtrhihsehg
 uhhtohhvrdguvghvqeenucggtffrrghtthgvrhhnpeeghedthedujeeiteeutddtjeekhe
 ejteeukeehffdutdejuedvfeevueevieduudenucevlhhushhtvghrufhiiigvpedtnecu
 rfgrrhgrmhepmhgrihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvh
X-ME-Proxy: <xmx:PLdjZeV6EjvGajwX6FD0o1iV49WnxnI03pbGZloievoP1h5T_xJh2g>
 <xmx:PLdjZdnVp94kzPvms1QCOxQGdZQu45hR3-J5xrtkIFgbKvBau-JJnw>
 <xmx:PLdjZbefiWoiG7YbgDtOcLVn6pUplW06tWDZPdWK3Z-7M0SZ45Lhzw>
 <xmx:PLdjZcswemuDxDQZWBwlIUXxHUxrO-cg2nfWrHANpAYOywzVznXGmQ>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun,
 26 Nov 2023 16:23:07 -0500 (EST)
Message-ID: <f01c770d-67b4-c811-e039-6b6ebf66f60e@HIDDEN>
Date: Sun, 26 Nov 2023 23:23:04 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
 Thunderbird/102.13.0
Content-Language: en-US
References: <87zfz09q9d.fsf@HIDDEN>
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <87zfz09q9d.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.9 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.9 (---)

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'.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#67462: 30.0.50; prog-fill-reindent-defun does not respect buffer-local fill-paragraph-function
Resent-From: Jens Schmidt <jschmidt4gnu@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 26 Nov 2023 22:53:02 +0000
Resent-Message-ID: <handler.67462.B67462.170103915023980 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 67462
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Dmitry Gutov <dmitry@HIDDEN>
Cc: 67462 <at> debbugs.gnu.org
Received: via spool by 67462-submit <at> debbugs.gnu.org id=B67462.170103915023980
          (code B ref 67462); Sun, 26 Nov 2023 22:53:02 +0000
Received: (at 67462) by debbugs.gnu.org; 26 Nov 2023 22:52:30 +0000
Received: from localhost ([127.0.0.1]:42842 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1r7NzK-0006Eh-EW
	for submit <at> debbugs.gnu.org; Sun, 26 Nov 2023 17:52:30 -0500
Received: from mr5.vodafonemail.de ([145.253.228.165]:52686)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jschmidt4gnu@HIDDEN>) id 1r7NzF-0006EK-Ea
 for 67462 <at> debbugs.gnu.org; Sun, 26 Nov 2023 17:52:29 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de;
 s=vfde-mb-mr2-23sep; t=1701039132;
 bh=CyGr61z25mOxKgL3MReRFKSJQ+iue7/A6WOG0ZRqWsI=;
 h=From:To:Subject:References:Date:In-Reply-To:Message-ID:User-Agent:
 Content-Type:From;
 b=E/haLHp77XnLCxAYXc6LDQbGgNYeB1xHL1eQSKo/ZAjCgo6L299MRNN9hcH/SAUqc
 6EumeDMghf0VvnesF0mqh59VOnmFl9UcnFY4TgNUXkO/dO0mNSDHtYk/FwLft9DD/6
 0XCNjoE8D57ghuh5f3ZYZNQFQI10ODULkme42/9I=
Received: from smtp.vodafone.de (unknown [10.0.0.2])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by mr5.vodafonemail.de (Postfix) with ESMTPS id 4SdkW00Nwtz1y9x;
 Sun, 26 Nov 2023 22:52:11 +0000 (UTC)
Received: from sappc2 (port-83-236-7-18.dynamic.as20676.net [83.236.7.18])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits)
 server-digest SHA256) (No client certificate requested)
 by smtp.vodafone.de (Postfix) with ESMTPSA id 4SdkVr3ZTYzHnHn;
 Sun, 26 Nov 2023 22:52:01 +0000 (UTC)
From: Jens Schmidt <jschmidt4gnu@HIDDEN>
References: <87zfz09q9d.fsf@HIDDEN>
 <f01c770d-67b4-c811-e039-6b6ebf66f60e@HIDDEN>
Date: Sun, 26 Nov 2023 23:52:00 +0100
In-Reply-To: <f01c770d-67b4-c811-e039-6b6ebf66f60e@HIDDEN> (Dmitry Gutov's
 message of "Sun, 26 Nov 2023 23:23:04 +0200")
Message-ID: <87wmu49lgv.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-purgate-type: clean
X-purgate: clean
X-purgate-size: 1986
X-purgate-ID: 155817::1701039127-02FF818D-89621683/0/0
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Dmitry Gutov <dmitry@HIDDEN> writes:

> 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.

Uh.  Good point.

> 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'.

I tried a cursory grep '(defun .*-fill-paragraph' in lisp/progmodes/.el.
The following functions all seem to work outside of comments:

  cfengine-fill-paragraph
  f90-fill-paragraph
  fortran-fill-paragraph
  makefile-fill-paragraph
  octave-fill-paragraph

I could be wrong with that list, though, and I cannot tell how useful
these functions are outside of comments.  I just looked at docstrings or
for a prominent

  (or (fill-comment-paragraph justify)
      (do-something ...))

pattern.

Finally, there is `python-fill-paragraph', which tries to be smart
w.r.t. context.  Not sure how its behavior outside of comments compares
to the one provided by `prog-fill-reindent-defun'.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#67462: 30.0.50; prog-fill-reindent-defun does not respect buffer-local fill-paragraph-function
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 27 Nov 2023 12:07:02 +0000
Resent-Message-ID: <handler.67462.B67462.170108678711877 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 67462
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Dmitry Gutov <dmitry@HIDDEN>
Cc: 67462 <at> debbugs.gnu.org, jschmidt4gnu@HIDDEN
Received: via spool by 67462-submit <at> debbugs.gnu.org id=B67462.170108678711877
          (code B ref 67462); Mon, 27 Nov 2023 12:07:02 +0000
Received: (at 67462) by debbugs.gnu.org; 27 Nov 2023 12:06:27 +0000
Received: from localhost ([127.0.0.1]:43389 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1r7aNe-00035V-Sk
	for submit <at> debbugs.gnu.org; Mon, 27 Nov 2023 07:06:27 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:41462)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1r7aNd-00035H-6P
 for 67462 <at> debbugs.gnu.org; Mon, 27 Nov 2023 07:06:26 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1r7aNR-0002KE-78; Mon, 27 Nov 2023 07:06:13 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=K2bDWnZDsN7QY1wwtirZx0KQWiheD5AbKdBWTL2/tUw=; b=OUm9sNhCftxa
 avJLadAFKXbcHFfjyoyx2KdSNXvtLTwmS5+UmNuesBawr2zRgoWFU+2C5zuj7qQZCR1u40m9+i78j
 SLJEB1TgeTxShaGl5pgtRsX0Nk2il9wCiRFmAQnJgu1ucJXNUpR1wBIeLAk7ov68Sdg7DYgCE/d4M
 jBpWAPJfaRE/N/vjxPZl1A9BzH/1UPoRF7DHchNjAN03vPUhpt8xdsdBAYZMgRjq84yg2OgpgVJy5
 SvbSmSO9PPNRYxyrrRkEHRxfgdTiaPDsCPsDhJOnjCkfXeYZf6QIRlTaMZSc/hW3fo/3+lMDNwa9R
 /qFkjieJQDZUIgZTAbKEnQ==;
Date: Mon, 27 Nov 2023 14:05:57 +0200
Message-Id: <83cyvv9za2.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <f01c770d-67b4-c811-e039-6b6ebf66f60e@HIDDEN> (message from
 Dmitry Gutov on Sun, 26 Nov 2023 23:23:04 +0200)
References: <87zfz09q9d.fsf@HIDDEN>
 <f01c770d-67b4-c811-e039-6b6ebf66f60e@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Sun, 26 Nov 2023 23:23:04 +0200
> From: Dmitry Gutov <dmitry@HIDDEN>
> 
> Maybe makefile-mode-map should simply rebind "M-q" back to 'fill-paragraph'.

Yes, I think it should.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#67462: 30.0.50; prog-fill-reindent-defun does not respect buffer-local fill-paragraph-function
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 27 Nov 2023 12:17:01 +0000
Resent-Message-ID: <handler.67462.B67462.170108740512873 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 67462
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Jens Schmidt <jschmidt4gnu@HIDDEN>
Cc: 67462 <at> debbugs.gnu.org, dmitry@HIDDEN
Received: via spool by 67462-submit <at> debbugs.gnu.org id=B67462.170108740512873
          (code B ref 67462); Mon, 27 Nov 2023 12:17:01 +0000
Received: (at 67462) by debbugs.gnu.org; 27 Nov 2023 12:16:45 +0000
Received: from localhost ([127.0.0.1]:43417 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1r7aXc-0003LZ-V9
	for submit <at> debbugs.gnu.org; Mon, 27 Nov 2023 07:16:45 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:45312)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1r7aXa-0003LK-Ma
 for 67462 <at> debbugs.gnu.org; Mon, 27 Nov 2023 07:16:43 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1r7aXO-0005Cr-6w; Mon, 27 Nov 2023 07:16:30 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=30ysxXNhII/ihzT6kMWjjgP01zX29SGPoRIiieXklv8=; b=AhCnTyM04BfB
 jK/CezCz4zTMsk/0fZuugMhyCyP3+Z1Pd+yaGJfppRTloKFP6o46UcosT8xSvIxqV3gGGlLIC2l54
 IggWYN/JutcQfokLC3R5l9Ga5qoih9dR7e2hAo+0F87wosamFHuhaV527f+9rUhPCoRVbic0AmUGK
 S541oTW0tIVbCBc7qMocVGV23Zg1+FG4Dtfkupr/lW3nXw+NW5UBedpZWZ2epedEfIvGbNwyZSxOE
 RJWjhK9OUTa975qK22s2z9YFAMSTHkjKlPPcjjBToZaHYB0atASfQ6ZJHLF/hty2RrvRca9ZipXFh
 03jkLallrexeVzS2ASnUSQ==;
Date: Mon, 27 Nov 2023 14:16:14 +0200
Message-Id: <83a5qz9ysx.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <87wmu49lgv.fsf@HIDDEN> (bug-gnu-emacs@HIDDEN)
References: <87zfz09q9d.fsf@HIDDEN>
 <f01c770d-67b4-c811-e039-6b6ebf66f60e@HIDDEN>
 <87wmu49lgv.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: 67462 <at> debbugs.gnu.org
> Date: Sun, 26 Nov 2023 23:52:00 +0100
> From:  Jens Schmidt via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
> 
> Dmitry Gutov <dmitry@HIDDEN> writes:
> 
> > Maybe makefile-mode-map should simply rebind "M-q" back to 'fill-paragraph'.
> 
> I tried a cursory grep '(defun .*-fill-paragraph' in lisp/progmodes/.el.
> The following functions all seem to work outside of comments:
> 
>   cfengine-fill-paragraph
>   f90-fill-paragraph
>   fortran-fill-paragraph
>   makefile-fill-paragraph
>   octave-fill-paragraph
> 
> I could be wrong with that list, though, and I cannot tell how useful
> these functions are outside of comments.  I just looked at docstrings or
> for a prominent
> 
>   (or (fill-comment-paragraph justify)
>       (do-something ...))
> 
> pattern.

What would it take to teach prog-fill-reindent-defun to DTRT outside
comments and strings?




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#67462: 30.0.50; prog-fill-reindent-defun does not respect buffer-local fill-paragraph-function
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 27 Nov 2023 17:09:03 +0000
Resent-Message-ID: <handler.67462.B67462.170110490021911 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 67462
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 67462 <at> debbugs.gnu.org
Cc: Dmitry Gutov <dmitry@HIDDEN>, Jens Schmidt <jschmidt4gnu@HIDDEN>
Received: via spool by 67462-submit <at> debbugs.gnu.org id=B67462.170110490021911
          (code B ref 67462); Mon, 27 Nov 2023 17:09:03 +0000
Received: (at 67462) by debbugs.gnu.org; 27 Nov 2023 17:08:20 +0000
Received: from localhost ([127.0.0.1]:44660 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1r7f5j-0005hA-RT
	for submit <at> debbugs.gnu.org; Mon, 27 Nov 2023 12:08:20 -0500
Received: from relay7-d.mail.gandi.net ([2001:4b98:dc4:8::227]:47033)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1r7f5d-0005gR-0Q
 for 67462 <at> debbugs.gnu.org; Mon, 27 Nov 2023 12:08:13 -0500
Received: by mail.gandi.net (Postfix) with ESMTPSA id 975862000A;
 Mon, 27 Nov 2023 17:07:52 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
In-Reply-To: <87wmu49lgv.fsf@HIDDEN> (Jens Schmidt via's message of
 "Sun, 26 Nov 2023 23:52:00 +0100")
Organization: LINKOV.NET
References: <87zfz09q9d.fsf@HIDDEN>
 <f01c770d-67b4-c811-e039-6b6ebf66f60e@HIDDEN>
 <87wmu49lgv.fsf@HIDDEN>
Date: Mon, 27 Nov 2023 19:02:16 +0200
Message-ID: <86a5qz8mgf.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> Finally, there is `python-fill-paragraph', which tries to be smart
> w.r.t. context.  Not sure how its behavior outside of comments compares
> to the one provided by `prog-fill-reindent-defun'.

There are more problems with prog-fill-reindent-defun in bug#63790.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#67462: 30.0.50; prog-fill-reindent-defun does not respect buffer-local fill-paragraph-function
Resent-From: Jens Schmidt <jschmidt4gnu@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 27 Nov 2023 19:47:01 +0000
Resent-Message-ID: <handler.67462.B67462.170111440527092 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 67462
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Dmitry Gutov <dmitry@HIDDEN>
Cc: 67462 <at> debbugs.gnu.org
Received: via spool by 67462-submit <at> debbugs.gnu.org id=B67462.170111440527092
          (code B ref 67462); Mon, 27 Nov 2023 19:47:01 +0000
Received: (at 67462) by debbugs.gnu.org; 27 Nov 2023 19:46:45 +0000
Received: from localhost ([127.0.0.1]:44881 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1r7hZ7-00072u-5O
	for submit <at> debbugs.gnu.org; Mon, 27 Nov 2023 14:46:45 -0500
Received: from mr6.vodafonemail.de ([145.253.228.166]:47404)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jschmidt4gnu@HIDDEN>) id 1r7hZ5-00072e-Dz
 for 67462 <at> debbugs.gnu.org; Mon, 27 Nov 2023 14:46:44 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de;
 s=vfde-mb-mr2-23sep; t=1701114390;
 bh=GvahmTX6KvkAfT3I4PM2HTX7HqJkjJpKr36SSJfBdR8=;
 h=From:To:Subject:References:Date:In-Reply-To:Message-ID:User-Agent:
 Content-Type:From;
 b=y7Dw8afi+If3aIf5JCMZGbGv7W0Pp4yITGxh8nYKcKfXzFVFX1zQYnhG+vOD7QBUP
 1uzkD/mIAq6pUyTvjY6kc8kDLWnQHMyE87E1MCPJLLIL5zfXEQBWh9n5jXfAc0LrVi
 O+UuCkhWJZy9rEzmzAgsCYnKbRPmVRBlozEKNq/0=
Received: from smtp.vodafone.de (unknown [10.0.0.2])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by mr6.vodafonemail.de (Postfix) with ESMTPS id 4SfGLF6Y5cz1y3N;
 Mon, 27 Nov 2023 19:46:29 +0000 (UTC)
Received: from sappc2 (port-92-196-85-0.dynamic.as20676.net [92.196.85.0])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits)
 server-digest SHA256) (No client certificate requested)
 by smtp.vodafone.de (Postfix) with ESMTPSA id 4SfGL636t5zHnfs;
 Mon, 27 Nov 2023 19:46:19 +0000 (UTC)
From: Jens Schmidt <jschmidt4gnu@HIDDEN>
References: <87zfz09q9d.fsf@HIDDEN>
 <f01c770d-67b4-c811-e039-6b6ebf66f60e@HIDDEN>
 <87wmu49lgv.fsf@HIDDEN>
Date: Mon, 27 Nov 2023 20:46:18 +0100
In-Reply-To: <87wmu49lgv.fsf@HIDDEN> (Jens Schmidt's message of
 "Sun, 26 Nov 2023 23:52:00 +0100")
Message-ID: <87zfyzget1.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-purgate-type: clean
X-purgate: clean
X-purgate-size: 1212
X-purgate-ID: 155817::1701114385-9CFF094E-1484E963/0/0
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Jens Schmidt <jschmidt4gnu@HIDDEN> writes:

> Dmitry Gutov <dmitry@HIDDEN> writes:
>
>> 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.
>
> Uh.  Good point.

Actually, I have to correct myself here: `c-mode', even though deriving
from `prog-mode', goes at lengths to not use the derived binding of M-q,
but rather binds it directly:

  ;; It doesn't suffice to put `c-fill-paragraph' on
  ;; `fill-paragraph-function' since `c-fill-paragraph' must be called
  ;; before any fill prefix adaption is done.  E.g. `filladapt-mode'
  ;; replaces `fill-paragraph' and does the adaption before calling
  ;; `fill-paragraph-function', and we have to mask comments etc
  ;; before that.  Also, `c-fill-paragraph' chains on to
  ;; `fill-paragraph' and the value on `fill-paragraph-function' to
  ;; do the actual filling work.
  (substitute-key-definition 'fill-paragraph 'c-fill-paragraph
			     c-mode-base-map global-map)

So `prog-fill-reindent-defun' wouldn't be bound in `c-mode' buffers,
anyway.  The same seems to hold for `awk-mode', `c++-mode' and probably
other modes in that family.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#67462: 30.0.50; prog-fill-reindent-defun does not respect buffer-local fill-paragraph-function
Resent-From: Jens Schmidt <jschmidt4gnu@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 27 Nov 2023 20:10:01 +0000
Resent-Message-ID: <handler.67462.B67462.170111574229536 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 67462
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 67462 <at> debbugs.gnu.org, dmitry@HIDDEN
Received: via spool by 67462-submit <at> debbugs.gnu.org id=B67462.170111574229536
          (code B ref 67462); Mon, 27 Nov 2023 20:10:01 +0000
Received: (at 67462) by debbugs.gnu.org; 27 Nov 2023 20:09:02 +0000
Received: from localhost ([127.0.0.1]:44903 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1r7hug-0007g7-0s
	for submit <at> debbugs.gnu.org; Mon, 27 Nov 2023 15:09:02 -0500
Received: from mr4.vodafonemail.de ([145.253.228.164]:47048)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jschmidt4gnu@HIDDEN>) id 1r7hud-0007fu-6d
 for 67462 <at> debbugs.gnu.org; Mon, 27 Nov 2023 15:09:00 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de;
 s=vfde-mb-mr2-23sep; t=1701115726;
 bh=NJWwu6Os+liEfrFRaUE4sqIAjmjR/2LD1KxTyy7VLYs=;
 h=From:To:Subject:References:Date:In-Reply-To:Message-ID:User-Agent:
 Content-Type:From;
 b=Q10kMs7FmGab149Egun6F0xdfvze7D1hIRUAnxUlojVY3+7f2xUPmiHIWMl/U2Qia
 /pFi+QYa1kSBQNMPLF4okMG2b/tiNBV0ITqNBURXPE7u3nOYWWLM0pMXfayYeajNFV
 S+c06ZifRJFoWK31lFeDhM/i7P+Fm/gUsBrTMe9o=
Received: from smtp.vodafone.de (unknown [10.0.0.2])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by mr4.vodafonemail.de (Postfix) with ESMTPS id 4SfGqy5GbNz1y6l;
 Mon, 27 Nov 2023 20:08:46 +0000 (UTC)
Received: from sappc2 (port-92-196-85-0.dynamic.as20676.net [92.196.85.0])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits)
 server-digest SHA256) (No client certificate requested)
 by smtp.vodafone.de (Postfix) with ESMTPSA id 4SfGqm22VWz9sZc;
 Mon, 27 Nov 2023 20:08:33 +0000 (UTC)
From: Jens Schmidt <jschmidt4gnu@HIDDEN>
References: <87zfz09q9d.fsf@HIDDEN>
 <f01c770d-67b4-c811-e039-6b6ebf66f60e@HIDDEN>
 <87wmu49lgv.fsf@HIDDEN> <83a5qz9ysx.fsf@HIDDEN>
Date: Mon, 27 Nov 2023 21:08:32 +0100
In-Reply-To: <83a5qz9ysx.fsf@HIDDEN> (Eli Zaretskii's message of "Mon, 27 Nov
 2023 14:16:14 +0200")
Message-ID: <87wmu3gdrz.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-purgate-type: clean
X-purgate: clean
X-purgate-size: 3232
X-purgate-ID: 155817::1701115722-D8FF67FF-2E36CC43/0/0
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

>> Cc: 67462 <at> debbugs.gnu.org
>> Date: Sun, 26 Nov 2023 23:52:00 +0100
>> From:  Jens Schmidt via "Bug reports for GNU Emacs,
>>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
>>
>> Dmitry Gutov <dmitry@HIDDEN> writes:
>>
>> > Maybe makefile-mode-map should simply rebind "M-q" back to 'fill-paragraph'.
>>
>> I tried a cursory grep '(defun .*-fill-paragraph' in lisp/progmodes/.el.
>> The following functions all seem to work outside of comments:
>>
>>   cfengine-fill-paragraph
>>   f90-fill-paragraph
>>   fortran-fill-paragraph
>>   makefile-fill-paragraph
>>   octave-fill-paragraph
>>
>> I could be wrong with that list, though, and I cannot tell how useful
>> these functions are outside of comments.  I just looked at docstrings or
>> for a prominent
>>
>>   (or (fill-comment-paragraph justify)
>>       (do-something ...))
>>
>> pattern.
>
> What would it take to teach prog-fill-reindent-defun to DTRT outside
> comments and strings?

IMO the problem here is that some modes already have an idea of what
could be TRT outside comments and strings, implemented in a
mode-specific fill-paragraph-function.  prog-fill-reindent-defun per se
doesn't have that knowledge, since it currently always just reindents
outside comments and strings.


A very conservative aproach to keep that knowledge of such modes would
be something along the following lines:

diff --git a/lisp/progmodes/prog-mode.el b/lisp/progmodes/prog-mode.el
index 37c54a90f42..df5aa845ae3 100644
--- a/lisp/progmodes/prog-mode.el
+++ b/lisp/progmodes/prog-mode.el
@@ -163,7 +163,13 @@ prog-fill-reindent-defun
                 (treesit-parser-list)
                 (treesit-node-match-p
                  (treesit-node-at (point)) 'text t))))
-      (if (or treesit-text-node
+      (if (or ;; Use `fill-paragraph-function' if bound locally,
+              ;; unless its declares to work on comments only.
+              (and (local-variable-p 'fill-paragraph-function)
+                   (or (not (symbolp fill-paragraph-function))
+                       (not (get fill-paragraph-function
+                                 'fills-only-comments))))
+              treesit-text-node
               (nth 8 (syntax-ppss))
               (re-search-forward "\\s-*\\s<" (line-end-position) t))
           (fill-paragraph argument (region-active-p))

That is, a mode using a specific fill-paragraph-function has to
explicitly declare (with property `fills-only-comments') that its
fill-paragraph-function only fills comments.  Only then that mode would
use the new default indentation of prog-fill-reindent-defun outside
comments and strings.


So for javascript mode, for example, we would also need:

diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index 5a669fdbd42..5c1c1845378 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -2975,6 +2975,8 @@ js-fill-paragraph
         (fill-paragraph-function #'c-fill-paragraph))
     (c-fill-paragraph justify)))
 
+(put 'js-fill-paragraph 'fills-only-comments t)
+
 (defun js-do-auto-fill ()
   (let ((js--filling-paragraph t))
     (c-do-auto-fill)))




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#67462: 30.0.50; prog-fill-reindent-defun does not respect buffer-local fill-paragraph-function
Resent-From: Dmitry Gutov <dmitry@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 27 Nov 2023 20:41:02 +0000
Resent-Message-ID: <handler.67462.B67462.170111765532541 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 67462
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Jens Schmidt <jschmidt4gnu@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>
Cc: 67462 <at> debbugs.gnu.org
Received: via spool by 67462-submit <at> debbugs.gnu.org id=B67462.170111765532541
          (code B ref 67462); Mon, 27 Nov 2023 20:41:02 +0000
Received: (at 67462) by debbugs.gnu.org; 27 Nov 2023 20:40:55 +0000
Received: from localhost ([127.0.0.1]:44933 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1r7iPW-0008Sn-LX
	for submit <at> debbugs.gnu.org; Mon, 27 Nov 2023 15:40:54 -0500
Received: from out3-smtp.messagingengine.com ([66.111.4.27]:46375)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1r7iPV-0008Sa-KQ
 for 67462 <at> debbugs.gnu.org; Mon, 27 Nov 2023 15:40:53 -0500
Received: from compute2.internal (compute2.nyi.internal [10.202.2.46])
 by mailout.nyi.internal (Postfix) with ESMTP id 780BC5C0552;
 Mon, 27 Nov 2023 15:40:41 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162])
 by compute2.internal (MEProxy); Mon, 27 Nov 2023 15:40:41 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:sender:subject:subject:to:to; s=fm3; t=
 1701117641; x=1701204041; bh=pBwEcFRKAQggvZlJd3cTd2JzTHxrSIGAIaA
 FByI+lYk=; b=RTmzkLqbWGViCL06nHdsRIGCW648K8vpnaIkjsp95E/exPPooi4
 ptRqotkXnmIjqB7LusH91A+te5kojEJE9GSKiwnWSxbXDXRn5s4oJZkgZEC2gwS/
 JZ8+bWRwDuvqDIJqmt2YbD7i1QIUg6v5xHgjvUQsS1yE1BRXUkPl/Nd7Yp9RFwPe
 g+pOlEuJyjNux+CocQ0MqUnJwDvUaYY634yOg5dzGUAMXxHiM9FrXdhx3Emo/VUB
 Lf5pUVXZsU3A++ueRIMj4nDZpIVShE0qMOjIwM9O9XET/isaJnbfDR2lFKy5EWbZ
 4ooC5hHUp68kmBzX4zaUNtWFZEVc4ijMjpg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:sender:subject:subject:to:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=
 1701117641; x=1701204041; bh=pBwEcFRKAQggvZlJd3cTd2JzTHxrSIGAIaA
 FByI+lYk=; b=AnNFMsYatjjhxS+SCaFuyz9V1ZlX9JS/NbE0pdIPZrN890QLi9l
 1CN1NeX669inTUgny9q0OL3eOaRE0ogYudyB8eH7k5nFamD6IiGN/B+HvUYRD63z
 Liz3yy3pUcBd4YpsHQQ1dfPJ+lN6+YzHqi7wTPUwrWOGGzF+A9cSzTUDUqtBxpKp
 va55s94cBJn2R+h2Oyvx8waU7V0yrcTwvVBdX4B5Nx82xetmE0yC4VFZMQ50tQ28
 3I5jadlzzT3TaxOxU6r7EJ3GgrlBg5KmJVVJIZNzmsp3OGefqVMZGjn0zUF8hB0i
 0Um+5BJrakjBDA2TK1nktJCcEsbF+2mjqmQ==
X-ME-Sender: <xms:yf5kZcOb7a5tqQ8r0YxAyY0PtESIkku6Znxi00qkfsfbg4fEW-8a4g>
 <xme:yf5kZS-g1u71egx4A0hfVL1iJGCAq3IN2wYG1re04RVFgHz1PgPsj8EiWuE1uRTUF
 BpadG9a5-aaexfkA3Y>
X-ME-Received: <xmr:yf5kZTTGAOoH8RTyNZFVdioNdQ0dB5XLSBrrVcoLcfVRu0elLiLKxhwMjI6-uGRZuZOOeA>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudeiuddgudegudcutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhm
 ihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrg
 htthgvrhhnpeeigfetveehveevffehledtueekieeikeeufeegudfgfeeghfdulefgfeev
 ledvveenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe
 gumhhithhrhiesghhuthhovhdruggvvh
X-ME-Proxy: <xmx:yf5kZUuIOmkORVodEc6htD7Cy6MYasF_arOZoiLrGx4kCUz_DEGNBw>
 <xmx:yf5kZUcux0_IjeyqcQSYefhY_0ZkbXRdDGO3WPZKv2h8QzhIZxIZeQ>
 <xmx:yf5kZY0avacogU1Kb3JzqmdwqrDBdkLIHPgy7xsTe7ZLA1zvjjgM3w>
 <xmx:yf5kZQEyYE6PRtWaRm5Caz9GkrSohzD7q0qKiRpavINvwX2Jv1nOLw>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon,
 27 Nov 2023 15:40:39 -0500 (EST)
Message-ID: <94d96409-688b-b842-8efd-5562cb5715e4@HIDDEN>
Date: Mon, 27 Nov 2023 22:40:35 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
 Thunderbird/102.13.0
Content-Language: en-US
References: <87zfz09q9d.fsf@HIDDEN>
 <f01c770d-67b4-c811-e039-6b6ebf66f60e@HIDDEN>
 <87wmu49lgv.fsf@HIDDEN> <83a5qz9ysx.fsf@HIDDEN>
 <87wmu3gdrz.fsf@HIDDEN>
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <87wmu3gdrz.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.9 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.9 (---)

On 27/11/2023 22:08, Jens Schmidt wrote:
> A very conservative aproach to keep that knowledge of such modes would
> be something along the following lines:

Or a less conservative approach: rebind the key in all modes where its 
clear that they handle the outside-of-comments refilling themselves.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#67462: 30.0.50; prog-fill-reindent-defun does not respect buffer-local fill-paragraph-function
Resent-From: Dmitry Gutov <dmitry@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 27 Nov 2023 20:47:02 +0000
Resent-Message-ID: <handler.67462.B67462.1701118010713 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 67462
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Jens Schmidt <jschmidt4gnu@HIDDEN>
Cc: 67462 <at> debbugs.gnu.org
Received: via spool by 67462-submit <at> debbugs.gnu.org id=B67462.1701118010713
          (code B ref 67462); Mon, 27 Nov 2023 20:47:02 +0000
Received: (at 67462) by debbugs.gnu.org; 27 Nov 2023 20:46:50 +0000
Received: from localhost ([127.0.0.1]:44950 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1r7iVG-0000BQ-3p
	for submit <at> debbugs.gnu.org; Mon, 27 Nov 2023 15:46:50 -0500
Received: from out3-smtp.messagingengine.com ([66.111.4.27]:42879)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1r7iVD-0000B6-Py
 for 67462 <at> debbugs.gnu.org; Mon, 27 Nov 2023 15:46:48 -0500
Received: from compute5.internal (compute5.nyi.internal [10.202.2.45])
 by mailout.nyi.internal (Postfix) with ESMTP id 29B325C03EC;
 Mon, 27 Nov 2023 15:46:36 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162])
 by compute5.internal (MEProxy); Mon, 27 Nov 2023 15:46:36 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:sender:subject:subject:to:to; s=fm3; t=
 1701117996; x=1701204396; bh=U2IS+HRrHKW0qMc/GjBCtylyE40IHWX/c5/
 iJhX70/0=; b=d2c1D1xRwNI9AvFc7p5YWYvV4ekfDUmCxSzMypF4Ze9DPjC0ED5
 WIDV/1eT5s0ZOdy6cU2tCooFEg7YqH7ltTWOVal5KoDiMSheGZxYfiQzZMeWB+3W
 KUVR1E5iggNC1OSyA6V3ub+PmGT7yH1BHjcWQYN4IU3Ixuun5DFiLE+PU+I2JYsN
 bBtlXpctAd8GMHtvsbEn9fcdmZIZLpBKqmXMQv/itQw/ddO8tKwKlI8nTtqvbgyF
 tosGnpABcsxuPr45DVUdpiy0iR7wkBKNSZG9KCWukKXyuNi6mdMOproayZ0bYtmg
 b8oc8zbx1GRr0pgyRLP6NHAWHvxzJHwbSTg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:sender:subject:subject:to:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=
 1701117996; x=1701204396; bh=U2IS+HRrHKW0qMc/GjBCtylyE40IHWX/c5/
 iJhX70/0=; b=u2u6jU1xlE8AGv89792G7QZj0qEQJ0FwikfO/OyOYMAjsJywCb8
 xMQ+EOEBWXFBeOHhg8BIuM5hrvm7WsChUUpjgrYXGic9Dwu/OePzJDboP5MRyh2/
 00779qEQeYzPWuSPA1/PHGhSgknzsn7xYdBnGNthOBJaED73MIIOVu+Mi3MuGogs
 5YT23srU3vmgzwAUyfB9OB+g8KoVD8EIehfHZl8X3TY6SwyTRFkx389TlZG4kGAw
 /FUwsgNKrMRlGkYH1+9cBIs9vRrCXFPffAD4mO76HlFHAT5qB8WFQrIykpUTOkXg
 7W97qHkM7sQjuHVCbUa5xK2eHDvEbngWxuw==
X-ME-Sender: <xms:KgBlZXnoaCTlMzbXg-G1JzissxAZcmlueehIA3yApq0HW7o3eIbzRQ>
 <xme:KgBlZa3NCUffKYOq-E89aPeVV5PyBcqEm3qs81GeFSMA0HI6xoHEYsxpSZdxmznH6
 Bd7g3SjpQmCyWnN6oQ>
X-ME-Received: <xmr:KgBlZdpY0qZ24ykJUGFWusmtR7X16cxQFG2lOBJSJhXEfvpHzCywgfAqllZgILlt4LFsEg>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudeiuddgudegvdcutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuffvvehfhfgjtgfgse
 htjeertddtfeejnecuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhies
 ghhuthhovhdruggvvheqnecuggftrfgrthhtvghrnhepiefgteevheevveffheeltdeuke
 eiieekueefgedugfefgefhudelgfefveelvdevnecuvehluhhsthgvrhfuihiivgeptden
 ucfrrghrrghmpehmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghv
X-ME-Proxy: <xmx:KwBlZfkcPz30eqqd28B2lrdy0FYlBh4H5FC7K9L-VFygFNW_In41Kw>
 <xmx:KwBlZV3Qtqen32gBPBSbdf2jN83n7PdhXgt0dDuy2vg5kID55lwVwQ>
 <xmx:KwBlZevhrOQ1x1XNN2Jhm4pvPVWhj7Lt4DLljZURNStFDKTBOiBBXQ>
 <xmx:LABlZS_3G4xwClG8P96q-XONn8BLvLKKliYykO0VkeNM5OBM7yj-OQ>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon,
 27 Nov 2023 15:46:33 -0500 (EST)
Message-ID: <dab05a0f-3807-0c9f-2ebe-0c6062dc90fe@HIDDEN>
Date: Mon, 27 Nov 2023 22:46:32 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
 Thunderbird/102.13.0
Content-Language: en-US
References: <87zfz09q9d.fsf@HIDDEN>
 <f01c770d-67b4-c811-e039-6b6ebf66f60e@HIDDEN>
 <87wmu49lgv.fsf@HIDDEN> <87zfyzget1.fsf@HIDDEN>
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <87zfyzget1.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.9 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.9 (---)

On 27/11/2023 21:46, Jens Schmidt wrote:
> Jens Schmidt<jschmidt4gnu@HIDDEN>  writes:
> 
>> Dmitry Gutov<dmitry@HIDDEN>  writes:
>>
>>> 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.
>> Uh.  Good point.
> Actually, I have to correct myself here: `c-mode', even though deriving
> from `prog-mode', goes at lengths to not use the derived binding of M-q,
> but rather binds it directly:
> 
>    ;; It doesn't suffice to put `c-fill-paragraph' on
>    ;; `fill-paragraph-function' since `c-fill-paragraph' must be called
>    ;; before any fill prefix adaption is done.  E.g. `filladapt-mode'
>    ;; replaces `fill-paragraph' and does the adaption before calling
>    ;; `fill-paragraph-function', and we have to mask comments etc
>    ;; before that.  Also, `c-fill-paragraph' chains on to
>    ;; `fill-paragraph' and the value on `fill-paragraph-function' to
>    ;; do the actual filling work.
>    (substitute-key-definition 'fill-paragraph 'c-fill-paragraph
> 			     c-mode-base-map global-map)
> 
> So `prog-fill-reindent-defun' wouldn't be bound in `c-mode' buffers,
> anyway.  The same seems to hold for `awk-mode', `c++-mode' and probably
> other modes in that family.

Fair counterpoint.

We can take instead emacs-lisp-mode as an example: it has 
fill-paragraph-function defined (lisp-fill-paragraph) which only works 
in strings and comments.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#67462: 30.0.50; prog-fill-reindent-defun does not respect buffer-local fill-paragraph-function
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 27 Nov 2023 20:57:02 +0000
Resent-Message-ID: <handler.67462.B67462.17011185781965 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 67462
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Jens Schmidt <jschmidt4gnu@HIDDEN>
Cc: 67462 <at> debbugs.gnu.org, dmitry@HIDDEN
Received: via spool by 67462-submit <at> debbugs.gnu.org id=B67462.17011185781965
          (code B ref 67462); Mon, 27 Nov 2023 20:57:02 +0000
Received: (at 67462) by debbugs.gnu.org; 27 Nov 2023 20:56:18 +0000
Received: from localhost ([127.0.0.1]:44964 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1r7ieP-0000Vd-Uc
	for submit <at> debbugs.gnu.org; Mon, 27 Nov 2023 15:56:18 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:40380)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1r7ieN-0000VP-9S
 for 67462 <at> debbugs.gnu.org; Mon, 27 Nov 2023 15:56:16 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1r7ieB-0000z5-9c; Mon, 27 Nov 2023 15:56:03 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=nYeSF/rFNJkWAY1tio4stsR2Qbk7YZlRSlNPWv3KFZo=; b=bR5wzvv+F2vA
 1B7c3CRUXSKyHfPD7Nn32tUmtZkXtgo2sGDf316qd6k1mRVz6F6wqheRS4mWlkP28y0oB9u/EnEGQ
 RuryzFIv+3tAi2HnGjPQxif0QwtkW8SidcQycnrygFU2CE2znd2g12Z+UwTmzNtwoCeaNQWxb0yAq
 NHxgOU7KxvOnMD6IEGGsRmqYmkdMd6pCm3hXWLUl+c2/PkioFaKSnZWepTi97rDJhaBXOth/fMHCT
 HCfpHeZVXap4VtpJYof0NvDGjOiRNRQTyOgDh2NgAw/BYTXSE+1yY94jtkIV9rFV9gPuNWHCME3kO
 WleLW6RSJ7vD0f96XwnVIA==;
Date: Mon, 27 Nov 2023 22:55:48 +0200
Message-Id: <83il5m9aqz.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <87wmu3gdrz.fsf@HIDDEN> (message from Jens Schmidt on
 Mon, 27 Nov 2023 21:08:32 +0100)
References: <87zfz09q9d.fsf@HIDDEN>
 <f01c770d-67b4-c811-e039-6b6ebf66f60e@HIDDEN>
 <87wmu49lgv.fsf@HIDDEN> <83a5qz9ysx.fsf@HIDDEN>
 <87wmu3gdrz.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Jens Schmidt <jschmidt4gnu@HIDDEN>
> Cc: 67462 <at> debbugs.gnu.org,  dmitry@HIDDEN
> Date: Mon, 27 Nov 2023 21:08:32 +0100
> 
> Eli Zaretskii <eliz@HIDDEN> writes:
> 
> >>   cfengine-fill-paragraph
> >>   f90-fill-paragraph
> >>   fortran-fill-paragraph
> >>   makefile-fill-paragraph
> >>   octave-fill-paragraph
> >>
> >> I could be wrong with that list, though, and I cannot tell how useful
> >> these functions are outside of comments.  I just looked at docstrings or
> >> for a prominent
> >>
> >>   (or (fill-comment-paragraph justify)
> >>       (do-something ...))
> >>
> >> pattern.
> >
> > What would it take to teach prog-fill-reindent-defun to DTRT outside
> > comments and strings?

(I meant "inside", sorry.)

> IMO the problem here is that some modes already have an idea of what
> could be TRT outside comments and strings, implemented in a
> mode-specific fill-paragraph-function.

But isn't filling inside comments and strings basically very similar
in these modes?




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#67462: 30.0.50; prog-fill-reindent-defun does not respect buffer-local fill-paragraph-function
Resent-From: Jens Schmidt <jschmidt4gnu@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 28 Nov 2023 21:11:02 +0000
Resent-Message-ID: <handler.67462.B67462.170120584519445 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 67462
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 67462 <at> debbugs.gnu.org, dmitry@HIDDEN
Received: via spool by 67462-submit <at> debbugs.gnu.org id=B67462.170120584519445
          (code B ref 67462); Tue, 28 Nov 2023 21:11:02 +0000
Received: (at 67462) by debbugs.gnu.org; 28 Nov 2023 21:10:45 +0000
Received: from localhost ([127.0.0.1]:47891 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1r85Lx-00053Z-6I
	for submit <at> debbugs.gnu.org; Tue, 28 Nov 2023 16:10:45 -0500
Received: from mr4.vodafonemail.de ([145.253.228.164]:57330)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jschmidt4gnu@HIDDEN>) id 1r85Ls-00053H-GP
 for 67462 <at> debbugs.gnu.org; Tue, 28 Nov 2023 16:10:44 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de;
 s=vfde-mb-mr2-23sep; t=1701205827;
 bh=cbR9WSLH+Sx5R4883Mm2zdaLDi3HA6ju3W2AHAA4fcQ=;
 h=From:To:Subject:References:Date:In-Reply-To:Message-ID:User-Agent:
 Content-Type:From;
 b=KD2oONMql/YjjhPIOo1EfItW6iQl5d1LoLiT9WnKqtuqkZfaEumXPpzS1luHbQ5RV
 wJCkwYuVHyvuYkzIfBpaNQH9clLCvRPoasC5/s9ysu0T6hBtVRnv/+uP6JrXvXfVaw
 k9/Hjau4urDD3+VGAh6vZovhsBuKH0uqvIdX/eck=
Received: from smtp.vodafone.de (unknown [10.0.0.2])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by mr4.vodafonemail.de (Postfix) with ESMTPS id 4Sfw8g6nzqz1xxB;
 Tue, 28 Nov 2023 21:10:27 +0000 (UTC)
Received: from sappc2 (port-92-196-51-33.dynamic.as20676.net [92.196.51.33])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits)
 server-digest SHA256) (No client certificate requested)
 by smtp.vodafone.de (Postfix) with ESMTPSA id 4Sfw8T2ytMzMkrt;
 Tue, 28 Nov 2023 21:10:14 +0000 (UTC)
From: Jens Schmidt <jschmidt4gnu@HIDDEN>
References: <87zfz09q9d.fsf@HIDDEN>
 <f01c770d-67b4-c811-e039-6b6ebf66f60e@HIDDEN>
 <87wmu49lgv.fsf@HIDDEN> <83a5qz9ysx.fsf@HIDDEN>
 <87wmu3gdrz.fsf@HIDDEN> <83il5m9aqz.fsf@HIDDEN>
Date: Tue, 28 Nov 2023 22:10:13 +0100
In-Reply-To: <83il5m9aqz.fsf@HIDDEN> (Eli Zaretskii's message of "Mon, 27 Nov
 2023 22:55:48 +0200")
Message-ID: <87jzq1bn4a.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-purgate-type: clean
X-purgate: clean
X-purgate-size: 1103
X-purgate-ID: 155817::1701205823-2B7FB6E3-CE4EE622/0/0
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

>> From: Jens Schmidt <jschmidt4gnu@HIDDEN>
>> Cc: 67462 <at> debbugs.gnu.org,  dmitry@HIDDEN
>> Date: Mon, 27 Nov 2023 21:08:32 +0100
>>
>> Eli Zaretskii <eliz@HIDDEN> writes:
>>
>> >
>> > What would it take to teach prog-fill-reindent-defun to DTRT outside
>> > comments and strings?
>
> (I meant "inside", sorry.)
>
>> IMO the problem here is that some modes already have an idea of what
>> could be TRT outside comments and strings, implemented in a
>> mode-specific fill-paragraph-function.
>
> But isn't filling inside comments and strings basically very similar
> in these modes?

You lost me here, sorry.

*Inside* comments and strings I don't see any issues: In these the
result of M-q should be identical before or after commit b889eced4449
introduced function `prog-fill-reindent-defun'.  Because inside comment
and strings `prog-fill-reindent-defun' just forwards to
`fill-paragraph'.

It's outside comment and strings where behavior can differ.  Or where
behavior actually differs, as shown in my initial report.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#67462: 30.0.50; prog-fill-reindent-defun does not respect buffer-local fill-paragraph-function
Resent-From: Jens Schmidt <jschmidt4gnu@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 28 Nov 2023 21:29:01 +0000
Resent-Message-ID: <handler.67462.B67462.170120692723228 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 67462
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Dmitry Gutov <dmitry@HIDDEN>
Cc: 67462 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
Received: via spool by 67462-submit <at> debbugs.gnu.org id=B67462.170120692723228
          (code B ref 67462); Tue, 28 Nov 2023 21:29:01 +0000
Received: (at 67462) by debbugs.gnu.org; 28 Nov 2023 21:28:47 +0000
Received: from localhost ([127.0.0.1]:48341 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1r85dP-00062a-9a
	for submit <at> debbugs.gnu.org; Tue, 28 Nov 2023 16:28:47 -0500
Received: from mr4.vodafonemail.de ([145.253.228.164]:36386)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jschmidt4gnu@HIDDEN>) id 1r85dN-00062N-8f
 for 67462 <at> debbugs.gnu.org; Tue, 28 Nov 2023 16:28:46 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de;
 s=vfde-mb-mr2-23sep; t=1701206912;
 bh=nWC5Fun7oVPOPrtXmIdwaOZASfMXKdHgZbzij9wlEKw=;
 h=From:To:Subject:References:Date:In-Reply-To:Message-ID:User-Agent:
 Content-Type:From;
 b=ez5t1tXC6yRTLK+JvZbtCx6b5MBPQYvmKmhheyEhiRMu4K/t+E9HEWa/yqOPgj/h6
 68/v9HFxwVuTQ+R+GvXmfYNHLA/vX3AxNE92fVPDQIBFbB4kU6dsj6CXQVqSZga5Ph
 JMSwmg7gb/3sj421Dcty3BirRDe8U9OMUIieHAyU=
Received: from smtp.vodafone.de (unknown [10.0.0.2])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by mr4.vodafonemail.de (Postfix) with ESMTPS id 4SfwYX4ch8z1xp5;
 Tue, 28 Nov 2023 21:28:32 +0000 (UTC)
Received: from sappc2 (port-92-196-51-33.dynamic.as20676.net [92.196.51.33])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits)
 server-digest SHA256) (No client certificate requested)
 by smtp.vodafone.de (Postfix) with ESMTPSA id 4SfwYL1tmxzMks9;
 Tue, 28 Nov 2023 21:28:19 +0000 (UTC)
From: Jens Schmidt <jschmidt4gnu@HIDDEN>
References: <87zfz09q9d.fsf@HIDDEN>
 <f01c770d-67b4-c811-e039-6b6ebf66f60e@HIDDEN>
 <87wmu49lgv.fsf@HIDDEN> <83a5qz9ysx.fsf@HIDDEN>
 <87wmu3gdrz.fsf@HIDDEN>
 <94d96409-688b-b842-8efd-5562cb5715e4@HIDDEN>
Date: Tue, 28 Nov 2023 22:28:18 +0100
In-Reply-To: <94d96409-688b-b842-8efd-5562cb5715e4@HIDDEN> (Dmitry Gutov's
 message of "Mon, 27 Nov 2023 22:40:35 +0200")
Message-ID: <87h6l5bma5.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-purgate-type: clean
X-purgate: clean
X-purgate-size: 846
X-purgate-ID: 155817::1701206908-577FF24F-E57AA120/0/0
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Dmitry Gutov <dmitry@HIDDEN> writes:

> On 27/11/2023 22:08, Jens Schmidt wrote:
>> A very conservative aproach to keep that knowledge of such modes would
>> be something along the following lines:
>
> Or a less conservative approach: rebind the key in all modes
> where its clear that they handle the outside-of-comments
> refilling themselves.

Right.  You basically propose an opt-out of a new feature (which *could*
break work flows), I propose an opt-in.  IMO the opt-out would have the
disadvantage that all the major modes on *ELPA or elsewhere would not be
covered.

If we go for the opt-out, probably the NEWS entry for command
`prog-fill-reindent-defun' should be updated to mention that M-q could
be rebound to `fill-paragraph' should the new command not have the
desired effect?  Or does that go without saying?




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#67462: 30.0.50; prog-fill-reindent-defun does not respect buffer-local fill-paragraph-function
Resent-From: Dmitry Gutov <dmitry@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 28 Nov 2023 21:42:02 +0000
Resent-Message-ID: <handler.67462.B67462.170120771324783 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 67462
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Jens Schmidt <jschmidt4gnu@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>
Cc: 67462 <at> debbugs.gnu.org
Received: via spool by 67462-submit <at> debbugs.gnu.org id=B67462.170120771324783
          (code B ref 67462); Tue, 28 Nov 2023 21:42:02 +0000
Received: (at 67462) by debbugs.gnu.org; 28 Nov 2023 21:41:53 +0000
Received: from localhost ([127.0.0.1]:48374 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1r85q4-0006Re-Ok
	for submit <at> debbugs.gnu.org; Tue, 28 Nov 2023 16:41:53 -0500
Received: from out2-smtp.messagingengine.com ([66.111.4.26]:32913)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1r85q1-0006RP-0B
 for 67462 <at> debbugs.gnu.org; Tue, 28 Nov 2023 16:41:50 -0500
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
 by mailout.nyi.internal (Postfix) with ESMTP id B2A625C0186;
 Tue, 28 Nov 2023 16:41:36 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162])
 by compute1.internal (MEProxy); Tue, 28 Nov 2023 16:41:36 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:sender:subject:subject:to:to; s=fm3; t=
 1701207696; x=1701294096; bh=K8vhVtNbjO/eJ1DmIPUycZANIi+PbdwNVLa
 lyjCSqQM=; b=D1xc5h53YZ6D/KqlPvOmLFc1TsjWRfsAmYaXxji8RrcADalecQy
 eToYjj+HZBSUwaz/CU/wdzOYkqi2XcwRTk2YoMYY5UASPJlXj/RFsCa5DptTcnxt
 8zdW+gkYPWxnrIUkh3JlfL3CTYkhliUPoXl84o320UuOI5/Ox7zYqe2/DKDl8qmm
 EATkQJeaSFV0xalOJ+gVUbaupF5fP3Jh24sPFsQbLmYWP7FV7sNBcxAKdNKCu0WJ
 b3TIIf+PdQ2aaUQbZdClzpnpIeWnkVfo9dmJxWL4bpebzMgNlIeD4ymg1dEYyPgG
 3548E9azLc9NHk2sqXt6BtJJYewcWoQzM9w==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:sender:subject:subject:to:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=
 1701207696; x=1701294096; bh=K8vhVtNbjO/eJ1DmIPUycZANIi+PbdwNVLa
 lyjCSqQM=; b=q33mVGyFu2Md5WGSuy27zC83SgO/5usMPAYhK20DtFiCpmXAURU
 XFmO7ssSXbH97L2lTv/pZ91DFfXXpkpC/QmIBOD1kYW7lzvbGM5Ez+qwmqv2BYE2
 4yYRNrnsUo9b3WOa+WVJAIy9Ld+3XQRJzuOWA/ClY7wxKlmvuvFjF83i8ZBC/9Sw
 FYJ3v/KCf5XPV7DCSZXCUkNYd+c0S7IuKeXbn6+b+RHJ6rB0MYCPPunb07LO/ItD
 JzemBTP6lFeP3Dzpfe3xrAIkwMyWFblGCPEoCax2yolEHPAOIiBeNEcAqVqTsNe3
 wUzR4QWXoJiCLOevZPPRtScWfT3LDZeBkNQ==
X-ME-Sender: <xms:j15mZQcHloAvjsEZuHmKA_nXBUXayk7MTGWACwjJr-8nso2KeJYHbQ>
 <xme:j15mZSNkm161TEFNB10kl8DvHOZz-x80J5FEI6pM_SAU3sgyT2EK2kwrDCOZ6WkAn
 fX_XqeohEHaGXDAws4>
X-ME-Received: <xmr:j15mZRhtxYWHLlB4K0xfZx7holXm_KIGd0VXo07MP1l192yPMCS-RlviCuKf9NhorAmLoA>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudeifedgudehtdcutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhm
 ihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrg
 htthgvrhhnpeeigfetveehveevffehledtueekieeikeeufeegudfgfeeghfdulefgfeev
 ledvveenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe
 gumhhithhrhiesghhuthhovhdruggvvh
X-ME-Proxy: <xmx:kF5mZV9vFvzReS_CrqYDpJEriTejYX1l6JZAEBvCz5q-29ltl2frZQ>
 <xmx:kF5mZcuJdMc8-a4ifMCdVUtBjg7WE81lpyUsoBjeUWrk6XjQKHzYRg>
 <xmx:kF5mZcGpdTI7baUAdfVN4eIe96aE9u7kdDNS2X9Xi5TAJP2yvGg1LQ>
 <xmx:kF5mZZVnIqOlHuHHdy9_afNPSyDvsICqUIe04nGbjjyUuE-gf9glRg>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue,
 28 Nov 2023 16:41:34 -0500 (EST)
Message-ID: <018d9bbd-23f7-726b-fe51-fb1456ffd234@HIDDEN>
Date: Tue, 28 Nov 2023 23:41:32 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
 Thunderbird/102.13.0
Content-Language: en-US
References: <87zfz09q9d.fsf@HIDDEN>
 <f01c770d-67b4-c811-e039-6b6ebf66f60e@HIDDEN>
 <87wmu49lgv.fsf@HIDDEN> <83a5qz9ysx.fsf@HIDDEN>
 <87wmu3gdrz.fsf@HIDDEN> <83il5m9aqz.fsf@HIDDEN>
 <87jzq1bn4a.fsf@HIDDEN>
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <87jzq1bn4a.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.9 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.9 (---)

On 28/11/2023 23:10, Jens Schmidt wrote:
> It's outside comment and strings where behavior can differ.  Or where
> behavior actually differs, as shown in my initial report.

Could you perhaps study and summarize the useful parts of those modes' 
fill-paragraph-function's outside of strings and comments?

Perhaps they are similar enough to what prog-fill-reindent-defun does 
already. Or perhaps there's some useful bit of behavior that could be 
promoted. Or maybe there is a specific step which differs in many of 
them, which could be separately made customizable.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#67462: 30.0.50; prog-fill-reindent-defun does not respect buffer-local fill-paragraph-function
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 29 Nov 2023 12:40:01 +0000
Resent-Message-ID: <handler.67462.B67462.170126154432624 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 67462
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Jens Schmidt <jschmidt4gnu@HIDDEN>
Cc: 67462 <at> debbugs.gnu.org, dmitry@HIDDEN
Received: via spool by 67462-submit <at> debbugs.gnu.org id=B67462.170126154432624
          (code B ref 67462); Wed, 29 Nov 2023 12:40:01 +0000
Received: (at 67462) by debbugs.gnu.org; 29 Nov 2023 12:39:04 +0000
Received: from localhost ([127.0.0.1]:49065 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1r8JqJ-0008U7-FP
	for submit <at> debbugs.gnu.org; Wed, 29 Nov 2023 07:39:04 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:55474)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1r8JqH-0008TY-9x
 for 67462 <at> debbugs.gnu.org; Wed, 29 Nov 2023 07:39:02 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1r8Jq2-0003LF-IU; Wed, 29 Nov 2023 07:38:47 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=2M2jrguLBcIpfxPKsi+Ca3XHIgmHs0i5XrpnorNSei8=; b=oP8c/FtcwAws
 VjK49A5kQLT/c11JYOHwyCY6DjV7t00Mz3u8UJUaPebeRknx8hC8GxJ+n9ZW+grDxYYhsWSW5N6mH
 I6VparbwKbYiqOxbGBPpksFdTzRPafnrNTnY8+kvlE0sIXM+1qUu4AiLL5BNHPCerHhm9d0JXSk4H
 BkYGoMB0n54292vObCqg4flCXTcFJCbAe7j7UcWlK2KaThSSL6R33Tf7srCyOhWQSQSA7W8RHTxTY
 tS2CsndICq7mXQoMHzuxOI2oV90utebeVfVXgJhWNvHz8C31vFQD8SW5xWpNfMeQI1QZjwyffekcg
 miEskaH87vCFJXLv2D3hIw==;
Date: Wed, 29 Nov 2023 14:38:33 +0200
Message-Id: <83sf4o7n06.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <87jzq1bn4a.fsf@HIDDEN> (message from Jens Schmidt on
 Tue, 28 Nov 2023 22:10:13 +0100)
References: <87zfz09q9d.fsf@HIDDEN>
 <f01c770d-67b4-c811-e039-6b6ebf66f60e@HIDDEN>
 <87wmu49lgv.fsf@HIDDEN> <83a5qz9ysx.fsf@HIDDEN>
 <87wmu3gdrz.fsf@HIDDEN> <83il5m9aqz.fsf@HIDDEN>
 <87jzq1bn4a.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Jens Schmidt <jschmidt4gnu@HIDDEN>
> Cc: 67462 <at> debbugs.gnu.org,  dmitry@HIDDEN
> Date: Tue, 28 Nov 2023 22:10:13 +0100
> 
> Eli Zaretskii <eliz@HIDDEN> writes:
> 
> >> From: Jens Schmidt <jschmidt4gnu@HIDDEN>
> >> Cc: 67462 <at> debbugs.gnu.org,  dmitry@HIDDEN
> >> Date: Mon, 27 Nov 2023 21:08:32 +0100
> >>
> >> Eli Zaretskii <eliz@HIDDEN> writes:
> >>
> >> >
> >> > What would it take to teach prog-fill-reindent-defun to DTRT outside
> >> > comments and strings?
> >
> > (I meant "inside", sorry.)
> >
> >> IMO the problem here is that some modes already have an idea of what
> >> could be TRT outside comments and strings, implemented in a
> >> mode-specific fill-paragraph-function.
> >
> > But isn't filling inside comments and strings basically very similar
> > in these modes?
> 
> You lost me here, sorry.
> 
> *Inside* comments and strings I don't see any issues: In these the
> result of M-q should be identical before or after commit b889eced4449
> introduced function `prog-fill-reindent-defun'.  Because inside comment
> and strings `prog-fill-reindent-defun' just forwards to
> `fill-paragraph'.
> 
> It's outside comment and strings where behavior can differ.  Or where
> behavior actually differs, as shown in my initial report.

And you are saying that prog-fill-reindent-defun cannot be easily
taught to DTRT outside of comments and strings, and that the only
feasible approach is to reuse the old mode-specific functions in that
case?  I'm not sure I understand why is that, since the doc string of
prog-fill-reindent-defun says:

  If the point is in a string or a comment, fill the paragraph that
  contains point or follows point.

  Otherwise, reindent the function definition that contains point
  or follows point.

And its code does:

      (if (or treesit-text-node
              (nth 8 (syntax-ppss))
              (re-search-forward "\\s-*\\s<" (line-end-position) t))
          (fill-paragraph argument (region-active-p))
        (beginning-of-defun)
        (let ((start (point)))
          (end-of-defun)
          (indent-region start (point) nil))))))

So you are saying that indent-region doesn't do its job in some/many
major modes?  Can we fix that?  Or what am I missing now?




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#67462: 30.0.50; prog-fill-reindent-defun does not respect buffer-local fill-paragraph-function
Resent-From: Jens Schmidt <jschmidt4gnu@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 29 Nov 2023 21:30:01 +0000
Resent-Message-ID: <handler.67462.B67462.17012933602822 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 67462
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 67462 <at> debbugs.gnu.org, dmitry@HIDDEN
Received: via spool by 67462-submit <at> debbugs.gnu.org id=B67462.17012933602822
          (code B ref 67462); Wed, 29 Nov 2023 21:30:01 +0000
Received: (at 67462) by debbugs.gnu.org; 29 Nov 2023 21:29:20 +0000
Received: from localhost ([127.0.0.1]:51620 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1r8S7T-0000jR-TG
	for submit <at> debbugs.gnu.org; Wed, 29 Nov 2023 16:29:20 -0500
Received: from mr6.vodafonemail.de ([145.253.228.166]:40050)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jschmidt4gnu@HIDDEN>) id 1r8S7R-0000jE-BZ
 for 67462 <at> debbugs.gnu.org; Wed, 29 Nov 2023 16:29:18 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de;
 s=vfde-mb-mr2-23sep; t=1701293344;
 bh=FX8sG7WLZ+RP4ittndPbkK5o3XYSQoKsgzvEM3bgSVI=;
 h=From:To:Subject:References:Date:In-Reply-To:Message-ID:User-Agent:
 Content-Type:From;
 b=Vk4W7TAw1BUG529DvT3Yt0HvX1m4tlKVA1mgnM97d59kjUMxp1Za5BTdcVb3iM3qi
 G6WDP52NiWUHt0DrObguWecSTz3tquWTVr25H10UGkS4GYbalNIURfDl6N5/zvD8tF
 irJ1RuBONE4Y8Iz9Xx4vL9+Bl+a4tAV8QjDNFpxg=
Received: from smtp.vodafone.de (unknown [10.0.0.2])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by mr6.vodafonemail.de (Postfix) with ESMTPS id 4SgXWh07Sfz1xy0;
 Wed, 29 Nov 2023 21:29:03 +0000 (UTC)
Received: from sappc2 (port-92-196-20-231.dynamic.as20676.net [92.196.20.231])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits)
 server-digest SHA256) (No client certificate requested)
 by smtp.vodafone.de (Postfix) with ESMTPSA id 4SgXWT29v8zMkrx;
 Wed, 29 Nov 2023 21:28:50 +0000 (UTC)
From: Jens Schmidt <jschmidt4gnu@HIDDEN>
References: <87zfz09q9d.fsf@HIDDEN>
 <f01c770d-67b4-c811-e039-6b6ebf66f60e@HIDDEN>
 <87wmu49lgv.fsf@HIDDEN> <83a5qz9ysx.fsf@HIDDEN>
 <87wmu3gdrz.fsf@HIDDEN> <83il5m9aqz.fsf@HIDDEN>
 <87jzq1bn4a.fsf@HIDDEN> <83sf4o7n06.fsf@HIDDEN>
Date: Wed, 29 Nov 2023 22:28:49 +0100
In-Reply-To: <83sf4o7n06.fsf@HIDDEN> (Eli Zaretskii's message of "Wed, 29 Nov
 2023 14:38:33 +0200")
Message-ID: <87cyvsxn8u.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-purgate-type: clean
X-purgate: clean
X-purgate-size: 555
X-purgate-ID: 155817::1701293339-14FF424F-AC7D7E4A/0/0
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

> So you are saying that indent-region doesn't do its job in some/many
> major modes?  Can we fix that?  Or what am I missing now?

No, indent-region does a good job and there is nothing to fix here.  But
starting with Emacs 30 it does that job (also) on M-q, where previously
other functionality may have been bound.

To see the difference, please try executing in Emacs 29 vs master on
Emacs's own, configured Makefile:

  ./src/emacs -Q Makefile --eval '(search-forward "SUBDIR_MAKEFILES_IN")'
  M-q





Last modified: Wed, 29 Nov 2023 21:30:02 UTC

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