Skip to content

Instantly share code, notes, and snippets.

Created December 14, 2011 03:11
What would you like to do?
;; quickrun.elをcompileで動かすやつ
(defun my-quickrun ()
"Run commands quickly for current buffer"
(quickrun-common (point-min) (point-max)))
(defun my-quickrun-common (start end)
(let* ((src (file-name-nondirectory (buffer-file-name)))
(lang (quickrun/decide-file-type src))
(cmd-key (or (and current-prefix-arg (quickrun/prompt))
(quickrun/get-command-key lang)
(cmd-info-hash (save-excursion (quickrun/fill-templates cmd-key src))))
(setq quickrun-last-lang cmd-key)
(unless quickrun/compile-only-flag
(compile (gethash :exec cmd-info-hash)))))
(defun my-quickrun-with-arg (arg)
"Run commands quickly for current buffer with arguments"
(list (read-string "QuickRun Arg: ")))
(let ((quickrun-option-args arg))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment