Commit a3240e543c344554162192d087d2ba3cdae4a351
- Diff rendering mode:
- inline
- side by side
rails-ruby.el
(23 / 11)
|   | |||
| 173 | 173 | ||
| 174 | 174 | (require 'inf-ruby) | |
| 175 | 175 | ||
| 176 | (defun run-ruby-in-buffer (buf script &optional params) | ||
| 177 | "Run CMD as a ruby process in BUF if BUF does not exist." | ||
| 178 | (let ((abuf (concat "*" buf "*"))) | ||
| 179 | (when (not (comint-check-proc abuf)) | ||
| 180 | (set-buffer (make-comint buf rails-ruby-command nil script params))) | ||
| 181 | (inferior-ruby-mode) | ||
| 182 | (make-local-variable 'inferior-ruby-first-prompt-pattern) | ||
| 183 | (make-local-variable 'inferior-ruby-prompt-pattern) | ||
| 184 | (setq inferior-ruby-first-prompt-pattern "^>> " | ||
| 185 | inferior-ruby-prompt-pattern "^>> ") | ||
| 186 | (pop-to-buffer abuf))) | ||
| 176 | (if (fboundp 'inf-ruby-mode) | ||
| 177 | (defun run-ruby-in-buffer (buf script &optional params) | ||
| 178 | "Run CMD as a ruby process in BUF if BUF does not exist." | ||
| 179 | (let ((abuf (concat "*" buf "*"))) | ||
| 180 | (when (not (comint-check-proc abuf)) | ||
| 181 | (set-buffer (make-comint buf rails-ruby-command nil script params))) | ||
| 182 | (inferior-ruby-mode) | ||
| 183 | (make-local-variable 'inferior-ruby-first-prompt-pattern) | ||
| 184 | (make-local-variable 'inferior-ruby-prompt-pattern) | ||
| 185 | (setq inferior-ruby-first-prompt-pattern "^>> " | ||
| 186 | inferior-ruby-prompt-pattern "^>> ") | ||
| 187 | (pop-to-buffer abuf))) | ||
| 188 | (defun run-ruby-in-buffer (buf script &optional params) | ||
| 189 | "Run CMD as a ruby process in BUF if BUF does not exist." | ||
| 190 | (let ((abuf (concat "*" buf "*"))) | ||
| 191 | (when (not (comint-check-proc abuf)) | ||
| 192 | (set-buffer (make-comint buf rails-ruby-command nil script params))) | ||
| 193 | (inf-ruby-mode) | ||
| 194 | (make-local-variable 'inf-ruby-first-prompt-pattern) | ||
| 195 | (make-local-variable 'inf-ruby-prompt-pattern) | ||
| 196 | (setq inf-ruby-first-prompt-pattern "^>> " | ||
| 197 | inf-ruby-prompt-pattern "^>> ") | ||
| 198 | (pop-to-buffer abuf)))) | ||
| 187 | 199 | ||
| 188 | 200 | (defun complete-ruby-method (prefix &optional maxnum) | |
| 189 | 201 | (if (capital-word-p prefix) |

