mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 9.0.2182: Vim9: need a way to reserve future extension
Problem: Vim9: need a way to reserve future extension Solution: reserve double underscore prefix for future use (Yegappan Lakshmanan) related: #13238 closes: #13742 Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
cc944b1452
commit
ff6f0d5c38
@@ -1774,6 +1774,15 @@ early_ret:
|
||||
break;
|
||||
}
|
||||
|
||||
if (*p == '_' && *(p + 1) == '_')
|
||||
{
|
||||
// double underscore prefix for a method name is currently
|
||||
// reserved. This could be used in the future to support
|
||||
// object methods called by Vim builtin functions.
|
||||
semsg(_(e_cannot_use_reserved_name_str), p);
|
||||
break;
|
||||
}
|
||||
|
||||
CLEAR_FIELD(ea);
|
||||
ea.cmd = line;
|
||||
ea.arg = p;
|
||||
|
Reference in New Issue
Block a user