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

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

inheriting the encoding in vc-diff


From: Dave Love
Subject: inheriting the encoding in vc-diff
Date: 04 Nov 2001 14:57:15 +0000
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.107

If you do VC diffs on, say, an iso-2022-encoded file, the output isn't
decoded appropriately.  I think it's better to do this:

2001-10-30  Dave Love  <fx@gnu.org>

        * vc.el (vc-diff): Make vc-version-diff inherit the buffer's file
        coding system.

Index: vc.el
===================================================================
RCS file: /cvs/emacs/lisp/vc.el,v
retrieving revision 1.311
diff -u -p -c -r1.311 vc.el
cvs server: conflicting specifications of output style
*** vc.el       2001/09/24 22:29:15     1.311
--- vc.el       2001/10/30 17:41:02
*************** and two version designators specifying w
*** 1691,1697 ****
        (vc-buffer-sync not-urgent)
        (if (vc-workfile-unchanged-p buffer-file-name)
          (message "No changes to %s since latest version" file)
!       (vc-version-diff file nil nil)))))
  
  (defun vc-version-diff (file rel1 rel2)
    "For FILE, report diffs between two stored versions REL1 and REL2 of it.
--- 1691,1699 ----
        (vc-buffer-sync not-urgent)
        (if (vc-workfile-unchanged-p buffer-file-name)
          (message "No changes to %s since latest version" file)
!       ;; Decode the diff per the file's (presumed) encoding.
!       (let ((coding-system-for-read buffer-file-coding-system))
!         (vc-version-diff file nil nil))))))
  
  (defun vc-version-diff (file rel1 rel2)
    "For FILE, report diffs between two stored versions REL1 and REL2 of it.



reply via email to

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