0.2.1 - remove g:syntastic_applescript_tempfile. use tempname() instead.

This commit is contained in:
Zhao Cai 2011-12-09 13:11:45 -05:00
parent 2302f12367
commit 6a7529713b

View File

@ -3,17 +3,20 @@
" Desc: Syntax checking plugin for syntastic.vim
" Author: Zhao Cai
" Email: caizhaoff@gmail.com
" Version: 0.1
" Version: 0.2.1
" Date Created: Thu 09 Sep 2011 10:30:09 AM EST
" Last Modified: Fri 09 Dec 2011 10:32:04 AM EST
" Last Modified: Fri 09 Dec 2011 01:10:24 PM EST
"
" History: 0.1 - working, but it will run the script everytime to check
" History: 0.1.0 - working, but it will run the script everytime to check
" syntax. Should use osacompile but strangely it does not give
" errors.
"
" 0.1.1 - switch to osacompile, it gives less errors compared
" 0.2.0 - switch to osacompile, it gives less errors compared
" with osascript.
"
" 0.2.1 - remove g:syntastic_applescript_tempfile. use
" tempname() instead.
"
" License: This program is free software. It comes without any
" warranty, to the extent permitted by applicable law. You can
" redistribute it and/or modify it under the terms of the Do What The
@ -32,21 +35,8 @@ if !executable("osacompile")
finish
endif
if !exists("g:syntastic_applescript_tempfile")
echohl WarningMsg
echom "set g:syntastic_applescript_tempfile = /path/to/file.scpt is recommanded."
echohl NONE
let s:osacompile = 'osacompile -o ' . shellescape(expand('%:p:r') . '.scpt')
else
if &verbose > 1 && filereadable(g:syntastic_applescript_tempfile)
echom g:syntastic_applescript_tempfile . ' exists. Make sure it is OK to overwrite!'
endif
let s:osacompile = 'osacompile -o ' . g:syntastic_applescript_tempfile
endif
function! SyntaxCheckers_applescript_GetLocList()
let makeprg = s:osacompile .' '. shellescape(expand('%'))
let makeprg = 'osacompile -o ' . tempname() . '.scpt '. shellescape(expand('%'))
let errorformat = '%f:%l:%m'
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })