emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-27 749e4b7: Reset xref-show-xrefs-function temporarily


From: Dmitry Gutov
Subject: emacs-27 749e4b7: Reset xref-show-xrefs-function temporarily
Date: Mon, 30 Nov 2020 20:49:33 -0500 (EST)

branch: emacs-27
commit 749e4b7e0b04948f4805455e9505c6b855a84c96
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>

    Reset xref-show-xrefs-function temporarily
    
    * 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 | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 7f98854..18fb4b0 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]