On Saturday, December 8, 2018 at 10:53:07 PM UTC+9, Bram Moolenaar wrote:
> I have recently changed the behavior of :function to allow for
> redefining (overwriting) a function when that should normally be fine.
> Therefore, using function! is hardly ever needed.
> 
> Previously, when sourcing a script a second time, one had to use
> function! to redefine the functions.  This was very common, since when
> developing a plugin once has to try several times before getting it
> right.  A big problem with this is that when another script uses the
> same function, or you had copy-pasted the function and forgot to change
> the name, the function would be errornously overwritten.
> 
> Vim now checks the script ID of where the function was defined, and
> whether that same script is being sourced again.  This allows for
> silently overwriting the function from the same script file, once.
> 
> So, please stop using function!
> 
> 
> Now wondering if the same should be done for user commands...

This seems to be good improvement but some plugin manager reload plugins when 
update install plugins. ex: vim-plug
So older version of vim will occur errors if some plugins remove ! from their 
codes.

mattn

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui