lang/markdown: only warn if all compilers are unavailable
Rather than check each individual module.
This commit is contained in:
parent
7900d8a10e
commit
6153af9594
1 changed files with 8 additions and 7 deletions
|
@ -3,13 +3,14 @@
|
|||
|
||||
(when (require 'markdown-mode nil t)
|
||||
(cond ((eq markdown-command #'+markdown-compile)
|
||||
(dolist (cmd (list (cons "marked" '+markdown-compile-marked)
|
||||
(unless (cl-loop for (exe . cmd) in (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)))))
|
||||
(cons "markdown" '+markdown-compile-markdown)
|
||||
(cons "multimarkdown" '+markdown-compile-multimarkdown))
|
||||
if (and (memq cmd +markdown-compile-functions)
|
||||
(executable-find exe))
|
||||
return t)
|
||||
(warn! "Couldn't find a markdown compiler, `markdown-preview' won't work")))
|
||||
((stringp markdown-command)
|
||||
(let ((cmd (car (split-string markdown-command " "))))
|
||||
(unless (executable-find cmd)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue