199 |
(file-modes buffer-file-name))))))) |
(file-modes buffer-file-name))))))) |
200 |
|
|
201 |
|
|
202 |
|
;;;###autoload |
203 |
(defun executable-interpret (command) |
(defun executable-interpret (command) |
204 |
"Run script with user-specified args, and collect output in a buffer. |
"Run script with user-specified args, and collect output in a buffer. |
205 |
While script runs asynchronously, you can use the \\[next-error] command |
While script runs asynchronously, you can use the \\[next-error] |
206 |
to find the next error." |
command to find the next error. The buffer is also in `comint-mode' and |
207 |
|
`compilation-shell-minor-mode', so that you can answer any prompts." |
208 |
(interactive (list (read-string "Run script: " |
(interactive (list (read-string "Run script: " |
209 |
(or executable-command |
(or executable-command |
210 |
buffer-file-name)))) |
buffer-file-name)))) |
211 |
(require 'compile) |
(require 'compile) |
212 |
(save-some-buffers (not compilation-ask-about-save)) |
(save-some-buffers (not compilation-ask-about-save)) |
213 |
(make-local-variable 'executable-command) |
(set (make-local-variable 'executable-command) command) |
214 |
(compile-internal (setq executable-command command) |
(let ((compilation-error-regexp-alist executable-error-regexp-alist)) |
215 |
"No more errors." "Interpretation" |
(compilation-start command t (lambda (x) "*interpretation*")))) |
|
;; Give it a simpler regexp to match. |
|
|
nil executable-error-regexp-alist)) |
|
216 |
|
|
217 |
|
|
218 |
|
|