From 8f081e96dec8821ecf3452237b74cfc7ee6a315b Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sat, 21 Aug 2010 11:19:38 +0200 Subject: [PATCH] * progmodes/make-mode.el (makefile-fill-paragraph): Account for the extra backslash added to each line. Fixes: debbugs:6890 --- lisp/ChangeLog | 6 ++++++ lisp/progmodes/make-mode.el | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2403ab0491c..f6aa59c2db5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2010-08-21 Kirk Kelsey (tiny change) + Stefan Monnier + + * progmodes/make-mode.el (makefile-fill-paragraph): Account for the + extra backslash added to each line (bug#6890). + 2010-08-21 Stefan Monnier * subr.el (read-key): Don't echo keystrokes (bug#6883). diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el index 594462d5125..d45ecd47907 100644 --- a/lisp/progmodes/make-mode.el +++ b/lisp/progmodes/make-mode.el @@ -1324,7 +1324,9 @@ definition and conveniently use this command." (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)) @@ -1338,7 +1340,9 @@ definition and conveniently use this command." ;; resulting region. (save-restriction (narrow-to-region (point) (line-beginning-position 2)) - (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)) ;; Return non-nil to indicate it's been filled. -- 2.39.2