Function: gitlab-ci--post-completion

gitlab-ci--post-completion is a natively compiled function defined in gitlab-ci-mode.el.

Signature

(gitlab-ci--post-completion STRING STATUS)

Documentation

Handle special syntax after keywords/variables.

If STATUS is ‘finished’ then a “}” may be added to the end of a variable use (if it began with “${”), and a “:” may be added to the end of a keyword used as a key.

Source Code

;; Defined in /nix/store/i3kilmgmg3bk0mkr28r6pk0h5mg4s0wd-emacs-packages-deps/share/emacs/site-lisp/elpa/gitlab-ci-mode-20191022.2017/gitlab-ci-mode.el
(defun gitlab-ci--post-completion (_string status)
  "Handle special syntax after keywords/variables.

If STATUS is ‘finished’ then a “}” may be added to the end of a
variable use (if it began with “${”), and a “:” may be added to
the end of a keyword used as a key."
  (when (eq status 'finished)
    (cond
     ((and (looking-back "\\${[A-Za-z0-9_]+" (line-beginning-position))
           (not (eql (char-after) ?})))
      (insert "}"))
     ((and (looking-back "^ *[a-z_]+" (line-beginning-position))
           (not (eql (char-after) ?:)))
      (insert ":")))))