call append("$", "\t(local to buffer)")
call <SID>BinOptionL("lisp")
call append("$", "lispwords\twords that change how lisp indenting works")
- call <SID>OptionG("lw", &lw)
+ call <SID>OptionL("lw", &lw)
endif
#define PV_KP OPT_BOTH(OPT_BUF(BV_KP))
#ifdef FEAT_LISP
# define PV_LISP OPT_BUF(BV_LISP)
+# define PV_LW OPT_BOTH(OPT_BUF(BV_LW))
#endif
#define PV_MA OPT_BUF(BV_MA)
#define PV_ML OPT_BUF(BV_ML)
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
{"lispwords", "lw", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
#ifdef FEAT_LISP
- (char_u *)&p_lispwords, PV_NONE,
+ (char_u *)&p_lispwords, PV_LW,
{(char_u *)LISPWORD_VALUE, (char_u *)0L}
#else
(char_u *)NULL, PV_NONE,
check_string_option(&buf->b_p_dict);
check_string_option(&buf->b_p_tsr);
#endif
+#ifdef FEAT_LISP
+ check_string_option(&buf->b_p_lw);
+#endif
}
/*
case PV_UL:
buf->b_p_ul = NO_LOCAL_UNDOLEVEL;
break;
+#ifdef FEAT_LISP
+ case PV_LW:
+ clear_string_option(&buf->b_p_lw);
+ break;
+#endif
}
}
case PV_STL: return (char_u *)&(curwin->w_p_stl);
#endif
case PV_UL: return (char_u *)&(curbuf->b_p_ul);
+#ifdef FEAT_LISP
+ case PV_LW: return (char_u *)&(curbuf->b_p_lw);
+#endif
}
return NULL; /* "cannot happen" */
}
#endif
case PV_UL: return curbuf->b_p_ul != NO_LOCAL_UNDOLEVEL
? (char_u *)&(curbuf->b_p_ul) : p->var;
+#ifdef FEAT_LISP
+ case PV_LW: return *curbuf->b_p_lw != NUL
+ ? (char_u *)&(curbuf->b_p_lw) : p->var;
+#endif
#ifdef FEAT_ARABIC
case PV_ARAB: return (char_u *)&(curwin->w_p_arab);
#ifdef FEAT_PERSISTENT_UNDO
buf->b_p_udf = p_udf;
#endif
+#ifdef FEAT_LISP
+ buf->b_p_lw = empty_option;
+#endif
/*
* Don't copy the options set by ex_help(), use the saved values,
-Tests for 'undolevel' setting being global-local
+Tests for 'undolevel' and 'lispwords' settings being global-local
STARTTEST
:so small.vim
:call UndoLevel()
:%w >> test.out
:"sleep 10
+:"
+:" Testing 'lispwords'
+:"
+:setglobal lispwords=foo,bar,baz
+:setlocal lispwords-=foo | setlocal lispwords+=quux
+:redir >> test.out | echon "\nTesting 'lispwords' local value" | setglobal lispwords? | setlocal lispwords? | echo &lispwords . "\n" | redir end
+:setlocal lispwords<
+:redir >> test.out | echon "\nTesting 'lispwords' value reset" | setglobal lispwords? | setlocal lispwords? | echo &lispwords . "\n" | redir end
:qa!
ENDTEST