Created
July 24, 2015 07:10
-
-
Save davidsm/e3edbfc32e5ac59665b2 to your computer and use it in GitHub Desktop.
Emacs string replace function that works on the entire buffer regardless of cursor position
This file contains hidden or 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
(provide 'mystuff) | |
(defun replace-all (from to) | |
(interactive "sReplace: \nsWith: ") | |
(save-excursion | |
(goto-char (point-min)) | |
(replace-string from to) | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment