]> git.eshelyaron.com Git - emacs.git/commitdiff
(vc-stay-local-p): Fix bug: Avoid remove-if-not.
authorThien-Thi Nguyen <ttn@gnuvola.org>
Mon, 23 Jul 2007 19:46:00 +0000 (19:46 +0000)
committerThien-Thi Nguyen <ttn@gnuvola.org>
Mon, 23 Jul 2007 19:46:00 +0000 (19:46 +0000)
Also, if FILE is a list, return non-nil if any of its
elements should stay local.  Update docstring.

lisp/ChangeLog
lisp/vc-hooks.el

index da709f444e66e4cf104085a2c5f9dd0c0bd37918..884818044731cde953eff5fe4a1a664544104998 100644 (file)
@@ -1,3 +1,9 @@
+2007-07-23  Thien-Thi Nguyen  <ttn@gnuvola.org>
+
+       * vc-hooks.el (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.
+
 2007-07-23  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * emacs-lisp/copyright.el (copyright-update-year): Fix 2007-05-25 change.
index cd5d8db7b0f3fc4ac0230ecc5c6526a68d88b232..2d3a0886c221dc10a2dbd51bcbd394a67202e697 100644 (file)
@@ -159,9 +159,11 @@ by these regular expressions."
 
 (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 @@ visiting FILE."
                 (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 @@ This function assumes that the file is registered."
            ;; 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 ()