From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#67462: 30.0.50; prog-fill-reindent-defun does not respect buffer-local fill-paragraph-function Date: Mon, 27 Nov 2023 22:46:32 +0200 Message-ID: References: <87zfz09q9d.fsf@sappc2.fritz.box> <87wmu49lgv.fsf@sappc2.fritz.box> <87zfyzget1.fsf@sappc2.fritz.box> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12015"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cc: 67462@debbugs.gnu.org To: Jens Schmidt Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 27 21:47:14 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1r7iVd-0002sc-Qs for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 27 Nov 2023 21:47:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r7iVN-00011Y-Ge; Mon, 27 Nov 2023 15:46:57 -0500 Original-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 ) id 1r7iVL-00010m-Vn for bug-gnu-emacs@gnu.org; Mon, 27 Nov 2023 15:46:56 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r7iVL-0007Bj-N0 for bug-gnu-emacs@gnu.org; Mon, 27 Nov 2023 15:46:55 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r7iVS-0000CG-59 for bug-gnu-emacs@gnu.org; Mon, 27 Nov 2023 15:47:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 27 Nov 2023 20:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67462 X-GNU-PR-Package: emacs Original-Received: via spool by 67462-submit@debbugs.gnu.org id=B67462.1701118010713 (code B ref 67462); Mon, 27 Nov 2023 20:47:02 +0000 Original-Received: (at 67462) by debbugs.gnu.org; 27 Nov 2023 20:46:50 +0000 Original-Received: from localhost ([127.0.0.1]:44950 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r7iVG-0000BQ-3p for submit@debbugs.gnu.org; Mon, 27 Nov 2023 15:46:50 -0500 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]:42879) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r7iVD-0000B6-Py for 67462@debbugs.gnu.org; Mon, 27 Nov 2023 15:46:48 -0500 Original-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) Original-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: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudeiuddgudegvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuffvvehfhfgjtgfgse htjeertddtfeejnecuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhies ghhuthhovhdruggvvheqnecuggftrfgrthhtvghrnhepiefgteevheevveffheeltdeuke eiieekueefgedugfefgefhudelgfefveelvdevnecuvehluhhsthgvrhfuihiivgeptden ucfrrghrrghmpehmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 27 Nov 2023 15:46:33 -0500 (EST) Content-Language: en-US In-Reply-To: <87zfyzget1.fsf@sappc2.fritz.box> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:275151 Archived-At: On 27/11/2023 21:46, Jens Schmidt wrote: > Jens Schmidt writes: > >> Dmitry Gutov 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.