Skip to content

Commit 960a503

Browse files
committed
Remove more globally scoped options, unlet! s:vars
Trying to remove all objections to inclusion into Vim
1 parent 5430292 commit 960a503

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

ftplugin/clojure.vim

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,9 @@ if has("gui_win32") && !exists("b:browsefilter")
7070
let b:undo_ftplugin .= ' | unlet! b:browsefilter'
7171
endif
7272

73-
delfunction s:escape_path_for_option
74-
7573
let &cpo = s:cpo_save
7674

75+
unlet! s:cpo_save s:compfile s:dir
76+
delfunction s:escape_path_for_option
77+
7778
" vim:sts=4 sw=4 et:

indent/clojure.vim

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ if exists("*searchpairpos")
105105
return [pos[0], virtcol(pos)]
106106
endfunction
107107

108-
function! ClojureCheckForStringWorker()
108+
function! s:ClojureCheckForStringWorker()
109109
" Check whether there is the last character of the previous line is
110110
" highlighted as a string. If so, we check whether it's a ". In this
111111
" case we have to check also the previous character. The " might be the
@@ -147,14 +147,14 @@ if exists("*searchpairpos")
147147
function! s:CheckForString()
148148
let pos = s:SavePosition()
149149
try
150-
let val = ClojureCheckForStringWorker()
150+
let val = s:ClojureCheckForStringWorker()
151151
finally
152152
call s:RestorePosition(pos)
153153
endtry
154154
return val
155155
endfunction
156156

157-
function! ClojureIsMethodSpecialCaseWorker(position)
157+
function! s:ClojureIsMethodSpecialCaseWorker(position)
158158
" Find the next enclosing form.
159159
call search('\S', 'Wb')
160160

@@ -183,7 +183,7 @@ if exists("*searchpairpos")
183183
function! s:IsMethodSpecialCase(position)
184184
let pos = s:SavePosition()
185185
try
186-
let val = ClojureIsMethodSpecialCaseWorker(a:position)
186+
let val = s:ClojureIsMethodSpecialCaseWorker(a:position)
187187
finally
188188
call s:RestorePosition(pos)
189189
endtry
@@ -323,8 +323,6 @@ endif
323323
" The arglists for these functions are generally in the form of [x & body];
324324
" Functions that accept a flat list of forms do not treat the first argument
325325
" specially and hence are not indented specially.
326-
"
327-
" We make an exception for exception handling, since it is exceptional. :)
328326

329327
" Definitions
330328
setlocal lispwords=
@@ -395,5 +393,6 @@ setlocal lispwords+=catch
395393
setlocal lispwords+=try " For aesthetics when enclosing single line
396394

397395
let &cpo = s:save_cpo
396+
unlet! s:save_cpo
398397

399398
" vim:sts=4 sw=4 et:

syntax/clojure.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ let s:radixChars = "0123456789abcdefghijklmnopqrstuvwxyz"
5454
for s:radix in range(2, 36)
5555
execute 'syntax match clojureNumber "\c\<-\?' . s:radix . 'r[' . strpart(s:radixChars, 0, s:radix) . ']\+\>"'
5656
endfor
57+
unlet! s:radixChars s:radix
5758

5859
syntax match clojureNumber "\<-\=[0-9]\+\(\.[0-9]*\)\=\(M\|\([eE][-+]\?[0-9]\+\)\)\?\>"
5960
syntax match clojureNumber "\<-\=[0-9]\+N\?\>"

0 commit comments

Comments
 (0)