aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorStefan Monnier <[email protected]>2013-01-08 12:34:35 -0500
committerStefan Monnier <[email protected]>2013-01-08 12:34:35 -0500
commit1c851e98b60d08404e5138b67ccf5b9d72fb4e47 (patch)
treebdd94678dd1dcf59d33e2015c646d54bd9209d9a /lisp
parent63a63bd4346fb2c0d5382ae37b515cdbd33fbf17 (diff)
* lisp/vc/pcvs.el (cvs-cleanup-collection): Extend meaning of `rm-handled'.
(cvs-mode-remove-handled): Use it. Fixes: debbugs:13380
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/vc/pcvs.el20
2 files changed, 14 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 3c1a51855a..18481cb5aa 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
2013-01-08 Stefan Monnier <[email protected]>
+ * vc/pcvs.el (cvs-cleanup-collection): Extend meaning of `rm-handled'.
+ (cvs-mode-remove-handled): Use it (bug#13380).
+
* emacs-lisp/nadvice.el (advice--tweak): New function.
(advice--remove-function, advice--subst-main): Use it.
diff --git a/lisp/vc/pcvs.el b/lisp/vc/pcvs.el
index 52dc7edfa2..208b93d967 100644
--- a/lisp/vc/pcvs.el
+++ b/lisp/vc/pcvs.el
@@ -856,7 +856,8 @@ the problem."
(defun cvs-cleanup-collection (c rm-handled rm-dirs rm-msgs)
"Remove undesired entries.
C is the collection
-RM-HANDLED if non-nil means remove handled entries.
+RM-HANDLED if non-nil means remove handled entries (if file is currently
+ visited, only remove if value is `all').
RM-DIRS behaves like `cvs-auto-remove-directories'.
RM-MSGS if non-nil means remove messages."
(let (last-fi first-dir (rerun t))
@@ -870,16 +871,17 @@ RM-MSGS if non-nil means remove messages."
(subtype (cvs-fileinfo->subtype fi))
(keep
(pcase type
- ;; remove temp messages and keep the others
+ ;; Remove temp messages and keep the others.
(`MESSAGE (not (or rm-msgs (eq subtype 'TEMP))))
- ;; remove entries
+ ;; Remove dead entries.
(`DEAD nil)
- ;; handled also?
+ ;; Handled also?
(`UP-TO-DATE
- (if (find-buffer-visiting (cvs-fileinfo->full-name fi))
- t
- (not rm-handled)))
- ;; keep the rest
+ (not
+ (if (find-buffer-visiting (cvs-fileinfo->full-name fi))
+ (eq rm-handled 'all)
+ rm-handled)))
+ ;; Keep the rest.
(_ (not (run-hook-with-args-until-success
'cvs-cleanup-functions fi))))))
@@ -2121,7 +2123,7 @@ if you are convinced that the process that created the lock is dead."
Empty directories are removed."
(interactive)
(cvs-cleanup-collection cvs-cookies
- t (or cvs-auto-remove-directories 'handled) t))
+ 'all (or cvs-auto-remove-directories 'handled) t))
(defun-cvs-mode cvs-mode-acknowledge ()