Function: eglot--before-change
eglot--before-change is a byte-compiled function defined in
eglot.el.gz.
Signature
(eglot--before-change BEG END)
Documentation
Hook onto before-change-functions with BEG and END.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/eglot.el.gz
(defun eglot--before-change (beg end)
"Hook onto `before-change-functions' with BEG and END."
(when (listp eglot--recent-changes)
;; Records BEG and END, crucially convert them into LSP
;; (line/char) positions before that information is lost (because
;; the after-change thingy doesn't know if newlines were
;; deleted/added). Also record markers of BEG and END
;; (github#259)
(push `(,(eglot--pos-to-lsp-position beg)
,(eglot--pos-to-lsp-position end)
(,beg . ,(copy-marker beg nil))
(,end . ,(copy-marker end t)))
eglot--recent-changes)))