unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Kirk Kelsey <kirk.kelsey@0x4b.net>
To: 6890@debbugs.gnu.org
Subject: bug#6890: 23.1; makefile-fill-paragraph doesn't leave space for backslashes
Date: Fri, 20 Aug 2010 17:26:28 -0400	[thread overview]
Message-ID: <AANLkTinV=_ik9+3GHj+gN=M_A8vHAX2LsBjPzHy3XA8z@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 984 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1878 bytes --]

             reply	other threads:[~2010-08-20 21:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-20 21:26 Kirk Kelsey [this message]
2010-08-21  9:21 ` bug#6890: 23.1; makefile-fill-paragraph doesn't leave space for backslashes Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTinV=_ik9+3GHj+gN=M_A8vHAX2LsBjPzHy3XA8z@mail.gmail.com' \
    --to=kirk.kelsey@0x4b.net \
    --cc=6890@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).