summaryrefslogtreecommitdiff
path: root/lisp/progmodes/executable.el
diff options
context:
space:
mode:
authorDaniel Pfeiffer <occitan@esperanto.org>2004-12-15 21:28:02 +0000
committerDaniel Pfeiffer <occitan@esperanto.org>2004-12-15 21:28:02 +0000
commit78f617dde40a5eeee768162ffaa266c19c1bed73 (patch)
tree6ff69f188e4a77d6768624955087284291547e59 /lisp/progmodes/executable.el
parentb66d0e6bded32dd56565a4b51dcb0506d8540950 (diff)
downloademacs-78f617dde40a5eeee768162ffaa266c19c1bed73.tar.gz
(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.el14
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."
(file-modes buffer-file-name)))))))
+;;;###autoload
(defun executable-interpret (command)
"Run script with user-specified args, and collect output in a buffer.
-While script runs asynchronously, you can use the \\[next-error] command
-to find the next error."
+While script runs asynchronously, you can use the \\[next-error]
+command to find the next error. The buffer is also in `comint-mode' and
+`compilation-shell-minor-mode', so that you can answer any prompts."
(interactive (list (read-string "Run script: "
(or executable-command
buffer-file-name))))
(require 'compile)
(save-some-buffers (not compilation-ask-about-save))
- (make-local-variable 'executable-command)
- (compile-internal (setq executable-command command)
- "No more errors." "Interpretation"
- ;; Give it a simpler regexp to match.
- nil executable-error-regexp-alist))
+ (set (make-local-variable 'executable-command) command)
+ (let ((compilation-error-regexp-alist executable-error-regexp-alist))
+ (compilation-start command t (lambda (x) "*interpretation*"))))