From 7cda807726c633df17a08d53308d8a59220ec083 Mon Sep 17 00:00:00 2001 From: Xu Chunyang <4550353+xuchunyang@users.noreply.github.com> Date: Sun, 27 Oct 2019 23:41:53 +0800 Subject: [PATCH] Don't run mode hooks in eglot--format-markup * eglot.el (eglot--format-markup): Use delay-mode-hooks. Copyright-paperwork-exempt: yes --- lisp/progmodes/eglot.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index b9496e166d2..285dc50ac84 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -1083,7 +1083,9 @@ Doubles as an indicator of snippet support." major-mode)))) (with-temp-buffer (insert string) - (ignore-errors (funcall mode)) (font-lock-ensure) (buffer-string)))) + (ignore-errors (delay-mode-hooks (funcall mode))) + (font-lock-ensure) + (buffer-string)))) (defcustom eglot-ignored-server-capabilites (list) "LSP server capabilities that Eglot could use, but won't. -- 2.39.2