Fixes against errors/warnings in vint

This commit is contained in:
mattn
2014-12-17 17:26:10 +09:00
parent edf74342b5
commit 47b54c2e5e
11 changed files with 253 additions and 254 deletions

View File

@@ -1,4 +1,4 @@
function! emmet#lorem#en#expand(command)
function! emmet#lorem#en#expand(command) abort
let wcount = matchstr(a:command, '\(\d*\)$')
let wcount = wcount > 0 ? wcount : 30
@@ -48,13 +48,13 @@ function! emmet#lorem#en#expand(command)
call add(ret, word)
if (sentence > 5 && emmet#util#rand() < 10000) || i == wcount - 1
if i == wcount - 1
let endc = "?!..."[emmet#util#rand() % 5]
let endc = '?!...'[emmet#util#rand() % 5]
call add(ret, endc)
else
let endc = "?!,..."[emmet#util#rand() % 6]
let endc = '?!,...'[emmet#util#rand() % 6]
call add(ret, endc . ' ')
endif
if endc != ','
if endc !=# ','
let sentence = 0
endif
else

View File

@@ -1,6 +1,6 @@
scriptencoding utf-8
function! emmet#lorem#ja#expand(command)
function! emmet#lorem#ja#expand(command) abort
let wcount = matchstr(a:command, '^\%(lorem\|lipsum\)\(\d*\)}$', '\1', '')
let wcount = wcount > 0 ? wcount : 30