]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't run mode hooks in eglot--format-markup
authorXu Chunyang <4550353+xuchunyang@users.noreply.github.com>
Sun, 27 Oct 2019 15:41:53 +0000 (23:41 +0800)
committerJoão Távora <joaotavora@gmail.com>
Sun, 27 Oct 2019 15:41:53 +0000 (15:41 +0000)
* eglot.el (eglot--format-markup): Use delay-mode-hooks.

Copyright-paperwork-exempt: yes

lisp/progmodes/eglot.el

index b9496e166d2a5b9e4e63ff456ff38c0ca9eb2538..285dc50ac849f69d204d4939584b7ef000264858 100644 (file)
@@ -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.