Skip to content

Instantly share code, notes, and snippets.

@mooz
Created March 28, 2011 14:29
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
(defun my-reb-query-replace-regexp ()
"Call `query-replace-regexp' with current regexp of RE-builder"
(interactive)
(reb-update-regexp)
(let ((re (reb-target-binding reb-regexp)))
(flet ((query-replace-read-from
(prompt regexp-flag)
;; body
re))
(pop-to-buffer reb-target-buffer)
(call-interactively 'query-replace-regexp))))
(define-key reb-mode-map (kbd "C-c %") 'my-reb-query-replace-regexp)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment