GNU bug report logs - #6890
23.1; makefile-fill-paragraph doesn't leave space for backslashes

Previous Next

Package: emacs;

Reported by: Kirk Kelsey <kirk.kelsey <at> 0x4b.net>

Date: Fri, 20 Aug 2010 21:30:03 UTC

Severity: normal

Found in version 23.1

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6890 in the body.
You can then email your comments to 6890 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6890; Package emacs. (Fri, 20 Aug 2010 21:30:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kirk Kelsey <kirk.kelsey <at> 0x4b.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 20 Aug 2010 21:30:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Kirk Kelsey <kirk.kelsey <at> 0x4b.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 23.1; makefile-fill-paragraph doesn't leave space for backslashes
Date: Fri, 20 Aug 2010 17:26:28 -0400
[Message part 1 (text/plain, inline)]
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))
[Message part 2 (text/html, inline)]

Reply sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
You have taken responsibility. (Sat, 21 Aug 2010 13:09:02 GMT) Full text and rfc822 format available.

Notification sent to Kirk Kelsey <kirk.kelsey <at> 0x4b.net>:
bug acknowledged by developer. (Sat, 21 Aug 2010 13:09:02 GMT) Full text and rfc822 format available.

Message #10 received at 6890-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Kirk Kelsey <kirk.kelsey <at> 0x4b.net>
Subject: Re: bug#6890: 23.1;
	makefile-fill-paragraph doesn't leave space for backslashes
Date: Sat, 21 Aug 2010 11:21:37 +0200
> 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




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 19 Sep 2010 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 276 days ago.

Previous Next


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