Last active
March 15, 2018 11:35
-
-
Save jenssss/121b54cf750d1a4a6ca4e136f75812eb to your computer and use it in GitHub Desktop.
Emacs (lisp) function for cyclically permuting three strings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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