From 3e4755db25dc3e559a54f5868e5184082baa9be0 Mon Sep 17 00:00:00 2001 From: Soonho Kong Date: Fri, 19 Sep 2014 09:41:27 -0700 Subject: [PATCH] fix(emacs/lean-tags): support windows --- src/emacs/lean-tags.el | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/emacs/lean-tags.el b/src/emacs/lean-tags.el index cc46bfd28..6a680b527 100644 --- a/src/emacs/lean-tags.el +++ b/src/emacs/lean-tags.el @@ -17,12 +17,21 @@ (defun lean-generate-tags () "Run linja TAGS and let emacs use the generated TAGS file." (interactive) - (let ((ltags-file-name (lean-get-executable "linja"))) + (let* ((ltags-file-name (lean-get-executable "linja")) + ltags-command) + (setq ltags-command + (cond ((string= system-type "windows-nt") + + (append '("python" nil "*lean-tags*" nil) + `(,ltags-file-name) + lean-flycheck-checker-options + '("tags"))) + (t + (append `(,ltags-file-name nil "*lean-tags*" nil) + lean-flycheck-checker-options + '("tags"))))) (message "Generating TAGS...") - (apply 'call-process - (append `(,ltags-file-name nil "*lean-tags*" nil) - lean-flycheck-checker-options - '("TAGS"))) + (apply 'call-process ltags-command) (message "TAGS generated.") (setq tags-table-list (lean-tags-table-list))))