all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#6890: 23.1; makefile-fill-paragraph doesn't leave space for backslashes
@ 2010-08-20 21:26 Kirk Kelsey
  2010-08-21  9:21 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Kirk Kelsey @ 2010-08-20 21:26 UTC (permalink / raw)
  To: 6890

[-- 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 --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-08-21  9:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-20 21:26 bug#6890: 23.1; makefile-fill-paragraph doesn't leave space for backslashes Kirk Kelsey
2010-08-21  9:21 ` Stefan Monnier

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.