Function: projectile--maybe-run-project-changed-functions

projectile--maybe-run-project-changed-functions is a byte-compiled function defined in projectile.el.

Signature

(projectile--maybe-run-project-changed-functions &optional PROJECT-ROOT)

Documentation

Run projectile-project-changed-functions when the project changed.

PROJECT-ROOT defaults to the current project. The last seen project is tracked in projectile--current-project.

Source Code

;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile--maybe-run-project-changed-functions (&optional project-root)
  "Run `projectile-project-changed-functions' when the project changed.
PROJECT-ROOT defaults to the current project.  The last seen project
is tracked in `projectile--current-project'."
  (when projectile-project-changed-functions
    (when-let* ((project-root (or project-root (projectile-project-p))))
      (unless (equal project-root projectile--current-project)
        (let ((previous projectile--current-project))
          (setq projectile--current-project project-root)
          (run-hook-with-args 'projectile-project-changed-functions
                              project-root previous))))))