Function: projection--current-project

projection--current-project is a natively compiled function defined in projection-core-misc.el.

Signature

(projection--current-project &optional NO-ERROR)

Documentation

Retrieve the current project or raise an error.

If NO-ERROR then don't raise an error if the project could not be resolved.

Source Code

;; Defined in /nix/store/j6y921qbdmdqxjnd43iibapbig3p4hai-emacs-packages-deps/share/emacs/site-lisp/elpa/projection-20260614.1822/projection-core-misc.el
(defun projection--current-project (&optional no-error)
  "Retrieve the current project or raise an error.
If NO-ERROR then don't raise an error if the project could not be resolved."
  ;; TODO: Maybe this is worth caching locally in the current buffer as well.
  (if-let* ((project (project-current)))
      project
    (unless no-error
      (user-error "No project found relative to %s" default-directory))))