Skip to content

Instantly share code, notes, and snippets.

@mooz
Created March 28, 2011 14:29
Show Gist options
  • Save mooz/890562 to your computer and use it in GitHub Desktop.
Save mooz/890562 to your computer and use it in GitHub Desktop.
(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