]> git.eshelyaron.com Git - emacs.git/commitdiff
Reset xref-show-xrefs-function temporarily
authorDmitry Gutov <dgutov@yandex.ru>
Tue, 1 Dec 2020 01:46:27 +0000 (03:46 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Tue, 1 Dec 2020 01:46:27 +0000 (03:46 +0200)
* lisp/dired-aux.el (dired-do-find-regexp-and-replace):
Make sure xref-show-xrefs-function has the necessary value (bug#44905).

lisp/dired-aux.el

index 7f988540c2c60145fa4ba6d23dbd52daf9b030e0..18fb4b0b8b0fe5836f1c9de9a4e2e056f5133d06 100644 (file)
@@ -3023,7 +3023,13 @@ REGEXP should use constructs supported by your local `grep' command."
           (query-replace-read-args
            "Query replace regexp in marked files" t t)))
      (list (nth 0 common) (nth 1 common))))
-  (with-current-buffer (dired-do-find-regexp from)
+  (require 'xref)
+  (defvar xref-show-xrefs-function)
+  (with-current-buffer
+      (let ((xref-show-xrefs-function
+             ;; Some future-proofing (bug#44905).
+             (eval (car (get 'xref-show-xrefs-function 'standard-value)))))
+        (dired-do-find-regexp from))
     (xref-query-replace-in-results from to)))
 
 (defun dired-nondirectory-p (file)