See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8699.
+2011-05-26 Leo Liu <sdl.web@gmail.com>
+
+ * editfns.c (Ftranspose_regions): Allow empty regions. (Bug#8699)
+
2011-05-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* dispextern.h (struct glyph_row): New member fringe_bitmap_periodic_p.
if (start2 < end1)
error ("Transposed regions overlap");
- else if (start1 == end1 || start2 == end2)
- error ("Transposed region has length 0");
+ /* Nothing to change for adjacent regions with one being empty */
+ else if ((start1 == end1 || start2 == end2) && end1 == start2)
+ return Qnil;
/* The possibilities are:
1. Adjacent (contiguous) regions, or separate but equal regions