Mercurial > emacs
diff lisp/vc.el @ 96116:ab9d2eab872e
(vc-dir-hide-up-to-date): Accept a prefix argument to also remove DIRECTORY entries.
author | Sam Steingold <sds@gnu.org> |
---|---|
date | Fri, 20 Jun 2008 15:50:16 +0000 |
parents | 422d57d537d7 |
children | 147721a08602 |
line wrap: on
line diff
--- a/lisp/vc.el Fri Jun 20 15:48:08 2008 +0000 +++ b/lisp/vc.el Fri Jun 20 15:50:16 2008 +0000 @@ -2014,12 +2014,17 @@ (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."