bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#4451: 23.1; EOL problems with vc-diff and cygwin


From: Stefan Monnier
Subject: bug#4451: 23.1; EOL problems with vc-diff and cygwin
Date: Thu, 17 Sep 2009 12:35:37 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

I think the best solution is to change vc-coding-system-for-diff so that
when it takes the coding system from (with-current-buffer buf
buffer-file-coding-system), it ignores the EOL part of that
coding system.

Does the patch below help?


        Stefan


=== modified file 'lisp/vc.el'
--- lisp/vc.el  2009-09-14 15:39:41 +0000
+++ lisp/vc.el  2009-09-17 16:35:00 +0000
@@ -1470,7 +1470,11 @@
       ;; use the buffer's coding system
       (let ((buf (find-buffer-visiting file)))
         (when buf (with-current-buffer buf
-                   buffer-file-coding-system)))
+                    (if buffer-file-coding-system
+                        ;; Don't inherit the EOL part of the coding-system,
+                        ;; because some diff tools may choose to use
+                        ;; another one.
+                        (coding-system-base buffer-file-coding-system)))))
       ;; otherwise, try to find one based on the file name
       (car (find-operation-coding-system 'insert-file-contents file))
       ;; and a final fallback






reply via email to

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