Patch 7.4.2121
Problem:    No easy way to check if lambda and closure are supported.
Solution:   Add the +lambda feature.
Files:      src/evalfunc.c, src/version.c, src/testdir/test_lambda.vim


*** ../vim-7.4.2120/src/evalfunc.c      2016-07-28 22:53:33.161059376 +0200
--- src/evalfunc.c      2016-07-29 22:44:01.555601538 +0200
***************
*** 5205,5210 ****
--- 5205,5211 ----
  #ifdef FEAT_KEYMAP
        "keymap",
  #endif
+       "lambda", /* always with FEAT_EVAL, since 7.4.2120 with closure */
  #ifdef FEAT_LANGMAP
        "langmap",
  #endif
*** ../vim-7.4.2120/src/version.c       2016-07-29 22:36:40.211701392 +0200
--- src/version.c       2016-07-29 22:49:37.904473686 +0200
***************
*** 304,309 ****
--- 304,314 ----
  #else
        "-keymap",
  #endif
+ #ifdef FEAT_EVAL
+       "+lambda",
+ #else
+       "-lambda",
+ #endif
  #ifdef FEAT_LANGMAP
        "+langmap",
  #else
*** ../vim-7.4.2120/src/testdir/test_lambda.vim 2016-07-29 22:36:40.207701429 
+0200
--- src/testdir/test_lambda.vim 2016-07-29 22:49:03.976789265 +0200
***************
*** 1,5 ****
--- 1,9 ----
  " Test for lambda and closure
  
+ function! Test_lambda_feature()
+   call assert_equal(1, has('lambda'))
+ endfunction
+ 
  function! Test_lambda_with_filter()
    let s:x = 2
    call assert_equal([2, 3], filter([1, 2, 3], {i, v -> v >= s:x}))
*** ../vim-7.4.2120/src/version.c       2016-07-29 22:36:40.211701392 +0200
--- src/version.c       2016-07-29 22:49:37.904473686 +0200
***************
*** 760,761 ****
--- 765,768 ----
  {   /* Add new patch number below this line */
+ /**/
+     2121,
  /**/

-- 
A programmer's wife asks him: "Please run to the store and pick up a loaf of
bread.  If they have eggs, get a dozen".  The programmer comes home with 12
loafs of bread.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui