From: João Távora Date: Sun, 3 May 2020 00:00:04 +0000 (+0100) Subject: Fontify markdown source code blocks by default X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~229 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c8efef647e2705665a8e3b9de3eedccc209fc981;p=emacs.git Fontify markdown source code blocks by default * eglot.el (eglot--format-markup): Set markdown-fontify-code-blocks-natively to t locally. GitHub-reference: per https://github.com/joaotavora/eglot/issues/408 --- diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 596a82d6a80..22a8aefa311 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -72,7 +72,9 @@ (require 'filenotify) (require 'ert) (require 'array) -(defvar company-backends) ; forward-declare, but don't require company +;; forward-declare, but don't require (Emacs 28 doesn't seem to care) +(defvar markdown-fontify-code-blocks-natively) +(defvar company-backends) (defvar company-tooltip-align-annotations) @@ -1149,6 +1151,7 @@ Doubles as an indicator of snippet support." ("plaintext" 'text-mode) (_ major-mode)))))) (with-temp-buffer + (setq-local markdown-fontify-code-blocks-natively t) (insert (string-trim string)) (ignore-errors (delay-mode-hooks (funcall mode))) (font-lock-ensure)