Skip to content

Instantly share code, notes, and snippets.

@hitode909
Created October 28, 2016 07:09
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 hitode909/ec77490c27058a40d699c861feb7bfb9 to your computer and use it in GitHub Desktop.
Save hitode909/ec77490c27058a40d699c861feb7bfb9 to your computer and use it in GitHub Desktop.
(defun prt-introduce-variables ()
(interactive)
(if mark-active
(let (
(resultbuf (get-buffer-create "*introduce-variables*"))
)
(with-current-buffer resultbuf
(setq buffer-read-only nil)
(erase-buffer)
)
(call-process-region (region-beginning) (region-end) "prt" nil (buffer-name resultbuf) nil "introduce_variables")
(with-current-buffer resultbuf
(setq buffer-read-only t)
)
(popwin:popup-buffer resultbuf)
)
(error "mark not active"))
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment