Skip to content

Instantly share code, notes, and snippets.

@matsu911
Created July 2, 2013 15:18
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 matsu911/5910202 to your computer and use it in GitHub Desktop.
Save matsu911/5910202 to your computer and use it in GitHub Desktop.
毎回rakeの前にバッファをキルする変更
(defun motion-execute-rake-command ()
(let* ((use-bundler (motion-bundler-p))
(buf (let ((buffer-name (concat "*" motion-execute-rake-buffer "*")))
(when (get-buffer buffer-name)
(let ((kill-buffer-query-functions nil))
(kill-buffer buffer-name)))
(get-buffer-create buffer-name)))
(sub-command (motion-get-rake-sub-command use-bundler))
(params (motion-construct-rake-command use-bundler sub-command)))
(message "%s" (mapconcat (lambda (p) (if p (concat p " ") "")) params ""))
(apply 'make-comint motion-execute-rake-buffer params)
(pop-to-buffer buf)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment