Mercurial > emacs
changeset 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 | 6d96d49c7ae7 |
children | 8e11daf373e3 |
files | lisp/ChangeLog lisp/vc.el |
diffstat | 2 files changed, 14 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Fri Jun 20 15:48:08 2008 +0000 +++ b/lisp/ChangeLog Fri Jun 20 15:50:16 2008 +0000 @@ -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'.
--- 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."