[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#20892: 25.0.50; Applying vc-diff hunks on CRLF tracked files
From: |
Eli Zaretskii |
Subject: |
bug#20892: 25.0.50; Applying vc-diff hunks on CRLF tracked files |
Date: |
Wed, 24 Jun 2015 17:57:57 +0300 |
> From: joaotavora@gmail.com (João Távora)
> Date: Wed, 24 Jun 2015 12:29:05 +0100
>
> @@ -1799,7 +1799,8 @@
> (with-current-buffer buf
> (goto-char (car pos))
> (delete-region (car pos) (cdr pos))
> - (insert (car new)))
> + (insert (decode-coding-string (car new)
> + buffer-file-coding-system)))
That doesn't sound right: the string you are passing to
decode-coding-string is already a multibyte string in Emacs's internal
representation. So decoding it one more time is not what you want.
I think we should simply remove the CR characters from the end of each
line, if buffer-file-coding-system states DOS EOL format. (You can
check the latter with coding-system-eol-type.)
Thanks.