(vc-dir-hide-up-to-date): Accept a prefix argument to also remove DIRECTORY entries.

This commit is contained in:
Sam Steingold 2008-06-20 15:50:16 +00:00
parent d2373df5d7
commit 424ce3bd46
2 changed files with 14 additions and 4 deletions

View file

@ -1,3 +1,8 @@
2008-06-20 Sam Steingold <sds@gnu.org>
* vc.el (vc-dir-hide-up-to-date): Accept a prefix argument to also
remove DIRECTORY entries.
2008-06-20 Eli Zaretskii <eliz@gnu.org>
* makefile.w32-in (distclean): Depend on `clean'.

View file

@ -2014,12 +2014,17 @@ outside of VC) and one wants to do some operation on it."
(interactive "fShow file: ")
(vc-dir-update (list (list (file-relative-name file) (vc-state file))) (current-buffer)))
(defun vc-dir-hide-up-to-date ()
"Hide up-to-date items from display."
(interactive)
(defun vc-dir-hide-up-to-date (&optional drop-directory)
"Hide up-to-date items from display.
With a prefix argument, also drop DIRECTORY entries."
(interactive "P")
(ewoc-filter
vc-ewoc
(lambda (crt) (not (eq (vc-dir-fileinfo->state crt) 'up-to-date)))))
(if drop-directory
(lambda (crt)
(not (or (eq (vc-dir-fileinfo->state crt) 'up-to-date)
(vc-dir-fileinfo->directory crt))))
(lambda (crt) (not (eq (vc-dir-fileinfo->state crt) 'up-to-date))))))
(defun vc-default-status-fileinfo-extra (backend file)
"Default absence of extra information returned for a file."