@@ -25,17 +25,15 @@ setlocal indentkeys=!,o,O
25
25
" Set a new configuration option with a default value. Assigns a script-local
26
26
" version too, which is the default fallback in case the global was "unlet".
27
27
function ! s: SConf (name, default) abort
28
- exec ' let' ' s:' . a: name ' = ' string ( a: default )
28
+ let s = ' s:' . a: name
29
29
let n = ' g:' . a: name
30
- if ! exists (n ) | exec ' let' n ' =' string (a: default ) | endif
30
+ exec ' let' ' s:' . a: name ' =' string (a: default )
31
+ if ! exists (n ) | exec ' let' n ' =' s | endif
31
32
endfunction
32
33
33
- " Get the value of a configuration option with a possible fallback. If no
34
- " fallback is given, uses the original config option value.
35
- function ! s: Conf (opt , fallback = v: null ) abort
36
- return a: fallback == # v: null
37
- \ ? get (b: , a: opt , get (g: , a: opt , get (s: , a: opt )))
38
- \ : get (b: , a: opt , get (g: , a: opt , a: fallback ))
34
+ " Get the value of a configuration option with a possible fallback.
35
+ function ! s: Conf (opt , fallback) abort
36
+ return get (b: , a: opt , get (g: , a: opt , a: fallback ))
39
37
endfunction
40
38
41
39
" Available options:
@@ -246,7 +244,7 @@ function! s:StringIndent(delim_pos)
246
244
let m = mode ()
247
245
if m == # ' i' || (m == # ' n' && ! s: EqualsOperatorInEffect ())
248
246
" If in insert mode, or normal mode but "=" is not in effect.
249
- let alignment = s: Conf (' clojure_align_multiline_strings' )
247
+ let alignment = s: Conf (' clojure_align_multiline_strings' , s: clojure_align_multiline_strings )
250
248
" -1: Indent along left edge, like traditional Lisps.
251
249
" 0: Indent in alignment with end of the string start delimiter.
252
250
" 1: Indent in alignment with string start delimiter.
@@ -313,7 +311,7 @@ function! s:ListIndent(delim_pos)
313
311
" - Indent subsequent lines to align with first operand.
314
312
" else
315
313
" - Indent 1 or 2 spaces.
316
- let indent_style = s: Conf (' clojure_indent_style' )
314
+ let indent_style = s: Conf (' clojure_indent_style' , s: clojure_indent_style )
317
315
if indent_style !=# ' uniform' && ln_content[0 ] !=# ' :'
318
316
let pos = s: FirstFnArgPos (a: delim_pos )
319
317
if pos != [0 , 0 ] | return s: PosToCharCol (pos) - 1 | endif
0 commit comments