Function: combobulate--refactor-set-field

combobulate--refactor-set-field is a natively compiled function defined in combobulate-manipulation.el.

Signature

(combobulate--refactor-set-field OV TEXT &optional DEFAULT-TEXT)

Source Code

;; Defined in /nix/store/b5fvrwzi3zvkabyzx0in6gw1cj963z46-emacs-packages-deps/share/emacs/site-lisp/combobulate-manipulation.el
(defun combobulate--refactor-set-field (ov text &optional default-text)
  (let ((start (overlay-start ov))
        (s (if (length= text 0) default-text text))
        (transformer-fn (or (overlay-get ov 'combobulate-refactor-field-transformer-fn)
                            #'identity)))
    (delete-region start (overlay-end ov))
    (goto-char start)
    (insert (funcall transformer-fn s))
    (move-overlay ov start (point))))