magnars/multiple-cursors.el — pull request #80 by smithzvk (2013-05-16 22:03:03+00:00)
Title: Mark pop

This is my first time doing this, so I apologize if I have done it incorrectly.

I wrote a little function, mc/mark-pop, that allows you to set the location of your cursors by pushing marks onto the mark right (via "C-Space" or otherwise) and then popping them, realizing them as new cursor locations.

I like this hack as it allows me to carefully place the cursors allowing for fairly intricate changes (particularly on S-expressions). For instance, I have a difficult time marking every S-expression in a list without mc/mark-pop (you cannot match on open parentheses as it would catch nested forms).

This kind of doesn't work with transient-mark-mode. Also, I don't completely understand your test suite, so I simply mimicked some of the tests in edit-lines.feature. My limited testing indicates that this works well enough.