From b1e23238e6c6cc60e3aa1c26fe15560cdd223ef3 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 21 May 2019 17:14:10 -0400 Subject: [PATCH] lang/markdown: generalize markdown compile fn So it can be used with the original perl script, discout, or the renamed executable on MacOS. --- modules/lang/markdown/autoload.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/lang/markdown/autoload.el b/modules/lang/markdown/autoload.el index 2a9595bc3..7fcfcd97a 100644 --- a/modules/lang/markdown/autoload.el +++ b/modules/lang/markdown/autoload.el @@ -77,10 +77,11 @@ Returns its exit code." ;;;###autoload (defun +markdown-compile-markdown (beg end output-buffer) - "Compiles markdown using the markdown program, if available. -Returns its exit code." - (when (executable-find "markdown") + "Compiles markdown using the Markdown.pl script (or markdown executable), if +available. Returns its exit code." + (when-let* ((exe (or (executable-find "Markdown.pl") + (executable-find "markdown")))) (call-process-region beg end shell-file-name nil output-buffer nil shell-command-switch - "markdown"))) + exe)))