lang/markdown: fix doctor's executable detection

This commit is contained in:
Henrik Lissner 2019-05-19 15:22:51 -04:00
parent 57bd7a385e
commit a6ebd95aee
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -6,6 +6,16 @@
(warn! "Couldn't find pandoc, markdown-mode may have issues")))
(when (require 'markdown-mode nil t)
(unless (executable-find markdown-command)
(warn! "Couldn't find %S, can't export markdown to html"
markdown-command)))
(cond ((eq markdown-command #'+markdown-compile)
(dolist (cmd (list (cons "marked" '+markdown-compile-marked)
(cons "pandoc" '+markdown-compile-pandoc)
(cons "markdown" '+markdown-compile-markdown)))
(when (and (memq (cdr cmd) +markdown-compile-functions)
(not (executable-find (car cmd))))
(warn! "Couldn't find %S. markdown-preview command won't work"
(car cmd)))))
((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))))))