Function: eglot-booster--wrap-contact

eglot-booster--wrap-contact is a natively compiled function defined in eglot-booster.el.

Signature

(eglot-booster--wrap-contact ARGS)

Documentation

Wrap contact within ARGS if possible.

Source Code

;; Defined in /nix/store/qd8jjgh8k2c0q3lbcy0sw59mn9h6khis-emacs-packages-deps/share/emacs/site-lisp/eglot-booster.el
(defun eglot-booster--wrap-contact (args)
  "Wrap contact within ARGS if possible."
  (let ((contact (nth 3 args))
	(def-args (if eglot-booster-io-only
		      eglot-booster--boost-io-only
		    eglot-booster--boost)))
    (cond
     ((and eglot-booster-no-remote-boost (file-remote-p default-directory)))
     ((functionp contact)
      (setf (nth 3 args)
	    (lambda (&optional interactive)
          (let ((res (if (eq 0 (cdr (func-arity contact)))
                         (funcall contact)
                       (funcall contact interactive))))
		(if (eglot-booster-plain-command res)
		    (append def-args res)
		  res)))))
     ((eglot-booster-plain-command contact)
      (setf (nth 3 args) (append def-args contact))))
    args))