unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Thomas Christensen <christensenthomas@gmail.com>
Cc: 13179-done@debbugs.gnu.org
Subject: bug#13179: 24.2.90; fill-paragraph
Date: Wed, 30 Jan 2013 15:41:59 -0500	[thread overview]
Message-ID: <jwvip6eblce.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20121214040334.GA27497@incubator_62c5ede2> (Thomas Christensen's message of "Fri, 14 Dec 2012 11:03:34 +0700")

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






      parent reply	other threads:[~2013-01-30 20:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-14  4:03 bug#13179: 24.2.90; fill-paragraph Thomas Christensen
2012-12-14  4:21 ` bug#13180: " Thomas Christensen
2013-01-03  8:26 ` bug#13179: " Glenn Morris
2013-01-29  6:56   ` Thomas Christensen
2013-01-30 20:41 ` Stefan Monnier [this message]

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=jwvip6eblce.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=13179-done@debbugs.gnu.org \
    --cc=christensenthomas@gmail.com \
    /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).