]> git.eshelyaron.com Git - emacs.git/commitdiff
Silence messages while formatting markup
authorJonathan del Strother <me@delstrother.com>
Sun, 21 Feb 2021 10:07:57 +0000 (10:07 +0000)
committerGitHub <noreply@github.com>
Sun, 21 Feb 2021 10:07:57 +0000 (10:07 +0000)
Also fix https://github.com/joaotavora/eglot/issues/501.

Prior to this, activating gfm-view-mode could echo messages
like "markdown-mode math support enabled" to the minibuffer.

Message are both silenced from from the minibuffer and the
*Messaages* log.

Co-authored-by: João Távora <joaotavora@gmail.com>
Copyright-paperwork-exempt: yes
GitHub-reference: fix https://github.com/joaotavora/eglot/issues/502

lisp/progmodes/eglot.el

index 80780f57f9aceb116bded5b4442eab83e1ff8136..13fe74a905709cd8c940ecf324fa3ff2b4170dc4 100644 (file)
@@ -1196,7 +1196,9 @@ Doubles as an indicator of snippet support."
     (with-temp-buffer
       (setq-local markdown-fontify-code-blocks-natively t)
       (insert string)
-      (ignore-errors (delay-mode-hooks (funcall mode)))
+      (let ((inhibit-message t)
+           (message-log-max nil))
+        (ignore-errors (delay-mode-hooks (funcall mode))))
       (font-lock-ensure)
       (string-trim (filter-buffer-substring (point-min) (point-max))))))