Subject: Re: bug#33567: Syntactic fontification of diff hunks

From: Dmitry Gutov <[email-masked]>
Date: Mon, 3 Dec 2018 13:24:40 +0200

On 03.12.2018 2:34, Juri Linkov wrote:

> Fixing the described problem will remove this comment,
> but I have no idea how better to do this.  The problem is that
> we need to provide own created buffer to the call to `vc-find-revision'.
> Currently it has the following function signature:
> 
>    (defun vc-find-revision (file revision &optional backend)
> 
> But VC API in the comments in the beginning of vc.el
> is documented with a different function signature:
> 
>    ;; * find-revision (file rev buffer)
>    ;;
>    ;;   Fetch revision REV of file FILE and put it into BUFFER.
>    ;;   If REV is the empty string, fetch the head of the trunk.
>    ;;   The implementation should pass the value of vc-checkout-switches
>    ;;   to the backend command.

That is the VC backend API, not the signatures of public functions in 
vc.el (which would be kinda pointless).

vc-git-find-revision and friends do indeed have this signature.

Take a look at the uses of vc-call-backend in 
vc-find-revision[-no]-save. Maybe you need to write a new 
???-find-revision function that does what you need.