emacs-31 b34952ee947: etags-regen--maybe-generate: No error when no project found

Dmitry Gutov <[email protected]>
Newsgroups gmane.emacs.diffs
Message-ID <[email protected]>
branch: emacs-31
commit b34952ee94710e9985a3ba74f16f8ecf79ce1d5e
Author: Dmitry Gutov <[email protected]>
Commit: Dmitry Gutov <[email protected]>

    etags-regen--maybe-generate: No error when no project found
    
    * lisp/progmodes/etags-regen.el (etags-regen--maybe-generate):
    When no project found, abort cleanly with a message.
---
 lisp/progmodes/etags-regen.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lisp/progmodes/etags-regen.el b/lisp/progmodes/etags-regen.el
index b9cb75358c0..9be4be9f92d 100644
--- a/lisp/progmodes/etags-regen.el
+++ b/lisp/progmodes/etags-regen.el
@@ -236,8 +236,9 @@ is used in buffers that have no alternative completion configured."
                ;; this mode, skip all functionality.
                (not (or tags-file-name
                         tags-table-list))
-               (file-exists-p (etags-regen--choose-tags-file
-                               (setq proj (project-current)))))
+               (prog1 (setq proj (project-current))
+                 (unless proj (message "No project found")))
+               (file-exists-p (etags-regen--choose-tags-file proj)))
       (message "Found existing tags table, refreshing...")
       (etags-regen--refresh proj))
     (when (and (not (or tags-file-name
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.