On Jul 13, 2013 8:59 PM, "Albert Netymk" <[email protected]> wrote:
>
>
> > For a command called unmap this behavior is indeed intuitive: you asked
to perform an action (*delete* mapping, *unmap*) and if action cannot be
performed (no such mapping) reporting failure is expected. If it was
mapclear and it accepted argument like unmap I would call *this* command's
behavior counter-intuitive: you asked to clear the mapping and if it is
already cleared it is perfectly fine.
>
> Since we don't have the mapclear that works on a single mapping, should
unmap stands out and take this responsibility. It seems that E31 (no such
mapping) is the only error that could happen inside unmap, so it's always
safe to
> `silent! unmap <some-mapping>` regardless of the existence of one
mapping. Therefore, unmap should take `silent!` as default behavior.

To make this intuitive :unmap should be renamed to :mapclear.

I see no reason for making :unmap taking the "responsibility" of :silent!
unmap with nobody retaining original behavior. Failing :unmap can show
wrong execution context problems, not failing is nothing more then a few
characters save.

> >
> > I do not think I would benefit from either behavior (especially with
regex-based error capturing which looks brain-damaged after more modern
languages) though.
>
> --
> --
> 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].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
-- 
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].
For more options, visit https://groups.google.com/groups/opt_out.


Raspunde prin e-mail lui