Function: bazel--find-magic-comment
bazel--find-magic-comment is a natively compiled function defined in
bazel.el.
Signature
(bazel--find-magic-comment BOUND)
Documentation
Search for a magic comment from point to BOUND.
If a magic comment was found, return non-nil and set the match to the comment text.
Source Code
;; Defined in /nix/store/ws8pkszjvcad1rgzqw6wja7qxacylfhn-emacs-packages-deps/share/emacs/site-lisp/elpa/bazel-20261002.1510/bazel.el
(defun bazel--find-magic-comment (bound)
"Search for a magic comment from point to BOUND.
If a magic comment was found, return non-nil and set the match to
the comment text."
(declare (ftype (function (integer) t)))
(cl-check-type bound natnum)
;; Buildifier's magic comment detection appears to be case-insensitive, but
;; isn't documented as such. Reference in the source: https://git.io/JO6FG.
(let ((case-fold-search t)
(search-spaces-regexp nil))
(with-case-table ascii-case-table
(and (re-search-forward bazel--magic-comment-regexp bound t)
(ppss-comment-depth (syntax-ppss))))))