diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt
index ec354ec9df57e14b5f852ef1ed87fffd43a06cac..f577ef24ef7364475d43f635d7b7497857e134bc 100644
--- a/runtime/doc/cmdline.txt
+++ b/runtime/doc/cmdline.txt
@@ -1,4 +1,4 @@
-*cmdline.txt*   For Vim version 7.0aa.  Last change: 2005 Nov 21
+*cmdline.txt*   For Vim version 7.0aa.  Last change: 2005 Dec 23
 
 
 		  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -692,6 +692,12 @@ output.
 ==============================================================================
 6. Ex special characters				*cmdline-special*
 
+Note: These are special characters in the executed command line.  If you want
+to insert special things while typing you can use the CTRL-R command.  For
+example, "%" stands for the current file name, while CTRL-R % inserts the
+current file name right away.  See |c_CTRL-R|.
+
+
 In Ex commands, at places where a file name can be used, the following
 characters have a special meaning.  These can also be used in the expression
 function expand() |expand()|.
diff --git a/src/fileio.c b/src/fileio.c
index 1ff4e4609527580dda90846c68214815c0ecae20..c21035ce124bf8d17f9a35e993e9a347b4cbf91e 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -4201,6 +4201,9 @@ restore_backup:
 # endif
 	buf_setino(buf);
     }
+    else if (buf->b_dev < 0)
+	/* Set the inode when creating a new file. */
+	buf_setino(buf);
 #endif
 
     if (close(fd) != 0)
diff --git a/src/testdir/test60.in b/src/testdir/test60.in
index 58a2c90833260dd2a08cddd8447744d35cb434f0..4435343ac3ffccffbc6bd975e50f497a3067b338 100644
--- a/src/testdir/test60.in
+++ b/src/testdir/test60.in
@@ -13,52 +13,46 @@ endfunction
     augroup myagroup
 	autocmd! BufEnter *.my echo 'myfile edited'
     augroup END
-    redir! > test.out
 
-    " valid autocmd group
-    call RunTest('#myagroup', 1)
+    let test_cases = []
 
+    " valid autocmd group
+    let test_cases += [['#myagroup', 1]]
     " Valid autocmd group and event
-    call RunTest('#myagroup#BufEnter', 1)
-
+    let test_cases += [['#myagroup#BufEnter', 1]]
     " Valid autocmd group, event and pattern
-    call RunTest('#myagroup#BufEnter#*.my', 1)
-
+    let test_cases += [['#myagroup#BufEnter#*.my', 1]]
     " Valid autocmd event
-    call RunTest('#BufEnter', 1)
-
+    let test_cases += [['#BufEnter', 1]]
     " Valid autocmd event and pattern
-    call RunTest('#BufEnter#*.my', 1)
-
+    let test_cases += [['#BufEnter#*.my', 1]]
     " Non-existing autocmd group or event
-    call RunTest('#xyzagroup', 0)
-
+    let test_cases += [['#xyzagroup', 0]]
     " Non-existing autocmd group and valid autocmd event
-    call RunTest('#xyzagroup#BufEnter', 0)
-
-    " Valid autocmd group and autocmd event with no matching pattern
-    call RunTest('#myagroup#CmdwinEnter', 0)
-
+    let test_cases += [['#xyzagroup#BufEnter', 0]]
+    " Valid autocmd group and event with no matching pattern
+    let test_cases += [['#myagroup#CmdwinEnter', 0]]
     " Valid autocmd group and non-existing autocmd event
-    call RunTest('#myagroup#xyzacmd', 0)
-
+    let test_cases += [['#myagroup#xyzacmd', 0]]
     " Valid autocmd group and event and non-matching pattern
-    call RunTest('#myagroup#BufEnter#xyzpat', 0)
-
+    let test_cases += [['#myagroup#BufEnter#xyzpat', 0]]
     " Valid autocmd event and non-matching pattern
-    call RunTest('#BufEnter#xyzpat', 0)
-
+    let test_cases += [['#BufEnter#xyzpat', 0]]
     " Empty autocmd group, event and pattern
-    call RunTest('###', 0)
-
-    " Empty autocmd group and event or event and pattern
-    call RunTest('##', 0)
+    let test_cases += [['###', 0]]
+    " Empty autocmd group and event or empty event and pattern
+    let test_cases += [['##', 0]]
+    " Valid autocmd event
+    let test_cases += [['##FileReadCmd', 1]]
+    " Non-existing autocmd event
+    let test_cases += [['##MySpecialCmd', 0]]
 
-    " Testing support for event name that exists.
-    call RunTest('##SwapExists', 1)
+    redir! > test.out
 
-    " Testing support for event name that doesn't exist.
-    call RunTest('##SwapNotExists', 0)
+    for [test_case, result] in test_cases
+      	echo test_case . ": " . result
+        call RunTest(test_case, result)
+    endfor
 
     redir END
 endfunction
diff --git a/src/testdir/test60.ok b/src/testdir/test60.ok
index 004245ff67d243a2b0a4f59ae0edd823e8474698..0d1e3dccd877736a2177e795b4b4fe1f90328e64 100644
--- a/src/testdir/test60.ok
+++ b/src/testdir/test60.ok
@@ -1,16 +1,31 @@
 
+#myagroup: 1
 OK
+#myagroup#BufEnter: 1
 OK
+#myagroup#BufEnter#*.my: 1
 OK
+#BufEnter: 1
 OK
+#BufEnter#*.my: 1
 OK
+#xyzagroup: 0
 OK
+#xyzagroup#BufEnter: 0
 OK
+#myagroup#CmdwinEnter: 0
 OK
+#myagroup#xyzacmd: 0
 OK
+#myagroup#BufEnter#xyzpat: 0
 OK
+#BufEnter#xyzpat: 0
 OK
+###: 0
 OK
+##: 0
 OK
+##FileReadCmd: 1
 OK
+##MySpecialCmd: 0
 OK