This patch adds duplicate-swim, a command that works like duplicate-line but works on the region if active. It corresponds exactly to upcase-dwim, downcase-dwim and capitalize-dwim which have become quite popular. Rectangular regions are treated specially by duplicating on the right-hand side. This behaviour turns out to be the most convenient one, and is also confluent with that of ordinary regions when the rectangle is only one line tall.