Function: eglot--collecting-xrefs
eglot--collecting-xrefs is a macro defined in eglot.el.gz.
Signature
(eglot--collecting-xrefs (COLLECTOR) &rest BODY)
Documentation
Sort and handle xrefs collected with COLLECTOR in BODY.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/eglot.el.gz
(cl-defmacro eglot--collecting-xrefs ((collector) &rest body)
"Sort and handle xrefs collected with COLLECTOR in BODY."
(declare (indent 1) (debug (sexp &rest form)))
(let ((collected (cl-gensym "collected")))
`(unwind-protect
(let (,collected)
(cl-flet ((,collector (xref) (push xref ,collected)))
,@body)
(setq ,collected (nreverse ,collected))
(sort ,collected eglot-xref-lessp-function))
(maphash (lambda (_uri buf) (kill-buffer buf)) eglot--temp-location-buffers)
(clrhash eglot--temp-location-buffers))))