File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change 1+ - Add ` dune-find-dominating ` to ` dune.el ` , a command to find the
2+ dominating dune file. (#12696 , @arvidj )
Original file line number Diff line number Diff line change @@ -426,6 +426,17 @@ For customization purposes, use `dune-mode-hook'."
426426 (compile (format " %s build @@runtest" dune-command))
427427 (dune-promote))
428428
429+ ;;;### autoload
430+ (defun dune-find-dominating ()
431+ " Find dominating dune file."
432+ (interactive )
433+ (if-let* ((dune-file (locate-dominating-file " ." " dune" ))
434+ (dune-file (concat dune-file " dune" )))
435+ (progn
436+ (xref-push-marker-stack )
437+ (find-file dune-file))
438+ (error " Found no dune file dominating %s " default-directory)))
439+
429440(defun dune-project-p (directory )
430441 " Return t if DIRECTORY is a dune project."
431442 (file-exists-p (expand-file-name " dune-project" directory)))
You can’t perform that action at this time.
0 commit comments