summaryrefslogtreecommitdiff
path: root/lisp/progmodes/make-mode.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2013-01-30 15:43:02 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2013-01-30 15:43:02 -0500
commitc517ec69d891bfe653c58a775721c1bbc6f74eb7 (patch)
treef90bc3139088b6fe843e526f281782534864f7f5 /lisp/progmodes/make-mode.el
parentc491dd7037811c143fd453722c48f81c4fece58a (diff)
downloademacs-c517ec69d891bfe653c58a775721c1bbc6f74eb7.tar.gz
* lisp/progmodes/make-mode.el (makefile-fill-paragraph): Reset syntax-table
properties. Fixes: debbugs:13179
Diffstat (limited to 'lisp/progmodes/make-mode.el')
-rw-r--r--lisp/progmodes/make-mode.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el
index 9939a54fe41..478eb592a22 100644
--- a/lisp/progmodes/make-mode.el
+++ b/lisp/progmodes/make-mode.el
@@ -1307,6 +1307,12 @@ definition and conveniently use this command."
(save-restriction
(narrow-to-region beginning end)
(makefile-backslash-region (point-min) (point-max) t)
+ ;; Backslashed newlines are marked as puncutations, so when
+ ;; fill-delete-newlines turns the LF into SPC, we end up with spaces
+ ;; which back-to-indentation (called via fill-newline ->
+ ;; fill-indent-to-left-margin -> indent-line-to) thinks are real code
+ ;; (bug#13179).
+ (remove-text-properties (point-min) (point-max) '(syntax-table))
(let ((fill-paragraph-function nil)
;; Adjust fill-column to allow space for the backslash.
(fill-column (- fill-column 1)))