Actually, the first post I made in this blog was about the first minor mode I ever did, Wrap Region. That was more than a year ago. I have learnt a lot since then and when I looked through the source code I found some stuff that needed a refreshment.
What I did was a lot of code cleanup and a bug fix for when wrapping region with tag. I also added a global mode to activate wrap-region in all buffers. The more notable change I did was that I added better support for “insert twice”.
If you set wrap-region-insert-twice to t, when no region is selected and a punctuation key is hit, that key and its right buddy will be inserted.
The updates in this version are:
In both the above cases, this is only true if you hit a punctuation key and don’t move the cursor. As soon as your cursor moves, it is disabled.