add lines shuffling functionality from emacs-rocks