[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master ba6df55: Fixup dired-do-find-regexp-and-replace
From: |
Dmitry Gutov |
Subject: |
master ba6df55: Fixup dired-do-find-regexp-and-replace |
Date: |
Mon, 6 Sep 2021 10:08:37 -0400 (EDT) |
branch: master
commit ba6df554755e1989670e23220d2d14bc8e389274
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>
Fixup dired-do-find-regexp-and-replace
* lisp/dired-aux.el (dired-do-find-regexp-and-replace):
Disregard the customized value of xref-auto-jump-to-first-xref
(it breaks the xref-query-replace-in-results invocation).
* lisp/progmodes/xref.el (xref-auto-jump-to-first-xref):
Mention the caveat for users or xref distributed through ELPA.
---
lisp/dired-aux.el | 5 ++++-
lisp/progmodes/xref.el | 5 ++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 8e00af8..c728642 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -3245,10 +3245,13 @@ REGEXP should use constructs supported by your local
`grep' command."
(list (nth 0 common) (nth 1 common))))
(require 'xref)
(defvar xref-show-xrefs-function)
+ (defvar xref-auto-jump-to-first-xref)
(with-current-buffer
(let ((xref-show-xrefs-function
;; Some future-proofing (bug#44905).
- (custom--standard-value 'xref-show-xrefs-function)))
+ (custom--standard-value 'xref-show-xrefs-function))
+ ;; Disable auto-jumping, it will mess up replacement logic.
+ xref-auto-jump-to-first-xref)
(dired-do-find-regexp from))
(xref-query-replace-in-results from to)))
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index ec8b05d..d022baaf 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -432,7 +432,10 @@ focus on the Xref buffer's window.
"If t, xref commands always jump to the first result.
`show' means to show the first result's location, but keep the
focus on the Xref buffer's window.
-`move' means to only move point to the first result."
+`move' means to only move point to the first result.
+
+Please be careful changing this value if you are using Emacs 27
+or earlier: it can break dired-do-find-regexp-and-replace."
:type '(choice (const :tag "Jump" t)
(const :tag "Show" show)
(const :tag "Move point only" move)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master ba6df55: Fixup dired-do-find-regexp-and-replace,
Dmitry Gutov <=