Function: bazel-insert-dependency

bazel-insert-dependency is an interactive and natively compiled function defined in bazel.el.

Signature

(bazel-insert-dependency &optional STR ARG)

Documentation

Insert a “bazel_dep” statement at point.

This is a skeleton command (see skeleton-insert). Normally the skeleton text is inserted at point, with nothing "inside". If there is a highlighted region, the skeleton text is wrapped around the region text.

A prefix argument ARG says to wrap the skeleton around the next ARG words. A prefix argument of -1 says to wrap around region, even if not highlighted. A prefix argument of zero says to wrap around zero words---that is, nothing. This is a way of overriding the use of a highlighted region.

Key Bindings

This command is not in any keymaps.

Source Code

;; Defined in /nix/store/ws8pkszjvcad1rgzqw6wja7qxacylfhn-emacs-packages-deps/share/emacs/site-lisp/elpa/bazel-20261002.1510/bazel.el
(define-skeleton bazel-insert-dependency
  "Insert a “bazel_dep” statement at point."
  ;; We store the BCR table in ‘v1’.  Note that ‘skeleton-insert’ evaluates the
  ;; interactor only when it’s first required (i.e., upon first encountering
  ;; ‘str’, unless passed to the skeleton function as argument), so we can
  ;; initialize ‘v1’ lexically after the interactor.  The ‘n’ element needs to
  ;; be the first to work correctly.
  (completing-read "Module: " v1 nil 'confirm nil 'bazel-module-history)
  n "bazel_dep(name = \"" '(setq v1 (bazel--central-registry)) str
  "\", version = \"" (gethash str v1) | _ "\")\n")