From: Ship Mints Date: Thu, 13 Feb 2025 00:14:57 +0000 (+0200) Subject: project-(remember|forget)-projects-under: Improve docstrings X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4a64da24f94fffb417156786a64b47e7d7405cc5;p=emacs.git project-(remember|forget)-projects-under: Improve docstrings * lisp/progmodes/project.el (project-forget-projects-under) (project-remember-projects-under): Clarify docstrings (bug#76234). (cherry picked from commit 6077bbfc3d4a4aa042b364d31dd681e9f7ab7f30) --- diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index b7e1db820b5..3d12c50b15e 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -2066,11 +2066,13 @@ bindings from `project-prefix-map'." (project-any-command project-prefix-map "[execute in %s]:")) (defun project-remember-projects-under (dir &optional recursive) - "Index all projects below a directory DIR. -If RECURSIVE is non-nil, recurse into all subdirectories to find -more projects. After finishing, a message is printed summarizing -the progress. The function returns the number of detected -projects." + "Remember projects below a directory DIR. +Interactively, prompt for DIR. +Optional argument RECURSIVE, if non-nil (interactively, the prefix +argument) means recurse into subdirectories of DIR to find more +projects. +Display a message at the end summarizing what was found. +Return the number of detected projects." (interactive "DDirectory: \nP") (project--ensure-read-project-list) (let ((dirs (if recursive @@ -2107,10 +2109,12 @@ projects." (defun project-forget-projects-under (dir &optional recursive) "Forget all known projects below a directory DIR. -If RECURSIVE is non-nil, recurse into all subdirectories to -remove all known projects. After finishing, a message is printed -summarizing the progress. The function returns the number of -forgotten projects." +Interactively, prompt for DIR. +Optional argument RECURSIVE, if non-nil (interactively, the prefix +argument), means recurse into subdirectories under DIR +to remove those projects from the index. +Display a message at the end summarizing what was forgotten. +Return the number of forgotten projects." (interactive "DDirectory: \nP") (let ((count 0)) (if recursive