[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r115245: Fix ugly ^M characters in Diff output shown
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] trunk r115245: Fix ugly ^M characters in Diff output shown by "C-x v u". |
Date: |
Tue, 26 Nov 2013 19:18:28 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 115245
revision-id: address@hidden
parent: address@hidden
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Tue 2013-11-26 21:17:55 +0200
message:
Fix ugly ^M characters in Diff output shown by "C-x v u".
lisp/vc/vc.el (vc-diff-internal): Use *-dos coding-system when
reading output from Diff on MS-Windows and MS-DOS.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/vc/vc.el vc.el-20091113204419-o5vbwnq5f7feedwu-502
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-11-26 15:24:10 +0000
+++ b/lisp/ChangeLog 2013-11-26 19:17:55 +0000
@@ -1,3 +1,8 @@
+2013-11-26 Eli Zaretskii <address@hidden>
+
+ * vc/vc.el (vc-diff-internal): Use *-dos coding-system when
+ reading output from Diff on MS-Windows and MS-DOS.
+
2013-11-26 Bozhidar Batsov <address@hidden>
* emacs-lisp/helpers.el (string-reverse): New function.
=== modified file 'lisp/vc/vc.el'
--- a/lisp/vc/vc.el 2013-11-13 20:06:37 +0000
+++ b/lisp/vc/vc.el 2013-11-26 19:17:55 +0000
@@ -1641,6 +1641,13 @@
;; be to call the back end separately for each file.
(coding-system-for-read
(if files (vc-coding-system-for-diff (car files)) 'undecided)))
+ ;; On MS-Windows and MS-DOS, Diff is likely to produce DOS-style
+ ;; EOLs, which will look ugly if (car files) happens to have Unix
+ ;; EOLs.
+ (if (memq system-type '(windows-nt ms-dos))
+ (setq coding-system-for-read
+ (coding-system-change-eol-conversion coding-system-for-read
+ 'dos)))
(vc-setup-buffer buffer)
(message "%s" (car messages))
;; Many backends don't handle well the case of a file that has been
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r115245: Fix ugly ^M characters in Diff output shown by "C-x v u".,
Eli Zaretskii <=