|
|
3ef2ca |
To: vim_dev@googlegroups.com
|
|
|
3ef2ca |
Subject: Patch 7.4.201
|
|
|
3ef2ca |
Fcc: outbox
|
|
|
3ef2ca |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
|
3ef2ca |
Mime-Version: 1.0
|
|
|
3ef2ca |
Content-Type: text/plain; charset=UTF-8
|
|
|
3ef2ca |
Content-Transfer-Encoding: 8bit
|
|
|
3ef2ca |
------------
|
|
|
3ef2ca |
|
|
|
3ef2ca |
Patch 7.4.201
|
|
|
3ef2ca |
Problem: 'lispwords' is a global option.
|
|
|
3ef2ca |
Solution: Make 'lispwords' global-local. (Sung Pae)
|
|
|
3ef2ca |
Files: runtime/doc/options.txt, runtime/optwin.vim, src/buffer.c,
|
|
|
3ef2ca |
src/misc1.c, src/option.c, src/option.h, src/structs.h,
|
|
|
3ef2ca |
src/testdir/test100.in, src/testdir/test100.ok
|
|
|
3ef2ca |
|
|
|
3ef2ca |
|
|
|
3ef2ca |
*** ../vim-7.4.200/runtime/doc/options.txt 2014-02-23 23:38:58.820760280 +0100
|
|
|
3ef2ca |
--- runtime/doc/options.txt 2014-03-12 18:20:30.748874299 +0100
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 4629,4635 ****
|
|
|
3ef2ca |
|
|
|
3ef2ca |
*'lispwords'* *'lw'*
|
|
|
3ef2ca |
'lispwords' 'lw' string (default is very long)
|
|
|
3ef2ca |
! global
|
|
|
3ef2ca |
{not in Vi}
|
|
|
3ef2ca |
{not available when compiled without the |+lispindent|
|
|
|
3ef2ca |
feature}
|
|
|
3ef2ca |
--- 4629,4635 ----
|
|
|
3ef2ca |
|
|
|
3ef2ca |
*'lispwords'* *'lw'*
|
|
|
3ef2ca |
'lispwords' 'lw' string (default is very long)
|
|
|
3ef2ca |
! global or local to buffer |global-local|
|
|
|
3ef2ca |
{not in Vi}
|
|
|
3ef2ca |
{not available when compiled without the |+lispindent|
|
|
|
3ef2ca |
feature}
|
|
|
3ef2ca |
*** ../vim-7.4.200/runtime/optwin.vim 2013-06-29 14:32:06.000000000 +0200
|
|
|
3ef2ca |
--- runtime/optwin.vim 2014-03-12 18:20:30.748874299 +0100
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 855,861 ****
|
|
|
3ef2ca |
call append("$", "\t(local to buffer)")
|
|
|
3ef2ca |
call <SID>BinOptionL("lisp")
|
|
|
3ef2ca |
call append("$", "lispwords\twords that change how lisp indenting works")
|
|
|
3ef2ca |
! call <SID>OptionG("lw", &lw)
|
|
|
3ef2ca |
endif
|
|
|
3ef2ca |
|
|
|
3ef2ca |
|
|
|
3ef2ca |
--- 855,861 ----
|
|
|
3ef2ca |
call append("$", "\t(local to buffer)")
|
|
|
3ef2ca |
call <SID>BinOptionL("lisp")
|
|
|
3ef2ca |
call append("$", "lispwords\twords that change how lisp indenting works")
|
|
|
3ef2ca |
! call <SID>OptionL("lw", &lw)
|
|
|
3ef2ca |
endif
|
|
|
3ef2ca |
|
|
|
3ef2ca |
|
|
|
3ef2ca |
*** ../vim-7.4.200/src/buffer.c 2014-01-10 16:43:09.000000000 +0100
|
|
|
3ef2ca |
--- src/buffer.c 2014-03-12 18:20:30.752874299 +0100
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 1978,1983 ****
|
|
|
3ef2ca |
--- 1978,1986 ----
|
|
|
3ef2ca |
#endif
|
|
|
3ef2ca |
buf->b_p_ar = -1;
|
|
|
3ef2ca |
buf->b_p_ul = NO_LOCAL_UNDOLEVEL;
|
|
|
3ef2ca |
+ #ifdef FEAT_LISP
|
|
|
3ef2ca |
+ clear_string_option(&buf->b_p_lw);
|
|
|
3ef2ca |
+ #endif
|
|
|
3ef2ca |
}
|
|
|
3ef2ca |
|
|
|
3ef2ca |
/*
|
|
|
3ef2ca |
*** ../vim-7.4.200/src/misc1.c 2013-11-06 04:01:31.000000000 +0100
|
|
|
3ef2ca |
--- src/misc1.c 2014-03-12 18:20:30.752874299 +0100
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 8879,8885 ****
|
|
|
3ef2ca |
{
|
|
|
3ef2ca |
char_u buf[LSIZE];
|
|
|
3ef2ca |
int len;
|
|
|
3ef2ca |
! char_u *word = p_lispwords;
|
|
|
3ef2ca |
|
|
|
3ef2ca |
while (*word != NUL)
|
|
|
3ef2ca |
{
|
|
|
3ef2ca |
--- 8879,8885 ----
|
|
|
3ef2ca |
{
|
|
|
3ef2ca |
char_u buf[LSIZE];
|
|
|
3ef2ca |
int len;
|
|
|
3ef2ca |
! char_u *word = *curbuf->b_p_lw != NUL ? curbuf->b_p_lw : p_lispwords;
|
|
|
3ef2ca |
|
|
|
3ef2ca |
while (*word != NUL)
|
|
|
3ef2ca |
{
|
|
|
3ef2ca |
*** ../vim-7.4.200/src/option.c 2014-01-14 16:54:53.000000000 +0100
|
|
|
3ef2ca |
--- src/option.c 2014-03-12 18:20:30.752874299 +0100
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 134,139 ****
|
|
|
3ef2ca |
--- 134,140 ----
|
|
|
3ef2ca |
#define PV_KP OPT_BOTH(OPT_BUF(BV_KP))
|
|
|
3ef2ca |
#ifdef FEAT_LISP
|
|
|
3ef2ca |
# define PV_LISP OPT_BUF(BV_LISP)
|
|
|
3ef2ca |
+ # define PV_LW OPT_BOTH(OPT_BUF(BV_LW))
|
|
|
3ef2ca |
#endif
|
|
|
3ef2ca |
#define PV_MA OPT_BUF(BV_MA)
|
|
|
3ef2ca |
#define PV_ML OPT_BUF(BV_ML)
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 1718,1724 ****
|
|
|
3ef2ca |
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
|
|
|
3ef2ca |
{"lispwords", "lw", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
|
|
|
3ef2ca |
#ifdef FEAT_LISP
|
|
|
3ef2ca |
! (char_u *)&p_lispwords, PV_NONE,
|
|
|
3ef2ca |
{(char_u *)LISPWORD_VALUE, (char_u *)0L}
|
|
|
3ef2ca |
#else
|
|
|
3ef2ca |
(char_u *)NULL, PV_NONE,
|
|
|
3ef2ca |
--- 1719,1725 ----
|
|
|
3ef2ca |
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
|
|
|
3ef2ca |
{"lispwords", "lw", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
|
|
|
3ef2ca |
#ifdef FEAT_LISP
|
|
|
3ef2ca |
! (char_u *)&p_lispwords, PV_LW,
|
|
|
3ef2ca |
{(char_u *)LISPWORD_VALUE, (char_u *)0L}
|
|
|
3ef2ca |
#else
|
|
|
3ef2ca |
(char_u *)NULL, PV_NONE,
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 5412,5417 ****
|
|
|
3ef2ca |
--- 5413,5421 ----
|
|
|
3ef2ca |
check_string_option(&buf->b_p_dict);
|
|
|
3ef2ca |
check_string_option(&buf->b_p_tsr);
|
|
|
3ef2ca |
#endif
|
|
|
3ef2ca |
+ #ifdef FEAT_LISP
|
|
|
3ef2ca |
+ check_string_option(&buf->b_p_lw);
|
|
|
3ef2ca |
+ #endif
|
|
|
3ef2ca |
}
|
|
|
3ef2ca |
|
|
|
3ef2ca |
/*
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 9879,9884 ****
|
|
|
3ef2ca |
--- 9883,9893 ----
|
|
|
3ef2ca |
case PV_UL:
|
|
|
3ef2ca |
buf->b_p_ul = NO_LOCAL_UNDOLEVEL;
|
|
|
3ef2ca |
break;
|
|
|
3ef2ca |
+ #ifdef FEAT_LISP
|
|
|
3ef2ca |
+ case PV_LW:
|
|
|
3ef2ca |
+ clear_string_option(&buf->b_p_lw);
|
|
|
3ef2ca |
+ break;
|
|
|
3ef2ca |
+ #endif
|
|
|
3ef2ca |
}
|
|
|
3ef2ca |
}
|
|
|
3ef2ca |
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 9928,9933 ****
|
|
|
3ef2ca |
--- 9937,9945 ----
|
|
|
3ef2ca |
case PV_STL: return (char_u *)&(curwin->w_p_stl);
|
|
|
3ef2ca |
#endif
|
|
|
3ef2ca |
case PV_UL: return (char_u *)&(curbuf->b_p_ul);
|
|
|
3ef2ca |
+ #ifdef FEAT_LISP
|
|
|
3ef2ca |
+ case PV_LW: return (char_u *)&(curbuf->b_p_lw);
|
|
|
3ef2ca |
+ #endif
|
|
|
3ef2ca |
}
|
|
|
3ef2ca |
return NULL; /* "cannot happen" */
|
|
|
3ef2ca |
}
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 9994,9999 ****
|
|
|
3ef2ca |
--- 10006,10015 ----
|
|
|
3ef2ca |
#endif
|
|
|
3ef2ca |
case PV_UL: return curbuf->b_p_ul != NO_LOCAL_UNDOLEVEL
|
|
|
3ef2ca |
? (char_u *)&(curbuf->b_p_ul) : p->var;
|
|
|
3ef2ca |
+ #ifdef FEAT_LISP
|
|
|
3ef2ca |
+ case PV_LW: return *curbuf->b_p_lw != NUL
|
|
|
3ef2ca |
+ ? (char_u *)&(curbuf->b_p_lw) : p->var;
|
|
|
3ef2ca |
+ #endif
|
|
|
3ef2ca |
|
|
|
3ef2ca |
#ifdef FEAT_ARABIC
|
|
|
3ef2ca |
case PV_ARAB: return (char_u *)&(curwin->w_p_arab);
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 10567,10572 ****
|
|
|
3ef2ca |
--- 10583,10591 ----
|
|
|
3ef2ca |
#ifdef FEAT_PERSISTENT_UNDO
|
|
|
3ef2ca |
buf->b_p_udf = p_udf;
|
|
|
3ef2ca |
#endif
|
|
|
3ef2ca |
+ #ifdef FEAT_LISP
|
|
|
3ef2ca |
+ buf->b_p_lw = empty_option;
|
|
|
3ef2ca |
+ #endif
|
|
|
3ef2ca |
|
|
|
3ef2ca |
/*
|
|
|
3ef2ca |
* Don't copy the options set by ex_help(), use the saved values,
|
|
|
3ef2ca |
*** ../vim-7.4.200/src/option.h 2014-01-10 15:32:17.000000000 +0100
|
|
|
3ef2ca |
--- src/option.h 2014-03-12 18:20:30.752874299 +0100
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 990,995 ****
|
|
|
3ef2ca |
--- 990,996 ----
|
|
|
3ef2ca |
, BV_KP
|
|
|
3ef2ca |
#ifdef FEAT_LISP
|
|
|
3ef2ca |
, BV_LISP
|
|
|
3ef2ca |
+ , BV_LW
|
|
|
3ef2ca |
#endif
|
|
|
3ef2ca |
, BV_MA
|
|
|
3ef2ca |
, BV_ML
|
|
|
3ef2ca |
*** ../vim-7.4.200/src/structs.h 2014-02-23 22:52:33.372764715 +0100
|
|
|
3ef2ca |
--- src/structs.h 2014-03-12 18:20:30.752874299 +0100
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 1641,1646 ****
|
|
|
3ef2ca |
--- 1641,1649 ----
|
|
|
3ef2ca |
#ifdef FEAT_PERSISTENT_UNDO
|
|
|
3ef2ca |
int b_p_udf; /* 'undofile' */
|
|
|
3ef2ca |
#endif
|
|
|
3ef2ca |
+ #ifdef FEAT_LISP
|
|
|
3ef2ca |
+ char_u *b_p_lw; /* 'lispwords' local value */
|
|
|
3ef2ca |
+ #endif
|
|
|
3ef2ca |
|
|
|
3ef2ca |
/* end of buffer options */
|
|
|
3ef2ca |
|
|
|
3ef2ca |
*** ../vim-7.4.200/src/testdir/test100.in 2013-11-07 03:25:51.000000000 +0100
|
|
|
3ef2ca |
--- src/testdir/test100.in 2014-03-12 18:25:27.792878851 +0100
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 1,4 ****
|
|
|
3ef2ca |
! Tests for 'undolevel' setting being global-local
|
|
|
3ef2ca |
|
|
|
3ef2ca |
STARTTEST
|
|
|
3ef2ca |
:so small.vim
|
|
|
3ef2ca |
--- 1,4 ----
|
|
|
3ef2ca |
! Tests for 'undolevel' and 'lispwords' settings being global-local
|
|
|
3ef2ca |
|
|
|
3ef2ca |
STARTTEST
|
|
|
3ef2ca |
:so small.vim
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 37,42 ****
|
|
|
3ef2ca |
--- 37,50 ----
|
|
|
3ef2ca |
:call UndoLevel()
|
|
|
3ef2ca |
:%w >> test.out
|
|
|
3ef2ca |
:"sleep 10
|
|
|
3ef2ca |
+ :"
|
|
|
3ef2ca |
+ :" Testing 'lispwords'
|
|
|
3ef2ca |
+ :"
|
|
|
3ef2ca |
+ :setglobal lispwords=foo,bar,baz
|
|
|
3ef2ca |
+ :setlocal lispwords-=foo | setlocal lispwords+=quux
|
|
|
3ef2ca |
+ :redir >> test.out | echon "\nTesting 'lispwords' local value" | setglobal lispwords? | setlocal lispwords? | echo &lispwords . "\n" | redir end
|
|
|
3ef2ca |
+ :setlocal lispwords<
|
|
|
3ef2ca |
+ :redir >> test.out | echon "\nTesting 'lispwords' value reset" | setglobal lispwords? | setlocal lispwords? | echo &lispwords . "\n" | redir end
|
|
|
3ef2ca |
:qa!
|
|
|
3ef2ca |
ENDTEST
|
|
|
3ef2ca |
|
|
|
3ef2ca |
*** ../vim-7.4.200/src/testdir/test100.ok 2013-11-07 03:25:51.000000000 +0100
|
|
|
3ef2ca |
--- src/testdir/test100.ok 2014-03-12 18:25:27.792878851 +0100
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 39,41 ****
|
|
|
3ef2ca |
--- 39,51 ----
|
|
|
3ef2ca |
|
|
|
3ef2ca |
undolevels=50 global
|
|
|
3ef2ca |
undolevels=-123456 local
|
|
|
3ef2ca |
+
|
|
|
3ef2ca |
+ Testing 'lispwords' local value
|
|
|
3ef2ca |
+ lispwords=foo,bar,baz
|
|
|
3ef2ca |
+ lispwords=bar,baz,quux
|
|
|
3ef2ca |
+ bar,baz,quux
|
|
|
3ef2ca |
+
|
|
|
3ef2ca |
+ Testing 'lispwords' value reset
|
|
|
3ef2ca |
+ lispwords=foo,bar,baz
|
|
|
3ef2ca |
+ lispwords=foo,bar,baz
|
|
|
3ef2ca |
+ foo,bar,baz
|
|
|
3ef2ca |
*** ../vim-7.4.200/src/version.c 2014-03-12 17:56:42.960852421 +0100
|
|
|
3ef2ca |
--- src/version.c 2014-03-12 18:19:13.720873119 +0100
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 740,741 ****
|
|
|
3ef2ca |
--- 740,743 ----
|
|
|
3ef2ca |
{ /* Add new patch number below this line */
|
|
|
3ef2ca |
+ /**/
|
|
|
3ef2ca |
+ 201,
|
|
|
3ef2ca |
/**/
|
|
|
3ef2ca |
|
|
|
3ef2ca |
--
|
|
|
3ef2ca |
Lawmakers made it obligatory for everybody to take at least one bath
|
|
|
3ef2ca |
each week -- on Saturday night.
|
|
|
3ef2ca |
[real standing law in Vermont, United States of America]
|
|
|
3ef2ca |
|
|
|
3ef2ca |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
|
3ef2ca |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
|
3ef2ca |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
|
3ef2ca |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|