Subject: bug#31578: 24.3; vc-ignore-root-dir resets locate-dominating-stop-dir-regexp

From: Dmitry Gutov <[email-masked]>
Date: Mon, 15 Jul 2019 00:27:23 +0300

On 14.07.2019 23:51, Juri Linkov wrote:

 > Then we could name a new command vc-dir-root
 > (that will use vc-root-dir to visit root dir in vc-dir-mode).

OK, sure.

> BTW, I tried `M-x vc-dir-search' (not bound to any key)
> but it raises an error.  Should I create a bug report?

Or go ahead and fix it, I guess.

This patch seems to do the trick:

diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index 41b1087ee5..daa2865d88 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -805,8 +805,7 @@ vc-dir-search
  To continue searching for next match, use command \\[tags-loop-continue]."
    (interactive "sSearch marked files (regexp): ")
    (tags-search regexp
-               (lambda ()
-                 (mapcar #'car (vc-dir-marked-only-files-and-states)))))
+               (mapcar #'car (vc-dir-marked-only-files-and-states))))

  (defun vc-dir-query-replace-regexp (from to &optional delimited)
    "Do `query-replace-regexp' of FROM with TO, on all marked files.