comparison lisp/progmodes/executable.el @ 58983:2e6b67f7b5c9

(executable-interpret): Eliminate obsolete compile-internal, and switch to comint for interaction.
author Daniel Pfeiffer <occitan@esperanto.org>
date Wed, 15 Dec 2004 21:24:20 +0000
parents 18ada18b62be
children 8cffa2d0ef26 eac554634bfa
comparison
equal deleted inserted replaced
58982:0d4afb943870 58983:2e6b67f7b5c9
197 (- executable-chmod) 197 (- executable-chmod)
198 (logior executable-chmod 198 (logior executable-chmod
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
219 ;;;###autoload 219 ;;;###autoload
220 (defun executable-set-magic (interpreter &optional argument 220 (defun executable-set-magic (interpreter &optional argument