João Távora writes: >> >> 3. Eglot uses the eglot--apply-text-edits defun to apply server >> >> initiated edits. There is an extension that allows the server to >> >> send the edits in a different format (snippet-text-edits). >> >> >> >> Eglot-x puts an advise on eglot--apply-text-edits to check the format >> >> of the edits and act accordingly. >> >> >> >> I don't know how to avoid this advice. >> > >> > Some hook or function variable, perhaps? If they don't exist, perhaps >> > they could be added? > But then, I wonder, since most of Eglot's API is already CLOS > based, isn't a generic function best? A generic function can > have :around methods, and if we follow the convention of > passing the server as the first argument, third parties > can make server-specific extensions. You're right, I think. In the attached patch, I simply changed eglot--apply-text-edits to a cl-defgeneric and renamed it. The patch is straightforward, but I had to eliminate a cl-return-from call, because generic functions don't seem to support that. Thanks.