Subject: Re: bug#12159: 24.1.50; vc-dir: Need a way to hide unregistered files

From: Stefan Monnier <[email-masked]>
Date: Sun, 12 Aug 2012 10:13:05 -0400

> +	* vc/vc-dir.el (vc-dir-hide-these-states): New custom variable.

Don't bother.  Just always default to up-to-date.

> +(defun vc-dir-hide-some-states (&optional states)

Make it `state' and not a list.

> +  (interactive
> +   ;; Interactive use.

Redundant comment.

> +  ;; Non-interactive use.
> +  (unless (called-interactively-p 'any)
> +    (setq states (or states vc-dir-hide-these-states)))

The test is wrong (it prevents non-interactive use where you specify
the state explicitly).
The above should simply be (unless state (setq state 'up-to-date)).

> +(defun vc-dir-hide-up-to-date ()
> +  "Hide up-to-date items from display."
> +  (interactive)
> +  (vc-dir-hide-some-states '("up-to-date")))
 
Why bother?

        Stefan