2018-06-22 13:46:56 +02:00
|
|
|
;; -*- lexical-binding: t; no-byte-compile: t; -*-
|
|
|
|
;;; lang/markdown/doctor.el
|
|
|
|
|
2019-03-30 02:17:52 -04:00
|
|
|
(when (require 'markdown-mode nil t)
|
2019-05-19 15:22:51 -04:00
|
|
|
(cond ((eq markdown-command #'+markdown-compile)
|
2019-07-14 00:24:09 +02:00
|
|
|
(unless (cl-loop for (exe . cmd) in (list (cons "marked" '+markdown-compile-marked)
|
2024-07-11 03:37:37 -04:00
|
|
|
(cons "pandoc" '+markdown-compile-pandoc)
|
|
|
|
(cons "markdown" '+markdown-compile-markdown)
|
|
|
|
(cons "multimarkdown" '+markdown-compile-multimarkdown))
|
2019-07-14 00:24:09 +02:00
|
|
|
if (and (memq cmd +markdown-compile-functions)
|
|
|
|
(executable-find exe))
|
|
|
|
return t)
|
|
|
|
(warn! "Couldn't find a markdown compiler, `markdown-preview' won't work")))
|
2019-05-19 15:22:51 -04:00
|
|
|
((stringp markdown-command)
|
|
|
|
(let ((cmd (car (split-string markdown-command " "))))
|
|
|
|
(unless (executable-find cmd)
|
|
|
|
(warn! "Couldn't find %S. markdown-preview command won't work"
|
|
|
|
cmd))))))
|
2019-10-19 09:41:08 +13:00
|
|
|
|
2022-08-12 20:29:19 +02:00
|
|
|
(when (modulep! +grip)
|
2019-10-19 09:41:08 +13:00
|
|
|
(unless (executable-find "grip")
|
|
|
|
(warn! "Couldn't find grip. grip-mode will not work")))
|