changeset 82058:b9e06163e85b

(vc-stay-local-p): Fix bug: Avoid remove-if-not. Also, if FILE is a list, return non-nil if any of its elements should stay local. Update docstring.
author Thien-Thi Nguyen <ttn@gnuvola.org>
date Mon, 23 Jul 2007 19:44:56 +0000
parents 3ad2eb1be396
children a0869eab905f
files lisp/vc-hooks.el
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/vc-hooks.el	Mon Jul 23 19:44:33 2007 +0000
+++ b/lisp/vc-hooks.el	Mon Jul 23 19:44:56 2007 +0000
@@ -159,9 +159,11 @@
 
 (defun vc-stay-local-p (file)
   "Return non-nil if VC should stay local when handling FILE.
-This uses the `repository-hostname' backend operation."
+This uses the `repository-hostname' backend operation.
+If FILE is a list of files, return non-nil if any of them
+individually should stay local."
   (if (listp file)
-      (if (remove-if-not (lambda (x) (not (vc-stay-local-p x))) file) 'no 'yes)
+      (delq nil (mapcar 'vc-stay-local-p file))
     (let* ((backend (vc-backend file))
 	   (sym (vc-make-backend-sym backend 'stay-local))
 	   (stay-local (if (boundp sym) (symbol-value sym) t)))
@@ -732,7 +734,7 @@
 		 (propertize
 		  ml-string
 		  'mouse-face 'mode-line-highlight
-		  'help-echo 
+		  'help-echo
 		  (concat (if ml-echo
 			      ml-echo
 			    (format "File under the %s version control system"
@@ -787,7 +789,7 @@
 	    ;; for 'needs-patch and 'needs-merge.
 	    (setq state-echo "Locally modified file")
 	    (concat backend ":" rev)))
-     'help-echo (concat state-echo " under the " backend 
+     'help-echo (concat state-echo " under the " backend
 			" version control system"))))
 
 (defun vc-follow-link ()