branch: externals/eglot
commit e57be55d79f81c4023ce550ca3b5c19329ac6de2
Author: Jonathan del Strother <[email protected]>
Commit: GitHub <[email protected]>
Fix #502: silence messages while formatting markup
Also fix #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 <[email protected]>
Copyright-paperwork-exempt: yes
---
eglot.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/eglot.el b/eglot.el
index 80780f5..13fe74a 100644
--- a/eglot.el
+++ b/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))))))