[Top][All Lists]

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

bug#33567: Syntactic fontification of diff hunks

From: Eli Zaretskii
Subject: bug#33567: Syntactic fontification of diff hunks
Date: Thu, 06 Dec 2018 08:53:46 +0200

> From: Juri Linkov <address@hidden>
> Cc: address@hidden
> Date: Thu, 06 Dec 2018 01:25:46 +0200
> I'm thinking about overriding coding in vc-git-find-revision like
> diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
> index f317400530..e5f44524df 100644
> --- a/lisp/vc/vc-git.el
> +++ b/lisp/vc/vc-git.el
> @@ -838,8 +838,8 @@ vc-git-checkin
>  (defun vc-git-find-revision (file rev buffer)
>    (let* (process-file-side-effects
> -      (coding-system-for-read 'binary)
> -      (coding-system-for-write 'binary)
> +      (coding-system-for-read (or coding-system-for-read 'binary))
> +      (coding-system-for-write (or coding-system-for-write 'binary))
>        (fullname
>         (let ((fn (vc-git--run-command-string
>                    file "ls-files" "-z" "--full-name" "--")))
> then a caller function could set its own value of this dynamic binding.
> But I haven't tested yet if it works with UTF-8 file names.

This is something that we might want to do anyway (it is IMO rude to
unconditionally bind these symbols), but I'm not sure it helps you,
because the level you work on is not vc-git.  The right value to bind
coding-system-for-read here is vc-git-log-output-coding-system, but
that is a Git specific value, whereas you are trying to provide a
VCS-independent feature, which should work with any supported VCS.

reply via email to

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