1163
1163
(defvar dvc-bookmarks-hidden-subtree nil
1164
1164
"List of all hidden subtrees")
1166
(defun dvc-bookmarks-show-or-hide-subtree (&optional show)
1167
"Hide subtree when called with no argument
1168
show subtree when called with prefix argument (C-u)"
1166
(defun dvc-bookmarks-show-or-hide-subtree ()
1167
"Toggle subtree visibility."
1170
1169
(let ((current-tree (aref (dvc-bookmarks-current-bookmark) 1))
1172
(when (member (assoc current-tree dvc-bookmark-alist) dvc-bookmark-alist) ;check if we are really on a tree
1173
(if current-prefix-arg
1172
(when (member (assoc current-tree dvc-bookmark-alist)
1173
dvc-bookmark-alist) ; Check if we are really on a tree.
1174
(if (member current-tree dvc-bookmarks-hidden-subtree)
1175
(setq dvc-bookmarks-hidden-subtree (remove current-tree dvc-bookmarks-hidden-subtree))
1177
(add-to-list 'dvc-bookmarks-hidden-subtree current-tree))
1178
(ewoc-filter dvc-bookmarks-cookie #'(lambda (x)
1179
(setq parent (dvc-get-parent-elm (aref x 1) dvc-bookmark-alist))
1180
(if (not (member parent dvc-bookmarks-hidden-subtree))
1176
(setq dvc-bookmarks-hidden-subtree
1177
(remove current-tree dvc-bookmarks-hidden-subtree))
1179
(add-to-list 'dvc-bookmarks-hidden-subtree current-tree))
1180
(ewoc-filter dvc-bookmarks-cookie
1183
(dvc-get-parent-elm (aref x 1) dvc-bookmark-alist))
1184
(if (not (member parent dvc-bookmarks-hidden-subtree)) t nil))))
1184
1187
(defvar dvc-bookmarks-tmp-yank-item '("hg" (local-tree "~/work/hg/hg")))