emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-26 f824007: Fix failures in smerge-mode on MS-Window


From: Eli Zaretskii
Subject: [Emacs-diffs] emacs-26 f824007: Fix failures in smerge-mode on MS-Windows
Date: Fri, 5 Jan 2018 04:23:41 -0500 (EST)

branch: emacs-26
commit f82400798ee4f7b0945c7b14e15c806108a504cb
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    Fix failures in smerge-mode on MS-Windows
    
    * lisp/vc/smerge-mode.el (smerge--refine-chopup-region): Use
    utf-8-emacs-unix, not emacs-internal, to make the forced EOL
    convention explicit.
    (smerge-refine-regions): Use utf-8-emacs instead of
    emacs-internal, to allow decoding of non-Unix EOL conventions.
    (Bug#29916)
---
 lisp/vc/smerge-mode.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lisp/vc/smerge-mode.el b/lisp/vc/smerge-mode.el
index 7615367..ea99d31 100644
--- a/lisp/vc/smerge-mode.el
+++ b/lisp/vc/smerge-mode.el
@@ -1019,7 +1019,7 @@ chars to try and eliminate some spurious differences."
                   (setq s short)))
               (dotimes (_i (1- len)) (insert s)))))))
     (unless (bolp) (error "Smerge refine internal error"))
-    (let ((coding-system-for-write 'emacs-internal))
+    (let ((coding-system-for-write 'utf-8-emacs-unix))
       (write-region (point-min) (point-max) file nil 'nomessage))))
 
 (defun smerge--refine-highlight-change (beg match-num1 match-num2 props)
@@ -1084,7 +1084,9 @@ used to replace chars to try and eliminate some spurious 
differences."
     ;; Call diff on those files.
     (unwind-protect
         (with-temp-buffer
-          (let ((coding-system-for-read 'emacs-internal))
+          ;; Allow decoding the EOL format, as on MS-Windows the Diff
+          ;; utility might produce CR-LF EOLs.
+          (let ((coding-system-for-read 'utf-8-emacs))
             (call-process diff-command nil t nil
                           (if (and smerge-refine-ignore-whitespace
                                    (not smerge-refine-weight-hack))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]