fix(emacs/lean-tags): support windows

This commit is contained in:
Soonho Kong 2014-09-19 09:41:27 -07:00
parent af4e18dd44
commit 3e4755db25

View file

@ -17,12 +17,21 @@
(defun lean-generate-tags () (defun lean-generate-tags ()
"Run linja TAGS and let emacs use the generated TAGS file." "Run linja TAGS and let emacs use the generated TAGS file."
(interactive) (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...") (message "Generating TAGS...")
(apply 'call-process (apply 'call-process ltags-command)
(append `(,ltags-file-name nil "*lean-tags*" nil)
lean-flycheck-checker-options
'("TAGS")))
(message "TAGS generated.") (message "TAGS generated.")
(setq tags-table-list (lean-tags-table-list)))) (setq tags-table-list (lean-tags-table-list))))