From 514f80333b5d1aaff5c1ed1f03b3a49321381073 Mon Sep 17 00:00:00 2001 From: Jonathan del Strother Date: Sun, 21 Feb 2021 10:07:57 +0000 Subject: [PATCH] Silence messages while formatting markup MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Copyright-paperwork-exempt: yes GitHub-reference: fix https://github.com/joaotavora/eglot/issues/502 --- 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 80780f57f9a..13fe74a9057 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -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)))))) -- 2.39.2