1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-05-22 05:09:04 -07:00

Eglot: fix thinko in recent markdown-related commit (bug#81063)

* lisp/progmodes/eglot.el (eglot--format-markup): Correct return value
for gfm-view-mode.
This commit is contained in:
Brian Leung 2026-05-17 19:22:39 +01:00 committed by João Távora
parent 36036e71c0
commit 6c1829bf4c

View file

@ -2255,12 +2255,13 @@ If MODE, force MODE to be used for fontifying MARKUP."
for to = (or (next-single-property-change from 'invisible)
(point-max))
when inv
do (put-text-property from to 'invisible t)))
do (put-text-property from to 'invisible t)
finally return (buffer-string)))
(calc2 (forced-mode)
(cond
(forced-mode `(,forced-mode))
(built-in `(,#'markdown-ts-view-mode))
((fboundp 'gfm-view-mode) `(,#'gfm-view-mode #'gfm-extract))
((fboundp 'gfm-view-mode) `(,#'gfm-view-mode ,#'gfm-extract))
(t `(#'text-mode))))
(calc (s &optional (forced-mode mode) &aux (x (calc2 forced-mode)))
(setq string s render (car x) extract (or (cadr x) #'buffer-string))))