[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: diff-mode misinterprets empty lines.
From: |
Stefan Monnier |
Subject: |
Re: diff-mode misinterprets empty lines. |
Date: |
Mon, 14 Jan 2008 16:08:13 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) |
> In an effort to clear FOR-RELEASE, here is a simple-minded attempt to
> deal with this. It seems to fix the original problem at least.
It is problematic when you try to apply a hunk via C-c C-a because any
empty line following your hunk (e.g. the last hunk in a C-x v =) will be
taken as being part of the hunk and C-c C-a will think that the original
text was just missing a newline and will add it (as a result of its
fuzzy matching feature).
Stefan
> *** diff-mode.el.~1.122.~ 2007-10-21 13:00:12.000000000 -0700
> --- diff-mode.el 2008-01-05 15:58:41.000000000 -0800
> ***************
> *** 403,409 ****
> (setq style (diff-hunk-style style))
> (let ((end (and (re-search-forward (case style
> ;; A `unified' header is ambiguous.
> ! (unified (concat "^[^-+# \\]\\|"
> diff-file-header-re))
> (context "^[^-+#! \\]")
> (normal "^[^<>#\\]")
> --- 403,409 ----
> (setq style (diff-hunk-style style))
> (let ((end (and (re-search-forward (case style
> ;; A `unified' header is ambiguous.
> ! (unified (concat "^[^-+# \\\n]\\|"
> diff-file-header-re))
> (context "^[^-+#! \\]")
> (normal "^[^<>#\\]")
- Re: diff-mode misinterprets empty lines., Glenn Morris, 2008/01/05
- Re: diff-mode misinterprets empty lines., Richard Stallman, 2008/01/06
- Re: diff-mode misinterprets empty lines.,
Stefan Monnier <=
- Re: diff-mode misinterprets empty lines., Glenn Morris, 2008/01/14
- Re: diff-mode misinterprets empty lines., Glenn Morris, 2008/01/14
- Diffs between %s and %s end here (was: diff-mode misinterprets empty lines.), Reiner Steib, 2008/01/14
- Re: Diffs between %s and %s end here, Miles Bader, 2008/01/14
- Re: Diffs between %s and %s end here, Glenn Morris, 2008/01/16
- Re: diff-mode misinterprets empty lines., Dan Nicolaescu, 2008/01/14
- Re: diff-mode misinterprets empty lines., Chong Yidong, 2008/01/29