diff options
| author | Daniel Pfeiffer | 2004-12-15 21:28:02 +0000 |
|---|---|---|
| committer | Daniel Pfeiffer | 2004-12-15 21:28:02 +0000 |
| commit | 78f617dde40a5eeee768162ffaa266c19c1bed73 (patch) | |
| tree | 6ff69f188e4a77d6768624955087284291547e59 /lisp/progmodes/executable.el | |
| parent | b66d0e6bded32dd56565a4b51dcb0506d8540950 (diff) | |
| download | emacs-78f617dde40a5eeee768162ffaa266c19c1bed73.tar.gz emacs-78f617dde40a5eeee768162ffaa266c19c1bed73.zip | |
(executable-interpret): Eliminate obsolete compile-internal, and switch to comint for interaction.
Diffstat (limited to 'lisp/progmodes/executable.el')
| -rw-r--r-- | lisp/progmodes/executable.el | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lisp/progmodes/executable.el b/lisp/progmodes/executable.el index a5d401a5f5e..0eb53771019 100644 --- a/lisp/progmodes/executable.el +++ b/lisp/progmodes/executable.el | |||
| @@ -199,20 +199,20 @@ non-executable files." | |||
| 199 | (file-modes buffer-file-name))))))) | 199 | (file-modes buffer-file-name))))))) |
| 200 | 200 | ||
| 201 | 201 | ||
| 202 | ;;;###autoload | ||
| 202 | (defun executable-interpret (command) | 203 | (defun executable-interpret (command) |
| 203 | "Run script with user-specified args, and collect output in a buffer. | 204 | "Run script with user-specified args, and collect output in a buffer. |
| 204 | While script runs asynchronously, you can use the \\[next-error] command | 205 | While script runs asynchronously, you can use the \\[next-error] |
| 205 | to find the next error." | 206 | 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." | ||
| 206 | (interactive (list (read-string "Run script: " | 208 | (interactive (list (read-string "Run script: " |
| 207 | (or executable-command | 209 | (or executable-command |
| 208 | buffer-file-name)))) | 210 | buffer-file-name)))) |
| 209 | (require 'compile) | 211 | (require 'compile) |
| 210 | (save-some-buffers (not compilation-ask-about-save)) | 212 | (save-some-buffers (not compilation-ask-about-save)) |
| 211 | (make-local-variable 'executable-command) | 213 | (set (make-local-variable 'executable-command) command) |
| 212 | (compile-internal (setq executable-command command) | 214 | (let ((compilation-error-regexp-alist executable-error-regexp-alist)) |
| 213 | "No more errors." "Interpretation" | 215 | (compilation-start command t (lambda (x) "*interpretation*")))) |
| 214 | ;; Give it a simpler regexp to match. | ||
| 215 | nil executable-error-regexp-alist)) | ||
| 216 | 216 | ||
| 217 | 217 | ||
| 218 | 218 | ||