emacs-diffs
[Top][All Lists]
Advanced

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

master fc37483: Fix a problem with restarting 'tags-search'


From: Eli Zaretskii
Subject: master fc37483: Fix a problem with restarting 'tags-search'
Date: Sun, 6 Jun 2021 08:31:44 -0400 (EDT)

branch: master
commit fc37483617e09fb901c075dd20cfb7b2c2a165fe
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Fix a problem with restarting 'tags-search'
    
    * lisp/progmodes/etags.el (tags-search, tags-query-replace): Link
    to 'fileloop-continue' instead of 'tags-loop-continue', for
    continuing TAGS-based search/replace commands.
    
    * lisp/fileloop.el (fileloop-continue): Reset
    'switch-to-buffer-preserve-window-point' to nil when switching to
    another buffer, so as to make sure a new search always restarts
    from point-min in each buffer it searches.  (Bug#48628)
---
 lisp/fileloop.el        | 3 ++-
 lisp/progmodes/etags.el | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/lisp/fileloop.el b/lisp/fileloop.el
index cb9fe8f..8a2755d 100644
--- a/lisp/fileloop.el
+++ b/lisp/fileloop.el
@@ -171,7 +171,8 @@ operating on the next file and nil otherwise."
                (goto-char pos))
            (push-mark original-point t))
 
-         (switch-to-buffer (current-buffer))
+          (let (switch-to-buffer-preserve-window-point)
+           (switch-to-buffer (current-buffer)))
 
          ;; Now operate on the file.
          ;; If value is non-nil, continue to scan the next file.
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index 13717b1..f0180ce 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -1808,7 +1808,7 @@ argument is passed to `next-file', which see)."
 (defun tags-search (regexp &optional files)
   "Search through all files listed in tags table for match for REGEXP.
 Stops when a match is found.
-To continue searching for next match, use command \\[tags-loop-continue].
+To continue searching for next match, use the command \\[fileloop-continue].
 
 If FILES if non-nil should be a list or an iterator returning the
 files to search.  The search will be restricted to these files.
@@ -1834,7 +1834,7 @@ Also see the documentation of the `tags-file-name' 
variable."
   "Do `query-replace-regexp' of FROM with TO on all files listed in tags table.
 Third arg DELIMITED (prefix arg) means replace only word-delimited matches.
 If you exit (\\[keyboard-quit], RET or q), you can resume the query replace
-with the command \\[tags-loop-continue].
+with the command \\[fileloop-continue].
 For non-interactive use, superseded by `fileloop-initialize-replace'."
   (declare (advertised-calling-convention (from to &optional delimited) 
"27.1"))
   (interactive (query-replace-read-args "Tags query replace (regexp)" t t))



reply via email to

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