updated for version 7.4.267
Problem:    The '[ mark is in the wrong position after "gq". (Ingo Karkat)
Solution:   Add the setmark argument to do_join(). (Christian Brabandt)
diff --git a/src/testdir/Make_amiga.mak b/src/testdir/Make_amiga.mak
index 3492945..c8a529e 100644
--- a/src/testdir/Make_amiga.mak
+++ b/src/testdir/Make_amiga.mak
@@ -36,6 +36,7 @@
 		test94.out test95.out test96.out test97.out test98.out \
 		test99.out test100.out test101.out test102.out test103.out \
 		test104.out test105.out test106.out \
+		test_autoformat_join.out \
 		test_eval.out \
 		test_options.out
 
@@ -160,5 +161,6 @@
 test104.out: test104.in
 test105.out: test105.in
 test106.out: test106.in
+test_autoformat_join.out: test_autoformat_join.in
 test_eval.out: test_eval.in
 test_options.out: test_options.in
diff --git a/src/testdir/Make_dos.mak b/src/testdir/Make_dos.mak
index a85980e..4efaeb4 100644
--- a/src/testdir/Make_dos.mak
+++ b/src/testdir/Make_dos.mak
@@ -35,6 +35,7 @@
 		test94.out test95.out test96.out test98.out test99.out \
 		test100.out test101.out test102.out test103.out test104.out \
 		test105.out test106.out \
+		test_autoformat_join.out \
 		test_eval.out \
 		test_options.out
 
diff --git a/src/testdir/Make_ming.mak b/src/testdir/Make_ming.mak
index 0bb22cb..f589f20 100644
--- a/src/testdir/Make_ming.mak
+++ b/src/testdir/Make_ming.mak
@@ -55,6 +55,7 @@
 		test94.out test95.out test96.out test98.out test99.out \
 		test100.out test101.out test102.out test103.out test104.out \
 		test105.out test106.out \
+		test_autoformat_join.out \
 		test_eval.out \
 		test_options.out
 
diff --git a/src/testdir/Make_os2.mak b/src/testdir/Make_os2.mak
index a84ade6..4406f7d 100644
--- a/src/testdir/Make_os2.mak
+++ b/src/testdir/Make_os2.mak
@@ -37,6 +37,7 @@
 		test94.out test95.out test96.out test98.out test99.out \
 		test100.out test101.out test102.out test103.out test104.out \
 		test105.out test106.out \
+		test_autoformat_join.out \
 		test_eval.out \
 		test_options.out
 
diff --git a/src/testdir/Make_vms.mms b/src/testdir/Make_vms.mms
index 89c4a84..af839e8 100644
--- a/src/testdir/Make_vms.mms
+++ b/src/testdir/Make_vms.mms
@@ -96,6 +96,7 @@
 	 test95.out test96.out test98.out test99.out \
 	 test100.out test101.out test103.out test104.out \
 	 test105.out test106.out \
+	 test_autoformat_join.out \
 	 test_eval.out \
 	 test_options.out
 
diff --git a/src/testdir/Makefile b/src/testdir/Makefile
index 66536ae..65c82e0 100644
--- a/src/testdir/Makefile
+++ b/src/testdir/Makefile
@@ -33,6 +33,8 @@
 		test94.out test95.out test96.out test97.out test98.out \
 		test99.out test100.out test101.out test102.out test103.out \
 		test104.out test105.out test106.out \
+		test_autoformat_join.out \
+		test_eval.out \
 		test_options.out
 
 SCRIPTS_GUI = test16.out
diff --git a/src/testdir/test_autoformat_join.in b/src/testdir/test_autoformat_join.in
new file mode 100644
index 0000000..f1e1c86
--- /dev/null
+++ b/src/testdir/test_autoformat_join.in
@@ -0,0 +1,23 @@
+Tests for setting the '[,'] marks when joining lines.
+
+STARTTEST
+:so small.vim
+:/^\t\t/
+0gqj
+:let a=string(getpos("'[")).'/'.string(getpos("']"))
+:/^This line/;'}-join
+:let b=string(getpos("'[")).'/'.string(getpos("']"))
+:$put ='First test: Start/End '.string(a)
+:$put ='Second test: Start/End '.string(b)
+:/^\t\t/,$wq! test.out
+ENDTEST
+
+
+		O sodales, ludite, vos qui
+attamen consulite per voster honur. Tua pulchra facies me fay planszer milies
+
+This line.
+Should be joined with the next line
+and with this line
+
+Results:
diff --git a/src/testdir/test_autoformat_join.ok b/src/testdir/test_autoformat_join.ok
new file mode 100644
index 0000000..3b1df79
--- /dev/null
+++ b/src/testdir/test_autoformat_join.ok
@@ -0,0 +1,8 @@
+		O sodales, ludite, vos qui attamen consulite per voster honur.
+Tua pulchra facies me fay planszer milies
+
+This line.  Should be joined with the next line and with this line
+
+Results:
+First test: Start/End '[0, 16, 1, 0]/[0, 17, 1, 0]'
+Second test: Start/End '[0, 19, 11, 0]/[0, 19, 67, 0]'