comparison runtime/doc/eval.txt @ 15008:67e3103d6e18 v8.1.0515

patch 8.1.0515: reloading a script gives errors for existing functions commit https://github.com/vim/vim/commit/ded5f1bed7ff2d138b3ee0f9610d17290b62692d Author: Bram Moolenaar <Bram@vim.org> Date: Sat Nov 10 17:33:29 2018 +0100 patch 8.1.0515: reloading a script gives errors for existing functions Problem: Reloading a script gives errors for existing functions. Solution: Allow redefining a function once when reloading a script.
author Bram Moolenaar <Bram@vim.org>
date Sat, 10 Nov 2018 17:45:06 +0100
parents 2b30a2b4bde2
children c338c91086b9
comparison
equal deleted inserted replaced
15007:d04499070024 15008:67e3103d6e18
9671 result is a |Funcref| to a numbered function. The 9671 result is a |Funcref| to a numbered function. The
9672 function can only be used with a |Funcref| and will be 9672 function can only be used with a |Funcref| and will be
9673 deleted if there are no more references to it. 9673 deleted if there are no more references to it.
9674 *E127* *E122* 9674 *E127* *E122*
9675 When a function by this name already exists and [!] is 9675 When a function by this name already exists and [!] is
9676 not used an error message is given. When [!] is used, 9676 not used an error message is given. There is one
9677 an existing function is silently replaced. Unless it 9677 exception: When sourcing a script again, a function
9678 is currently being executed, that is an error. 9678 that was previously defined in that script will be
9679 silently replaced.
9680 When [!] is used, an existing function is silently
9681 replaced. Unless it is currently being executed, that
9682 is an error.
9679 NOTE: Use ! wisely. If used without care it can cause 9683 NOTE: Use ! wisely. If used without care it can cause
9680 an existing function to be replaced unexpectedly, 9684 an existing function to be replaced unexpectedly,
9681 which is hard to debug. 9685 which is hard to debug.
9682 9686
9683 For the {arguments} see |function-argument|. 9687 For the {arguments} see |function-argument|.