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