summaryrefslogtreecommitdiffstats
path: root/runtime/indent/dylan.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-06-13 18:12:01 +0200
committerBram Moolenaar <Bram@vim.org>2017-06-13 18:12:01 +0200
commit3ec574f2b549f456f664f689d6da36dc5719aeb9 (patch)
tree8aa7d766ebc0eb3919fdc678e6f48dd0a2b36673 /runtime/indent/dylan.vim
parent2102035488e80ef6fd5038ed15d21672712ba0f6 (diff)
Update runtime files.
Includes changing &sw to shiftwidth() for all indent scripts.
Diffstat (limited to 'runtime/indent/dylan.vim')
-rw-r--r--runtime/indent/dylan.vim12
1 files changed, 6 insertions, 6 deletions
diff --git a/runtime/indent/dylan.vim b/runtime/indent/dylan.vim
index 0afcbeada7..6811ec4af5 100644
--- a/runtime/indent/dylan.vim
+++ b/runtime/indent/dylan.vim
@@ -1,7 +1,7 @@
" Vim indent file
" Language: Dylan
" Version: 0.01
-" Last Change: 2003 Feb 04
+" Last Change: 2017 Jun 13
" Maintainer: Brent A. Fulgham <bfulgham@debian.org>
" Only load this indent file when no other was loaded.
@@ -45,13 +45,13 @@ function DylanGetIndent()
" If previous line was a 'define', indent
if prevline =~? '\(^\s*\(begin\|block\|case\|define\|else\|elseif\|for\|finally\|if\|select\|unless\|while\)\|\s*\S*\s*=>$\)'
- let chg = &sw
+ let chg = shiftwidth()
" local methods indent the shift-width, plus 6 for the 'local'
elseif prevline =~? '^\s*local'
- let chg = &sw + 6
+ let chg = shiftwidth() + 6
" If previous line was a let with no closing semicolon, indent
elseif prevline =~? '^\s*let.*[^;]\s*$'
- let chg = &sw
+ let chg = shiftwidth()
" If previous line opened a parenthesis, and did not close it, indent
elseif prevline =~ '^.*(\s*[^)]*\((.*)\)*[^)]*$'
return = match( prevline, '(.*\((.*)\|[^)]\)*.*$') + 1
@@ -75,13 +75,13 @@ function DylanGetIndent()
" line doesn't start with an indentable command:
let curr_str = getline(curr_line)
if curr_str =~? '^\s*\(begin\|block\|case\|define\|else\|elseif\|for\|finally\|if\|select\|unless\|while\)'
- let chg = &sw
+ let chg = shiftwidth()
endif
endif
" If a line starts with end, un-indent (even if we just indented!)
if cline =~? '^\s*\(cleanup\|end\|else\|elseif\|exception\|finally\|otherwise\)'
- let chg = chg - &sw
+ let chg = chg - shiftwidth()
endif
return ind + chg