summaryrefslogtreecommitdiff
path: root/lisp/smerge-mode.el
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2007-11-11 00:56:44 +0000
committerMiles Bader <miles@gnu.org>2007-11-11 00:56:44 +0000
commitf23d76bdefbd4c06e14d69e99e50d35ce91c8226 (patch)
treeded28d1da6df2d0135514bac83074f4ca1c9099a /lisp/smerge-mode.el
parente2d092da5980a7d05a5428074f8eb4925fa801e8 (diff)
parenta457417ee5ba797ab1c91d35ee957bb7a7f8d4b6 (diff)
downloademacs-f23d76bdefbd4c06e14d69e99e50d35ce91c8226.tar.gz
Merge from emacs--devo--0
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-283
Diffstat (limited to 'lisp/smerge-mode.el')
-rw-r--r--lisp/smerge-mode.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/lisp/smerge-mode.el b/lisp/smerge-mode.el
index cd5c7c20f8d..18ca1a34181 100644
--- a/lisp/smerge-mode.el
+++ b/lisp/smerge-mode.el
@@ -790,12 +790,17 @@ replace chars to try and eliminate some spurious differences."
(unwind-protect
(with-temp-buffer
(let ((coding-system-for-read 'emacs-mule))
- ;; Don't forget -a to make sure diff treats it as a text file
- ;; even if it contains \0 and such.
(call-process diff-command nil t nil
(if (and smerge-refine-ignore-whitespace
(not smerge-refine-weight-hack))
- "-aw" "-a")
+ ;; Pass -a so diff treats it as a text file even
+ ;; if it contains \0 and such.
+ ;; Pass -d so as to get the smallest change, but
+ ;; also and more importantly because otherwise it
+ ;; may happen that diff doesn't behave like
+ ;; smerge-refine-weight-hack expects it to.
+ ;; See http://thread.gmane.org/gmane.emacs.devel/82685.
+ "-awd" "-ad")
file1 file2))
;; Process diff's output.
(goto-char (point-min))