Skip to content

Instantly share code, notes, and snippets.

@halbtuerke
Created November 18, 2014 08:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save halbtuerke/72ebdfc22720ce1affc2 to your computer and use it in GitHub Desktop.
Save halbtuerke/72ebdfc22720ce1affc2 to your computer and use it in GitHub Desktop.
(defun test-search-forward-replace-match ()
(interactive)
(save-excursion
(with-current-buffer (current-buffer)
(goto-char (point-min))
(search-forward "test" nil t)
(replace-match "it works"))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment