]> granicus.if.org Git - vim/commitdiff
updated for version 7.0040
authorBram Moolenaar <Bram@vim.org>
Sun, 16 Jan 2005 22:02:49 +0000 (22:02 +0000)
committerBram Moolenaar <Bram@vim.org>
Sun, 16 Jan 2005 22:02:49 +0000 (22:02 +0000)
runtime/doc/eval.txt
src/testdir/test49.vim
src/version.h

index da16256087cf48f2f918e4d760bbe83f3fa7bf31..5de6a41bd4979890336eda9b620da5457bd43972 100644 (file)
@@ -1,4 +1,4 @@
-*eval.txt*      For Vim version 7.0aa.  Last change: 2005 Jan 15
+*eval.txt*      For Vim version 7.0aa.  Last change: 2005 Jan 16
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -260,7 +260,9 @@ examples: >
        :call add(list, [1, 2])         " append List as one new item
        :call extend(list, [1, 2])      " extend the list with two more items
        :let i = remove(list, 3)        " remove item 3
+       :unlet list[3]                  " idem
        :let l = remove(list, 3, -1)    " remove items 3 to last item
+       :unlet list[3 : ]               " idem
        :call filter(list, 'v:val =~ "x"')  " remove items with an 'x'
 
 Changing the oder of items in a list: >
@@ -416,8 +418,11 @@ use |:let| this way: >
        :let dict[4] = "four"
        :let dict['one'] = item
 
-Removing an entry from a Dictionary is done with |remove()|: >
-       :let i = remove(dict, 'aaa')    " remove item with key 'aaa'
+Removing an entry from a Dictionary is done with |remove()| or |:unlet|.
+Three ways to remove the entry with key "aaa" from dict: >
+       :let i = remove(dict, 'aaa')
+       :unlet dict.aaa
+       :unlet dict['aaa']
 
 Merging a Dictionary with another is done with |extend()|: >
        :call extend(adict, bdict)      " extend adict with entries from bdict
@@ -4313,6 +4318,12 @@ This would call the function "my_func_whizz(parameter)".
                        variable names can be given, they are all removed.
                        With [!] no error message is given for non-existing
                        variables.
+                       One or more items from a List can be removed: >
+                               :unlet list[3]    " remove fourth item
+                               :unlet list[3:]   " remove fourth item to last
+<                      One item from a Dictionary can be removed at a time: >
+                               :unlet dict['two']
+                               :unlet dict.two
 
 :if {expr1}                    *:if* *:endif* *:en* *E171* *E579* *E580*
 :en[dif]               Execute the commands until the next matching ":else"
index 796bf08fa7f03d0649f6ac63ff5360a77f364483..24c28735776e8b9c643f224e0d29157464f26c7f 100644 (file)
@@ -1,6 +1,6 @@
 " Vim script language tests
 " Author:      Servatius Brandt <Servatius.Brandt@fujitsu-siemens.com>
-" Last Change: 2005 Jan 15
+" Last Change: 2005 Jan 16
 
 "-------------------------------------------------------------------------------
 " Test environment                                                         {{{1
@@ -8515,6 +8515,7 @@ function! MATCH(expected, msg, enr, emsg)
            else
                let msg = escape(msg, '"')
                Xout "Unexpected message:" msg
+               Xout "Expected:" a:enr . ": " . a:emsg
            endif
        endif
     else
@@ -8522,6 +8523,7 @@ function! MATCH(expected, msg, enr, emsg)
        if !a:expected          " match although not expected
            let msg = escape(msg, '"')
            Xout "Unexpected message:" msg
+           Xout "Expected none."
        endif
     endif
     return match
index 1e3f818c4fcce428b7fe779503f0fdc98231a687..fbf243c831aae2cd1e5c5e5e1c0dff6ee52c7248 100644 (file)
@@ -36,5 +36,5 @@
 #define VIM_VERSION_NODOT      "vim70aa"
 #define VIM_VERSION_SHORT      "7.0aa"
 #define VIM_VERSION_MEDIUM     "7.0aa ALPHA"
-#define VIM_VERSION_LONG       "VIM - Vi IMproved 7.0aa ALPHA (2004 Jan 15)"
-#define VIM_VERSION_LONG_DATE  "VIM - Vi IMproved 7.0aa ALPHA (2004 Jan 15, compiled "
+#define VIM_VERSION_LONG       "VIM - Vi IMproved 7.0aa ALPHA (2004 Jan 16)"
+#define VIM_VERSION_LONG_DATE  "VIM - Vi IMproved 7.0aa ALPHA (2004 Jan 16, compiled "