Function: markdown--project-root

markdown--project-root is a byte-compiled function defined in markdown-mode.el.

Signature

(markdown--project-root)

Documentation

Try various approaches to find the project root.

Source Code

;; Defined in ~/.emacs.d/elpa/markdown-mode-20260321.143/markdown-mode.el
(defun markdown--project-root ()
  "Try various approaches to find the project root."
  (or (cl-loop for dir in '(".git" ".hg" ".svn")
               when (locate-dominating-file default-directory dir)
               return it)
      (progn
        (require 'project)
        (let ((project (project-current t)))
          (with-no-warnings
            (if (fboundp 'project-root)
                (project-root project)
              (car (project-roots project))))))))