From 95abbf4ba5acc9372f02ad8c18be1b7c30122d47 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Thu, 29 May 2025 22:26:59 +0300 Subject: [PATCH] project-remember-project: Support calling it interactively * lisp/progmodes/project.el (project-remember-project): Support interactive invocation (bug#78099) and react with appropriate messages when called so, depending on the blacklist. (cherry picked from commit f0bec20ac58ab84895b832fc545ea14c442d8332) --- lisp/progmodes/project.el | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 27075825b9e..b551e8b06fb 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -1868,12 +1868,18 @@ has changed, and NO-WRITE is nil." If project PR satisfies `project-list-exclude', then nothing is done. Save the result in `project-list-file' if the list of projects has changed, and NO-WRITE is nil." - (let ((root (project-root pr))) - (unless (seq-some (lambda (r) - (if (functionp r) - (funcall r pr) - (string-match-p r root))) - project-list-exclude) + (interactive (list (project-current t))) + (let ((root (project-root pr)) + (interact (called-interactively-p 'any))) + (if (seq-some (lambda (r) + (if (functionp r) + (funcall r pr) + (string-match-p r root))) + project-list-exclude) + (when interact + (message "Current project is blacklisted!")) + (when interact + (message "Current project remembered")) (project--remember-dir root no-write)))) (defun project--remove-from-project-list (project-root report-message) -- 2.39.5