Function: apheleia-formatters-locate-file
apheleia-formatters-locate-file is a natively compiled function
defined in apheleia-utils.el.
Signature
(apheleia-formatters-locate-file FILE-FLAG FILE-NAME)
Documentation
Set a flag based on a dominating-file.
Look for a file up recursively from the current directory until FILE-NAME is found. If found return a list of FILE-FLAG and the absolute path to the located FILE-NAME.
Source Code
;; Defined in /nix/store/lwcwryzabcmvjcwwzzs65jrwf7p7d7cs-emacs-packages-deps/share/emacs/site-lisp/elpa/apheleia-20260915.1628/apheleia-utils.el
(defun apheleia-formatters-locate-file (file-flag file-name)
"Set a flag based on a dominating-file.
Look for a file up recursively from the current directory until FILE-NAME is
found. If found return a list of FILE-FLAG and the absolute path to the located
FILE-NAME."
(when-let* ((file (locate-dominating-file default-directory file-name)))
(list file-flag (concat (expand-file-name file) file-name))))