Mercurial > emacs
comparison lisp/progmodes/executable.el @ 90068:eac554634bfa
Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-79
Merge from emacs--cvs-trunk--0
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-735
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-747
Update from CVS
| author | Miles Bader <miles@gnu.org> |
|---|---|
| date | Sat, 25 Dec 2004 02:00:25 +0000 |
| parents | 68c22ea6027c 2e6b67f7b5c9 |
| children | 62afea0771d8 |
comparison
equal
deleted
inserted
replaced
| 90067:b481c5870e10 | 90068:eac554634bfa |
|---|---|
| 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 |
