Function: dockerfile--imenu-function
dockerfile--imenu-function is a natively compiled function defined in
dockerfile-mode.el.
Signature
(dockerfile--imenu-function)
Documentation
Find the previous headline from point.
Search for a FROM instruction. If an alias is used this is returned, otherwise the base image name is used.
Source Code
;; Defined in /nix/store/wfmjr60p5jy1p85wbrh60l5f6r52la4p-emacs-packages-deps/share/emacs/site-lisp/elpa/dockerfile-mode-20251221.1644/dockerfile-mode.el
(defun dockerfile--imenu-function ()
"Find the previous headline from point.
Search for a FROM instruction. If an alias is used this is
returned, otherwise the base image name is used."
(when (re-search-backward dockerfile--from-regex nil t)
(let ((data (match-data)))
(when (match-string 2)
;; we drop the first match group because
;; imenu-generic-expression can only use one offset, so we
;; normalize to `1'.
(set-match-data (list (nth 0 data) (nth 1 data) (nth 4 data) (nth 5 data))))
t)))