aboutsummaryrefslogtreecommitdiff
path: root/vim/after/ftplugin/text/spell.vim
diff options
context:
space:
mode:
Diffstat (limited to 'vim/after/ftplugin/text/spell.vim')
-rw-r--r--vim/after/ftplugin/text/spell.vim12
1 files changed, 8 insertions, 4 deletions
diff --git a/vim/after/ftplugin/text/spell.vim b/vim/after/ftplugin/text/spell.vim
index 107723e5..322090ca 100644
--- a/vim/after/ftplugin/text/spell.vim
+++ b/vim/after/ftplugin/text/spell.vim
@@ -4,12 +4,16 @@ if exists('b:did_ftplugin_text_spell') || &compatible
finish
endif
let b:did_ftplugin_text_spell = 1
-let b:undo_ftplugin = b:undo_ftplugin
- \ . '|unlet b:did_ftplugin_text_spell'
+if exists('b:undo_ftplugin')
+ let b:undo_ftplugin = b:undo_ftplugin
+ \ . '|unlet b:did_ftplugin_text_spell'
+endif
" Spellcheck documents by default
if has('syntax')
setlocal spell
- let b:undo_ftplugin = b:undo_ftplugin
- \ . '|setlocal spell<'
+ if exists('b:undo_ftplugin')
+ let b:undo_ftplugin = b:undo_ftplugin
+ \ . '|setlocal spell<'
+ endif
endif