GNU bug report logs - #13179
24.2.90; fill-paragraph in Makefiles

Previous Next

Package: emacs;

Reported by: Thomas Christensen <christensenthomas <at> gmail.com>

Date: Fri, 14 Dec 2012 04:23:02 UTC

Severity: normal

Merged with 13180

Found in version 24.2.90

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#13180: closed (24.2.90; fill-paragraph in Makefiles)
Date: Wed, 30 Jan 2013 20:44:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Wed, 30 Jan 2013 15:41:59 -0500
with message-id <jwvip6eblce.fsf-monnier+emacs <at> gnu.org>
and subject line Re: bug#13179: 24.2.90; fill-paragraph
has caused the debbugs.gnu.org bug report #13179,
regarding 24.2.90; fill-paragraph in Makefiles
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
13179: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13179
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Thomas Christensen <christensenthomas <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: 24.2.90; fill-paragraph
Date: Fri, 14 Dec 2012 11:21:20 +0700
On Fri, Dec 14, 2012 at 11:03:34AM +0700, Thomas Christensen wrote:
> 
> It will not look like this (notice the 5 space indent):

"not" was meant to be "now"


[Message part 3 (message/rfc822, inline)]
From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Thomas Christensen <christensenthomas <at> gmail.com>
Cc: 13179-done <at> debbugs.gnu.org
Subject: Re: bug#13179: 24.2.90; fill-paragraph
Date: Wed, 30 Jan 2013 15:41:59 -0500
> The expected behavior would be to keep looking like the first case with
> 4 space indentation.

Indeed.

> I have bisected the problem (with git) to this commit:
> Author: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Date:   Wed Sep 8 18:21:23 2010 +0200
>     Misc cleanups and simplifications.

The problem was kind of nasty (disappears when you step through the
code, because it gets fixed by font-lock), but even now that
I understand clearly what was the problem, I don't see how it is related
to the above changes (maybe by setting parse-sexp-lookup-properties).

In any case, I've installed the patch below which should fix the problem
(maybe it should be fixed more generally in fill.el or in
back-to-indentation).


        Stefan


--- lisp/progmodes/make-mode.el	2013-01-01 09:11:05 +0000
+++ lisp/progmodes/make-mode.el	2013-01-30 20:38:09 +0000
@@ -1307,6 +1307,12 @@
 	(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)))



This bug report was last modified 12 years and 117 days ago.

Previous Next


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