Patch 8.2.1788
Problem:    Vim9: still allows :let for declarations.
Solution:   Make the default for v:disallow_let one.  It can still be set to
            zero to allow for using :let.
Files:      src/evalvars.c, src/testdir/runtest.vim


*** ../vim-8.2.1787/src/evalvars.c      2020-09-27 15:19:23.642118924 +0200
--- src/evalvars.c      2020-10-03 12:54:11.791147925 +0200
***************
*** 215,222 ****
            // add to compat scope dict
            hash_add(&compat_hashtab, p->vv_di.di_key);
      }
!     vimvars[VV_VERSION].vv_nr = VIM_VERSION_100;
!     vimvars[VV_VERSIONLONG].vv_nr = VIM_VERSION_100 * 10000 + highest_patch();
  
      set_vim_var_nr(VV_SEARCHFORWARD, 1L);
      set_vim_var_nr(VV_HLSEARCH, 1L);
--- 215,222 ----
            // add to compat scope dict
            hash_add(&compat_hashtab, p->vv_di.di_key);
      }
!     set_vim_var_nr(VV_VERSION, VIM_VERSION_100);
!     set_vim_var_nr(VV_VERSIONLONG, VIM_VERSION_100 * 10000 + highest_patch());
  
      set_vim_var_nr(VV_SEARCHFORWARD, 1L);
      set_vim_var_nr(VV_HLSEARCH, 1L);
***************
*** 244,249 ****
--- 244,252 ----
  
      set_vim_var_nr(VV_ECHOSPACE,    sc_col - 1);
  
+     // TODO: remove later
+     set_vim_var_nr(VV_DISALLOW_LET, 1);
+ 
      // Default for v:register is not 0 but '"'.  This is adjusted once the
      // clipboard has been setup by calling reset_reg_var().
      set_reg_var(0);
*** ../vim-8.2.1787/src/testdir/runtest.vim     2020-10-01 22:37:36.403376674 
+0200
--- src/testdir/runtest.vim     2020-10-03 12:56:25.582744794 +0200
***************
*** 360,368 ****
    qall!
  endfunc
  
- " TODO: remove later
- let v:disallow_let = 1
- 
  " Source the test script.  First grab the file name, in case the script
  " navigates away.  g:testname can be used by the tests.
  let g:testname = expand('%')
--- 360,365 ----
*** ../vim-8.2.1787/src/version.c       2020-10-02 20:35:56.129323753 +0200
--- src/version.c       2020-10-03 12:56:46.514681962 +0200
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     1788,
  /**/

-- 
Giving a commit hash to refer to a patch is like giving longitude and
lattitude to refer to a city.

 /// 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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202010031057.093AvwNA1789091%40masaka.moolenaar.net.

Raspunde prin e-mail lui