0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.1882: Vim9: v:disallow_let is no longer needed

Problem:    Vim9: v:disallow_let is no longer needed.
Solution:   Remove v:disallow_let.
This commit is contained in:
Bram Moolenaar
2020-10-21 20:58:52 +02:00
parent 692d1a51e7
commit c58f5456e5
4 changed files with 6 additions and 14 deletions

View File

@@ -146,7 +146,6 @@ static struct vimvar
{VV_NAME("echospace", VAR_NUMBER), VV_RO},
{VV_NAME("argv", VAR_LIST), VV_RO},
{VV_NAME("collate", VAR_STRING), VV_RO},
{VV_NAME("disallow_let", VAR_NUMBER), 0}, // TODO: remove
};
// shorthand
@@ -243,9 +242,6 @@ evalvars_init(void)
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);
@@ -749,8 +745,7 @@ ex_let(exarg_T *eap)
ex_finally(eap);
return;
}
if (get_vim_var_nr(VV_DISALLOW_LET)
&& eap->cmdidx == CMD_let && vim9script)
if (eap->cmdidx == CMD_let && vim9script)
{
emsg(_(e_cannot_use_let_in_vim9_script));
return;