diff options
| author | Dmitry Gutov <dgutov@yandex.ru> | 2014-11-10 03:29:58 +0200 |
|---|---|---|
| committer | Dmitry Gutov <dgutov@yandex.ru> | 2014-11-10 03:29:58 +0200 |
| commit | 91982ede583f0575844feb8b4c73de9529bb0876 (patch) | |
| tree | 66b3e8f87e762ef36eb3e2a27826f2e5ff4de9e5 | |
| parent | f452367d4a90ac098070a37f20e551984f12e5c2 (diff) | |
| download | emacs-91982ede583f0575844feb8b4c73de9529bb0876.tar.gz | |
Fix bug#18964
* lisp/vc/vc-dir.el (vc-dir-hide-state): Also hide `ignored' items when
no state is specified.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/vc/vc-dir.el | 16 |
2 files changed, 14 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a01dadad706..572de2ed950 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-11-10 Dmitry Gutov <dgutov@yandex.ru> + + * vc/vc-dir.el (vc-dir-hide-state): Also hide `ignored' items when + no state is specified. (Bug#18964) + 2014-11-09 Eric Ludlam <zappo@gnu.org> * emacs-lisp/eieio-custom.el (eieio-customize-object): Set diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el index be3b1fa94b5..a26287aa0f7 100644 --- a/lisp/vc/vc-dir.el +++ b/lisp/vc/vc-dir.el @@ -1125,18 +1125,18 @@ outside of VC) and one wants to do some operation on it." "Hide items that are in STATE from display. See `vc-state' for valid values of STATE. -If STATE is nil, default it to up-to-date. +If STATE is nil, hide both `up-to-date' and `ignored' items. Interactively, if `current-prefix-arg' is non-nil, set STATE to -state of item at point. Otherwise, set STATE to up-to-date." +state of item at point, if any." (interactive (list (and current-prefix-arg ;; Command is prefixed. Infer STATE from point. (let ((node (ewoc-locate vc-ewoc))) (and node (vc-dir-fileinfo->state (ewoc-data node))))))) - ;; If STATE is un-specified, use up-to-date. - (setq state (or state 'up-to-date)) - (message "Hiding items in state \"%s\"" state) + (if state + (message "Hiding items in state \"%s\"" state) + (message "Hiding up-to-date and ignored items")) (let ((crt (ewoc-nth vc-ewoc -1)) (first (ewoc-nth vc-ewoc 0))) ;; Go over from the last item to the first and remove the @@ -1157,8 +1157,10 @@ state of item at point. Otherwise, set STATE to up-to-date." ;; Next item is a directory. (vc-dir-fileinfo->directory (ewoc-data next)))) ;; Remove files in specified STATE. STATE can be a - ;; symbol or a user-name. - (equal (vc-dir-fileinfo->state data) state)) + ;; symbol, a user-name, or nil. + (if state + (equal (vc-dir-fileinfo->state data) state) + (memq (vc-dir-fileinfo->state data) '(up-to-date ignored)))) (ewoc-delete vc-ewoc crt)) (setq crt prev))))) |
