emacs-diffs
[Top][All Lists]
Advanced

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

master eb12b6d153b 1/2: Avoid infinite questions if TAGS file was remove


From: Eli Zaretskii
Subject: master eb12b6d153b 1/2: Avoid infinite questions if TAGS file was removed
Date: Sat, 1 Feb 2025 08:45:20 -0500 (EST)

branch: master
commit eb12b6d153b8ad3f9e3fe23761a98021d8071293
Author: Konstantin Kharlamov <Hi-Angel@yandex.ru>
Commit: Eli Zaretskii <eliz@gnu.org>

    Avoid infinite questions if TAGS file was removed
    
    When the visited TAGS file was removed, commands that depend on
    TAGS, such as auto-completion, may invoke an interactive question
    whether a user wants to re-read the file.  From that point on,
    the question will be asked over and over, because the file no
    longer exists, which results in mtime mismatch and inability to
    "fix the mismatch" by reading from the file.  Fix that by simply
    ignoring the mismatch if the file no longer exists.
    * lisp/progmodes/etags.el (tags-verify-table): Avoid infinite
    questions if TAGS file was removed.  (Bug#75946)
---
 lisp/progmodes/etags.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index b322b35ed63..22f946c5698 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -445,6 +445,9 @@ Returns non-nil if it is a valid table."
        (set-buffer (get-file-buffer file))
         (or verify-tags-table-function (tags-table-mode))
        (unless (or (verify-visited-file-modtime (current-buffer))
+                    ;; Avoid an infinte loop of questions about
+                    ;; re-reading content if file was removed.
+                    (not (file-exists-p file))
                    ;; Decide whether to revert the file.
                    ;; revert-without-query can say to revert
                    ;; or the user can say to revert.



reply via email to

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