Function: projectile-current-project-buffer-p

projectile-current-project-buffer-p is a byte-compiled function defined in projectile.el.

Signature

(projectile-current-project-buffer-p)

Documentation

Meant to be used for `compilation-save-buffers-predicate`.

This indicates whether the current buffer is in the same project as the current window (including returning true if neither is in a project).

Source Code

;; Defined in ~/.emacs.d/elpa/projectile-20260310.858/projectile.el
(defun projectile-current-project-buffer-p ()
  "Meant to be used for `compilation-save-buffers-predicate`.
This indicates whether the current buffer is in the same project as the current
window (including returning true if neither is in a project)."
  (let ((root (with-current-buffer (window-buffer) (projectile-project-root))))
    (or (not root)
        (projectile-project-buffer-p (current-buffer) root))))