Motoya Kurotsu wrote:

> The patch is attached. Please check and correct.
> 
> I deleted the following expression in
> *sub-replace-expression* because the function has been lost
> since Patch 7.2.437.
> 
>  Prepend a backslash to get a real <NL> character (which will be
>  a NUL in the file).
> 
> I added the description that "\=" notation is valid in not only
> :substitute command but also substitute() function.
> 
> I also added the description that submatch() is valid in not only
> :substitute command but also substitute() function because the
> code seems to work so. I'm not sure why :help submatch() insists
> on "Only for an expression in a :substitute command". Since the
> introduction of submatch() in eval.c (vim-6.0d or CVS revision 1.12),
> it seems to have worked with the first level substitute() such like
> the following.
> 
> let y = substitute("hello", '\l', '\=toupper(submatch(0)), "g")

Thank for the patch.  How about adding a test?

-- 
Citizens are not allowed to attend a movie house or theater nor ride in a
public streetcar within at least four hours after eating garlic.
                [real standing law in Indiana, United States of America]

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
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

Raspunde prin e-mail lui