annotate lisp/rcompile.el @ 23327:8875c38b22c7

(sort_args): Fill extra space with NULL ptrs.
author Richard M. Stallman <rms@gnu.org>
date Sun, 27 Sep 1998 07:11:54 +0000
parents 695a4e25eb89
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13337
84acc3adcd63 Comment change.
Richard M. Stallman <rms@gnu.org>
parents: 10453
diff changeset
1 ;;; rcompile.el --- run a compilation on a remote machine
5813
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2
14169
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 14001
diff changeset
3 ;; Copyright (C) 1993, 1994 Free Software Foundation, Inc.
5813
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
4
5814
eecc796f374d Comment changes.
Richard M. Stallman <rms@gnu.org>
parents: 5813
diff changeset
5 ;; Author: Albert <alon@milcse.rtsg.mot.com>
eecc796f374d Comment changes.
Richard M. Stallman <rms@gnu.org>
parents: 5813
diff changeset
6 ;; Maintainer: FSF
eecc796f374d Comment changes.
Richard M. Stallman <rms@gnu.org>
parents: 5813
diff changeset
7 ;; Created: 1993 Oct 6
eecc796f374d Comment changes.
Richard M. Stallman <rms@gnu.org>
parents: 5813
diff changeset
8 ;; Keywords: tools, processes
5813
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
9
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
10 ;; This file is part of GNU Emacs.
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
11
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
12 ;; GNU Emacs is free software; you can redistribute it and/or modify
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
13 ;; it under the terms of the GNU General Public License as published by
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
14 ;; the Free Software Foundation; either version 2, or (at your option)
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
15 ;; any later version.
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
16
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
17 ;; GNU Emacs is distributed in the hope that it will be useful,
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
20 ;; GNU General Public License for more details.
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
21
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
22 ;; You should have received a copy of the GNU General Public License
14169
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 14001
diff changeset
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 14001
diff changeset
24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 14001
diff changeset
25 ;; Boston, MA 02111-1307, USA.
5813
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
26
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
27 ;;; Commentary:
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
28
14169
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 14001
diff changeset
29 ;; This package is for running a remote compilation and using emacs to parse
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 14001
diff changeset
30 ;; the error messages. It works by rsh'ing the compilation to a remote host
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 14001
diff changeset
31 ;; and parsing the output. If the file visited at the time remote-compile was
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 14001
diff changeset
32 ;; called was loaded remotely (ange-ftp), the host and user name are obtained
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 14001
diff changeset
33 ;; by the calling ange-ftp-ftp-name on the current directory. In this case the
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 14001
diff changeset
34 ;; next-error command will also ange-ftp the files over. This is achieved
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 14001
diff changeset
35 ;; automatically because the compilation-parse-errors function uses
16427
3b9f64eb097b Comment change.
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
36 ;; default-directory to build its file names. If however the file visited was
14169
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 14001
diff changeset
37 ;; loaded locally, remote-compile prompts for a host and user and assumes the
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 14001
diff changeset
38 ;; files mounted locally (otherwise, how was the visited file loaded).
5813
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
39
14169
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 14001
diff changeset
40 ;; See the user defined variables section for more info.
5813
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
41
14169
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 14001
diff changeset
42 ;; I was contemplating redefining "compile" to "remote-compile" automatically
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 14001
diff changeset
43 ;; if the file visited was ange-ftp'ed but decided against it for now. If you
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 14001
diff changeset
44 ;; feel this is a good idea, let me know and I'll consider it again.
5813
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
45
14169
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 14001
diff changeset
46 ;; Installation:
5813
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
47
14169
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 14001
diff changeset
48 ;; To use rcompile, you also need to give yourself permission to connect to
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 14001
diff changeset
49 ;; the remote host. You do this by putting lines like:
5813
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
50
14169
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 14001
diff changeset
51 ;; monopoly alon
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 14001
diff changeset
52 ;; vme33
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 14001
diff changeset
53 ;;
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 14001
diff changeset
54 ;; in a file named .rhosts in the home directory (of the remote machine).
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 14001
diff changeset
55 ;; Be careful what you put in this file. A line like:
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 14001
diff changeset
56 ;;
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 14001
diff changeset
57 ;; +
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 14001
diff changeset
58 ;;
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 14001
diff changeset
59 ;; Will allow anyone access to your account without a password. I suggest you
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 14001
diff changeset
60 ;; read the rhosts(5) manual page before you edit this file (if you are not
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 14001
diff changeset
61 ;; familiar with it already)
5813
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
62
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
63 ;;; Code:
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
64
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
65 (provide 'rcompile)
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
66 (require 'compile)
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
67 ;;; The following should not be needed.
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
68 ;;; (eval-when-compile (require 'ange-ftp))
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
69
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
70 ;;;; user defined variables
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
71
17414
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 16427
diff changeset
72 (defgroup remote-compile nil
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 16427
diff changeset
73 "Run a compilation on a remote machine"
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 16427
diff changeset
74 :group 'processes
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 16427
diff changeset
75 :group 'tools)
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 16427
diff changeset
76
5813
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
77
17414
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 16427
diff changeset
78 (defcustom remote-compile-host nil
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 16427
diff changeset
79 "*Host for remote compilations."
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 16427
diff changeset
80 :type '(choice string (const nil))
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 16427
diff changeset
81 :group 'remote-compile)
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 16427
diff changeset
82
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 16427
diff changeset
83 (defcustom remote-compile-user nil
5813
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
84 "User for remote compilations.
17414
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 16427
diff changeset
85 nil means use the value returned by \\[user-login-name]."
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 16427
diff changeset
86 :type '(choice string (const nil))
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 16427
diff changeset
87 :group 'remote-compile)
5813
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
88
17414
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 16427
diff changeset
89 (defcustom remote-compile-run-before nil
5813
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
90 "*Command to run before compilation.
14001
be4f869af091 (remote-compile-run-before): Doc fix.
Karl Heuer <kwzh@gnu.org>
parents: 13337
diff changeset
91 This can be used for setting up environment variables,
5813
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
92 since rsh does not invoke the shell as a login shell and files like .login
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
93 \(tcsh\) and .bash_profile \(bash\) are not run.
17414
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 16427
diff changeset
94 nil means run no commands."
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 16427
diff changeset
95 :type '(choice string (const nil))
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 16427
diff changeset
96 :group 'remote-compile)
5813
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
97
17414
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 16427
diff changeset
98 (defcustom remote-compile-prompt-for-host nil
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 16427
diff changeset
99 "*Non-nil means prompt for host if not available from filename."
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 16427
diff changeset
100 :type 'boolean
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 16427
diff changeset
101 :group 'remote-compile)
5813
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
102
17414
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 16427
diff changeset
103 (defcustom remote-compile-prompt-for-user nil
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 16427
diff changeset
104 "*Non-nil means prompt for user if not available from filename."
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 16427
diff changeset
105 :type 'boolean
f967f12c8ec8 Add defgroup's; use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents: 16427
diff changeset
106 :group 'remote-compile)
5813
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
107
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
108 ;;;; internal variables
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
109
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
110 ;; History of remote compile hosts and users
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
111 (defvar remote-compile-host-history nil)
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
112 (defvar remote-compile-user-history nil)
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
113
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
114
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
115 ;;;; entry point
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
116
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
117 ;;;###autoload
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
118 (defun remote-compile (host user command)
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
119 "Compile the the current buffer's directory on HOST. Log in as USER.
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
120 See \\[compile]."
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
121 (interactive
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
122 (let ((parsed (or (and (featurep 'ange-ftp)
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
123 (ange-ftp-ftp-name default-directory))))
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
124 host user command prompt)
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
125 (if parsed
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
126 (setq host (nth 0 parsed)
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
127 user (nth 1 parsed))
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
128 (setq prompt (if (stringp remote-compile-host)
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
129 (format "Compile on host (default %s): "
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
130 remote-compile-host)
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
131 "Compile on host: ")
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
132 host (if (or remote-compile-prompt-for-host
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
133 (null remote-compile-host))
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
134 (read-from-minibuffer prompt
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
135 "" nil nil
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
136 'remote-compile-host-history)
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
137 remote-compile-host)
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
138 user (if remote-compile-prompt-for-user
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
139 (read-from-minibuffer (format
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
140 "Compile by user (default %s)"
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
141 (or remote-compile-user
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
142 (user-login-name)))
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
143 "" nil nil
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
144 'remote-compile-user-history)
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
145 remote-compile-user)))
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
146 (setq command (read-from-minibuffer "Compile command: "
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
147 compile-command nil nil
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
148 '(compile-history . 1)))
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
149 (list (if (string= host "") remote-compile-host host)
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
150 (if (string= user "") remote-compile-user user)
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
151 command)))
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
152 (setq compile-command command)
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
153 (cond (user
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
154 (setq remote-compile-user user))
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
155 ((null remote-compile-user)
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
156 (setq remote-compile-user (user-login-name))))
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
157 (let* ((parsed (and (featurep 'ange-ftp)
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
158 (ange-ftp-ftp-name default-directory)))
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
159 (compile-command
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
160 (format "%s %s -l %s \"(%scd %s; %s)\""
10453
05e7543bbb96 (remote-compile): Use new global remote-shell-program.
Karl Heuer <kwzh@gnu.org>
parents: 5828
diff changeset
161 remote-shell-program
5813
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
162 host
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
163 remote-compile-user
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
164 (if remote-compile-run-before
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
165 (concat remote-compile-run-before "; ")
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
166 "")
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
167 (if parsed (nth 2 parsed) default-directory)
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
168 compile-command)))
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
169 (setq remote-compile-host host)
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
170 (save-some-buffers nil nil)
5827
982503548902 (remote-compile): Set comint-file-name-prefix in the compilation buffer.
Roland McGrath <roland@gnu.org>
parents: 5814
diff changeset
171 (compile-internal compile-command "No more errors")
982503548902 (remote-compile): Set comint-file-name-prefix in the compilation buffer.
Roland McGrath <roland@gnu.org>
parents: 5814
diff changeset
172 ;; Set comint-file-name-prefix in the compilation buffer so
982503548902 (remote-compile): Set comint-file-name-prefix in the compilation buffer.
Roland McGrath <roland@gnu.org>
parents: 5814
diff changeset
173 ;; compilation-parse-errors will find referenced files by ange-ftp.
982503548902 (remote-compile): Set comint-file-name-prefix in the compilation buffer.
Roland McGrath <roland@gnu.org>
parents: 5814
diff changeset
174 (save-excursion
982503548902 (remote-compile): Set comint-file-name-prefix in the compilation buffer.
Roland McGrath <roland@gnu.org>
parents: 5814
diff changeset
175 (set-buffer compilation-last-buffer)
17538
695a4e25eb89 (remote-compile): Make comint-file-name-prefix local
Richard M. Stallman <rms@gnu.org>
parents: 17414
diff changeset
176 (make-variable-buffer-local 'comint-file-name-prefix)
5827
982503548902 (remote-compile): Set comint-file-name-prefix in the compilation buffer.
Roland McGrath <roland@gnu.org>
parents: 5814
diff changeset
177 (setq comint-file-name-prefix (concat "/" host ":")))))
5813
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
178
1560c0f4ba84 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
179 ;;; rcompile.el ends here