From unknown Fri Jun 20 18:25:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6890: 23.1; makefile-fill-paragraph doesn't leave space for backslashes Resent-From: Kirk Kelsey Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Aug 2010 21:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 6890 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 6890@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.128233978021553 (code B ref -1); Fri, 20 Aug 2010 21:30:03 +0000 Received: (at submit) by debbugs.gnu.org; 20 Aug 2010 21:29:40 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OmZ9f-0005ba-NQ for submit@debbugs.gnu.org; Fri, 20 Aug 2010 17:29:39 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OmZ5X-0005YU-Gq for submit@debbugs.gnu.org; Fri, 20 Aug 2010 17:25:24 -0400 Received: from lists.gnu.org ([199.232.76.165]:41621) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OmZ6f-0004kO-Sx for submit@debbugs.gnu.org; Fri, 20 Aug 2010 17:26:33 -0400 Received: from [140.186.70.92] (port=55637 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OmZ6e-0000F1-A3 for bug-gnu-emacs@gnu.org; Fri, 20 Aug 2010 17:26:33 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,HTML_MESSAGE autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OmZ6d-00030b-2H for bug-gnu-emacs@gnu.org; Fri, 20 Aug 2010 17:26:32 -0400 Received: from mail-ey0-f169.google.com ([209.85.215.169]:54166) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OmZ6c-00030H-TH for bug-gnu-emacs@gnu.org; Fri, 20 Aug 2010 17:26:31 -0400 Received: by eyg7 with SMTP id 7so2621578eyg.0 for ; Fri, 20 Aug 2010 14:26:29 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.87.209 with SMTP id y59mr1756712wee.91.1282339588771; Fri, 20 Aug 2010 14:26:28 -0700 (PDT) Received: by 10.216.73.20 with HTTP; Fri, 20 Aug 2010 14:26:28 -0700 (PDT) Date: Fri, 20 Aug 2010 17:26:28 -0400 Message-ID: From: Kirk Kelsey Content-Type: multipart/alternative; boundary=0016e6d6454bab8f73048e47f3b0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -5.1 (-----) X-Mailman-Approved-At: Fri, 20 Aug 2010 17:29:38 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) --0016e6d6454bab8f73048e47f3b0 Content-Type: text/plain; charset=ISO-8859-1 Using makefile-fill-paragraph on text in which some lines fit precisely within the fill-column will fill past the fill-column. The problem stems from the direct use of fill-paragraph-function followed by makefile-backslash-region, which inserts more text on each line. I think this can be solved by decrementing fill-column before invoking fill-paragraph-function, and I've included a patch to that effect. Thanks, Kirk --- make-mode.el 2010-08-20 16:51:46.253395990 -0400 +++ make-mode-patch.el 2010-08-20 16:53:08.985392193 -0400 @@ -1323,7 +1323,9 @@ (save-restriction (narrow-to-region beginning end) (makefile-backslash-region (point-min) (point-max) t) - (let ((fill-paragraph-function nil)) + (let ((fill-paragraph-function nil) + ;; adjust fill-column to allow space for the backslash + (fill-column (- fill-column 1))) (fill-paragraph nil)) (makefile-backslash-region (point-min) (point-max) nil) (goto-char (point-max)) --0016e6d6454bab8f73048e47f3b0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Using makefile-fill-paragraph on text in which some lines fit precisel= y within
the fill-column will fill past the fill-column. The prob= lem stems from the
direct use of fill-paragraph-function followed= by makefile-backslash-region,
which inserts more text on each line. I think this can be solved by
decrementing fill-column before invoking fill-paragraph-function, a= nd I've
included a patch to that effect.

Thanks,
Kirk


--- mak= e-mode.el 2= 010-08-20 16:51:46.253395990 -0400
+++ make-mode-patch.el 2010-08-20 16:53:0= 8.985392193 -0400
@@ -1323,7 +1323,9 @@
=A0 (save-restriction
=A0 =A0(narrow-to-region be= ginning end)
=A0 = =A0(makefile-backslash-region (point-min) (point-max) t)
- =A0(let ((fill-p= aragraph-function nil))
+ =A0= (let ((fill-paragraph-function nil)
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0;; adjust fill-column to allow space for the backslash
+ =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0(fill-column (- fill-column 1)))
=A0 = =A0 =A0(fill-paragraph nil))
=A0 =A0(makefile-backslash-region (point-min) = (point-max) nil)
=A0 = =A0(goto-char (point-max))

--0016e6d6454bab8f73048e47f3b0-- From unknown Fri Jun 20 18:25:06 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Kirk Kelsey Subject: bug#6890: closed (Re: bug#6890: 23.1; makefile-fill-paragraph doesn't leave space for backslashes) Message-ID: References: X-Gnu-PR-Message: they-closed 6890 X-Gnu-PR-Package: emacs Reply-To: 6890@debbugs.gnu.org Date: Sat, 21 Aug 2010 13:09:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1282396142-23181-1" This is a multi-part message in MIME format... ------------=_1282396142-23181-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #6890: 23.1; makefile-fill-paragraph doesn't leave space for backslashes which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 6890@debbugs.gnu.org. --=20 6890: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D6890 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1282396142-23181-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 6890-done) by debbugs.gnu.org; 21 Aug 2010 13:08:06 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Omnnp-00061X-V5 for submit@debbugs.gnu.org; Sat, 21 Aug 2010 09:08:06 -0400 Received: from impaqm1.telefonica.net ([213.4.138.1]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OmkFY-0003jD-AQ for 6890-done@debbugs.gnu.org; Sat, 21 Aug 2010 05:20:29 -0400 Received: from IMPmailhost3.adm.correo ([10.20.102.124]) by IMPaqm1.telefonica.net with bizsmtp id wxFd1e0122h2L9m01xMf9K; Sat, 21 Aug 2010 11:21:39 +0200 Received: from ceviche.home ([83.61.35.93]) by IMPmailhost3.adm.correo with BIZ IMP id wxMe1e00220aCvn1jxMegl; Sat, 21 Aug 2010 11:21:38 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="monnier$movistar.es" |auth_email="monnier@movistar.es" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" Received: by ceviche.home (Postfix, from userid 20848) id F02C5660E9; Sat, 21 Aug 2010 11:21:37 +0200 (CEST) From: Stefan Monnier To: Kirk Kelsey Subject: Re: bug#6890: 23.1; makefile-fill-paragraph doesn't leave space for backslashes Message-ID: References: Date: Sat, 21 Aug 2010 11:21:37 +0200 In-Reply-To: (Kirk Kelsey's message of "Fri, 20 Aug 2010 17:26:28 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 6890-done X-Mailman-Approved-At: Sat, 21 Aug 2010 09:08:03 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > Using makefile-fill-paragraph on text in which some lines fit precisely > within > the fill-column will fill past the fill-column. The problem stems from the > direct use of fill-paragraph-function followed by makefile-backslash-region, > which inserts more text on each line. I think this can be solved by > decrementing fill-column before invoking fill-paragraph-function, and I've > included a patch to that effect. Thank you. I liked your patch so much that I've installed it twice (I've found this code at 2 places in the file). Stefan ------------=_1282396142-23181-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 20 Aug 2010 21:29:40 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OmZ9f-0005ba-NQ for submit@debbugs.gnu.org; Fri, 20 Aug 2010 17:29:39 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OmZ5X-0005YU-Gq for submit@debbugs.gnu.org; Fri, 20 Aug 2010 17:25:24 -0400 Received: from lists.gnu.org ([199.232.76.165]:41621) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OmZ6f-0004kO-Sx for submit@debbugs.gnu.org; Fri, 20 Aug 2010 17:26:33 -0400 Received: from [140.186.70.92] (port=55637 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OmZ6e-0000F1-A3 for bug-gnu-emacs@gnu.org; Fri, 20 Aug 2010 17:26:33 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,HTML_MESSAGE autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OmZ6d-00030b-2H for bug-gnu-emacs@gnu.org; Fri, 20 Aug 2010 17:26:32 -0400 Received: from mail-ey0-f169.google.com ([209.85.215.169]:54166) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OmZ6c-00030H-TH for bug-gnu-emacs@gnu.org; Fri, 20 Aug 2010 17:26:31 -0400 Received: by eyg7 with SMTP id 7so2621578eyg.0 for ; Fri, 20 Aug 2010 14:26:29 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.87.209 with SMTP id y59mr1756712wee.91.1282339588771; Fri, 20 Aug 2010 14:26:28 -0700 (PDT) Received: by 10.216.73.20 with HTTP; Fri, 20 Aug 2010 14:26:28 -0700 (PDT) Date: Fri, 20 Aug 2010 17:26:28 -0400 Message-ID: Subject: 23.1; makefile-fill-paragraph doesn't leave space for backslashes From: Kirk Kelsey To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary=0016e6d6454bab8f73048e47f3b0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -5.1 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 20 Aug 2010 17:29:38 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) --0016e6d6454bab8f73048e47f3b0 Content-Type: text/plain; charset=ISO-8859-1 Using makefile-fill-paragraph on text in which some lines fit precisely within the fill-column will fill past the fill-column. The problem stems from the direct use of fill-paragraph-function followed by makefile-backslash-region, which inserts more text on each line. I think this can be solved by decrementing fill-column before invoking fill-paragraph-function, and I've included a patch to that effect. Thanks, Kirk --- make-mode.el 2010-08-20 16:51:46.253395990 -0400 +++ make-mode-patch.el 2010-08-20 16:53:08.985392193 -0400 @@ -1323,7 +1323,9 @@ (save-restriction (narrow-to-region beginning end) (makefile-backslash-region (point-min) (point-max) t) - (let ((fill-paragraph-function nil)) + (let ((fill-paragraph-function nil) + ;; adjust fill-column to allow space for the backslash + (fill-column (- fill-column 1))) (fill-paragraph nil)) (makefile-backslash-region (point-min) (point-max) nil) (goto-char (point-max)) --0016e6d6454bab8f73048e47f3b0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Using makefile-fill-paragraph on text in which some lines fit precisel= y within
the fill-column will fill past the fill-column. The prob= lem stems from the
direct use of fill-paragraph-function followed= by makefile-backslash-region,
which inserts more text on each line. I think this can be solved by
decrementing fill-column before invoking fill-paragraph-function, a= nd I've
included a patch to that effect.

Thanks,
Kirk


--- mak= e-mode.el 2= 010-08-20 16:51:46.253395990 -0400
+++ make-mode-patch.el 2010-08-20 16:53:0= 8.985392193 -0400
@@ -1323,7 +1323,9 @@
=A0 (save-restriction
=A0 =A0(narrow-to-region be= ginning end)
=A0 = =A0(makefile-backslash-region (point-min) (point-max) t)
- =A0(let ((fill-p= aragraph-function nil))
+ =A0= (let ((fill-paragraph-function nil)
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0;; adjust fill-column to allow space for the backslash
+ =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0(fill-column (- fill-column 1)))
=A0 = =A0 =A0(fill-paragraph nil))
=A0 =A0(makefile-backslash-region (point-min) = (point-max) nil)
=A0 = =A0(goto-char (point-max))

--0016e6d6454bab8f73048e47f3b0-- ------------=_1282396142-23181-1--