# HG changeset patch # User Daniel Pfeiffer # Date 1103145860 0 # Node ID 2e6b67f7b5c97a3e78e2cd4d8f09474ef3a6caed # Parent 0d4afb94387033f0203c54148b38a8eab0a077f5 (executable-interpret): Eliminate obsolete compile-internal, and switch to comint for interaction. diff -r 0d4afb943870 -r 2e6b67f7b5c9 lisp/progmodes/executable.el --- a/lisp/progmodes/executable.el Wed Dec 15 19:51:51 2004 +0000 +++ b/lisp/progmodes/executable.el Wed Dec 15 21:24:20 2004 +0000 @@ -199,20 +199,20 @@ (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*"))))