From: Xu Chunyang <4550353+xuchunyang@users.noreply.github.com> Date: Sun, 27 Oct 2019 15:41:53 +0000 (+0800) Subject: Don't run mode hooks in eglot--format-markup X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~285 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7cda807726c633df17a08d53308d8a59220ec083;p=emacs.git Don't run mode hooks in eglot--format-markup * eglot.el (eglot--format-markup): Use delay-mode-hooks. Copyright-paperwork-exempt: yes --- 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.