From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#13179: 24.2.90; fill-paragraph Date: Wed, 30 Jan 2013 15:41:59 -0500 Message-ID: References: <20121214040334.GA27497@incubator_62c5ede2> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1359578609 8302 80.91.229.3 (30 Jan 2013 20:43:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Jan 2013 20:43:29 +0000 (UTC) Cc: 13179-done@debbugs.gnu.org To: Thomas Christensen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 30 21:43:48 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U0eVX-0001H8-Ob for geb-bug-gnu-emacs@m.gmane.org; Wed, 30 Jan 2013 21:43:47 +0100 Original-Received: from localhost ([::1]:42343 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0eVF-0002qJ-Pq for geb-bug-gnu-emacs@m.gmane.org; Wed, 30 Jan 2013 15:43:29 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:34740) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0eVB-0002qC-TS for bug-gnu-emacs@gnu.org; Wed, 30 Jan 2013 15:43:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U0eVA-0006ES-Lk for bug-gnu-emacs@gnu.org; Wed, 30 Jan 2013 15:43:25 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50784) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0eVA-0006EK-IC for bug-gnu-emacs@gnu.org; Wed, 30 Jan 2013 15:43:24 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1U0eVm-0003SS-CP for bug-gnu-emacs@gnu.org; Wed, 30 Jan 2013 15:44:02 -0500 Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Jan 2013 20:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 13179 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 13179@debbugs.gnu.org, monnier@iro.umontreal.ca, christensenthomas@gmail.com Original-Received: via spool by 13179-done@debbugs.gnu.org id=D13179.135957858513213 (code D ref 13179); Wed, 30 Jan 2013 20:44:02 +0000 Original-Received: (at 13179-done) by debbugs.gnu.org; 30 Jan 2013 20:43:05 +0000 Original-Received: from localhost ([127.0.0.1]:56248 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U0eUr-0003R4-Ay for submit@debbugs.gnu.org; Wed, 30 Jan 2013 15:43:05 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:56487) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U0eUo-0003Qj-Iy for 13179-done@debbugs.gnu.org; Wed, 30 Jan 2013 15:43:04 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFG4rw3e/2dsb2JhbABEvw4Xc4IeAQEEAScvIwULCxQgEhQYDSQTiAsGwS2RCgOIYZwZgV6DFQ X-IPAS-Result: Av8EABK/CFG4rw3e/2dsb2JhbABEvw4Xc4IeAQEEAScvIwULCxQgEhQYDSQTiAsGwS2RCgOIYZwZgV6DFQ X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="56542" Original-Received: from 184-175-13-222.dsl.teksavvy.com (HELO ceviche.home) ([184.175.13.222]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 30 Jan 2013 15:42:20 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id 21FAB66130; Wed, 30 Jan 2013 15:41:59 -0500 (EST) In-Reply-To: <20121214040334.GA27497@incubator_62c5ede2> (Thomas Christensen's message of "Fri, 14 Dec 2012 11:03:34 +0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:70500 Archived-At: > 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 > 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)))