Skip to content

Instantly share code, notes, and snippets.

@jenssss
Last active March 15, 2018 11:35
Show Gist options
  • Save jenssss/121b54cf750d1a4a6ca4e136f75812eb to your computer and use it in GitHub Desktop.
Save jenssss/121b54cf750d1a4a6ca4e136f75812eb to your computer and use it in GitHub Desktop.
Emacs (lisp) function for cyclically permuting three strings
(defun permute-cyclic (first second third point-start point-end)
(interactive "sFirst \nsSecond \nsThird \nr")
(replace-string first "%" nil point-start point-end)
(replace-string second first nil point-start point-end)
(replace-string third second nil point-start point-end)
(replace-string "%" third nil point-start point-end)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment