Function: bazel-mode-ffap

bazel-mode-ffap is a natively compiled function defined in bazel.el.

Signature

(bazel-mode-ffap FILENAME)

Documentation

Attempt to find FILENAME in all repositories.

This gets added to ‘ffap-alist’.

Source Code

;; Defined in /nix/store/ws8pkszjvcad1rgzqw6wja7qxacylfhn-emacs-packages-deps/share/emacs/site-lisp/elpa/bazel-20261002.1510/bazel.el
(defun bazel-mode-ffap (filename)
  "Attempt to find FILENAME in all repositories.
This gets added to ‘ffap-alist’."
  (declare (ftype (function (string) (or string null))))
  (cl-check-type filename string)
  (when-let* ((this-file (or buffer-file-name default-directory))
              (main-root (bazel--repository-root this-file)))
    (let ((external-roots (bazel--external-repository-roots main-root)))
      (bazel--locate-file filename (cons main-root external-roots)))))