[Top][All Lists]

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

Re: vc-state and unregistered

From: Michael Albinus
Subject: Re: vc-state and unregistered
Date: Sun, 24 Apr 2016 20:13:26 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Dmitry Gutov <address@hidden> writes:

>> Pls show me the bugs, I might have introduced.
> As far as bugs go, here's one: you never return nil from vc-state
> anymore. Try evaluating:
> (progn
>   (vc-file-clearprops buffer-file-name)
>   (vc-state buffer-file-name 'CVS))

See the docstring of vc-state:

"A return of nil from this function means we have no information on the
status of this file."

I would expect this for files which are located in a directory not under
version control. None of the tests in vc-tests.el cover this case.

> And if the goal is to always return non-nil (which would be a change
> to the documented behavior), there is an easier way to do that than
> checking (vc-registered file), like:

I haven't said that my changes are perfect. But we differ in the
understanding of the API.

Best regards, Michael.

reply via email to

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