aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2008-01-31 15:09:19 +0000
committerStefan Monnier2008-01-31 15:09:19 +0000
commitae2af0e322eeaba554ce7c3805b8fd8a362b1f17 (patch)
tree99bbaf4bf6b981dc69726b2f70826ad22286a039
parent94cc397c541f50af6b049af6c42806daa2be2709 (diff)
downloademacs-ae2af0e322eeaba554ce7c3805b8fd8a362b1f17.tar.gz
emacs-ae2af0e322eeaba554ce7c3805b8fd8a362b1f17.zip
(remote-compile): Remove broken code.
-rw-r--r--lisp/ChangeLog8
-rw-r--r--lisp/net/rcompile.el69
2 files changed, 34 insertions, 43 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7b43346100c..4a76265d293 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12008-01-31 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * net/rcompile.el (remote-compile): Remove broken code.
4
12008-01-31 Jason Rumney <jasonr@gnu.org> 52008-01-31 Jason Rumney <jasonr@gnu.org>
2 6
3 * term/w32-win.el (image-library-alist): Prefer libxpm.dll. 7 * term/w32-win.el (image-library-alist): Prefer libxpm.dll.
@@ -54,8 +58,8 @@
54 * progmodes/cc-langs.el (c-specifier-key): Exclude "template" 58 * progmodes/cc-langs.el (c-specifier-key): Exclude "template"
55 from this regexp; part of same fix as next change to cc-engine.el. 59 from this regexp; part of same fix as next change to cc-engine.el.
56 60
57 * progmodes/cc-engine.el (c-guess-basic-syntax, CASE 5A.5): Anchor 61 * progmodes/cc-engine.el (c-guess-basic-syntax, CASE 5A.5):
58 the "{" of a template function correctly on "template", not the 62 Anchor the "{" of a template function correctly on "template", not the
59 following "<". 63 following "<".
60 64
61 * progmodes/cc-defs.el (c-version): Increase to 5.31.5. 65 * progmodes/cc-defs.el (c-version): Increase to 5.31.5.
diff --git a/lisp/net/rcompile.el b/lisp/net/rcompile.el
index f4e9d312437..d2c738336bd 100644
--- a/lisp/net/rcompile.el
+++ b/lisp/net/rcompile.el
@@ -115,43 +115,35 @@ nil means run no commands."
115 115
116;;;; entry point 116;;;; entry point
117 117
118;; We use the Tramp internal functions `with-parsed-tramp-file-name' 118;; We use the Tramp internal function`tramp-make-tramp-file-name'.
119;; and `tramp-make-tramp-file-name'. Better would be, if there are 119;; Better would be, if there are functions to provide user, host and
120;; functions to provide user, host and localname of a remote filename, 120;; localname of a remote filename, independent of Tramp's implementation.
121;; independent of Tramp's implementation. The function calls are 121;; The function calls are wrapped by `funcall' in order to pacify the byte
122;; wrapped by `funcall' in order to pacify the byte compiler. 122;; compiler. ange-ftp check removed, because it is handled also by Tramp.
123;; ange-ftp check removed, because it is handled also by Tramp.
124;;;###autoload 123;;;###autoload
125(defun remote-compile (host user command) 124(defun remote-compile (host user command)
126 "Compile the current buffer's directory on HOST. Log in as USER. 125 "Compile the current buffer's directory on HOST. Log in as USER.
127See \\[compile]." 126See \\[compile]."
128 (interactive 127 (interactive
129 (let ((parsed (and (featurep 'tramp) 128 (let (host user command prompt l l-host l-user)
130 (file-remote-p default-directory))) 129 (setq prompt (if (stringp remote-compile-host)
131 host user command prompt l l-host l-user) 130 (format "Compile on host (default %s): "
132 (if parsed 131 remote-compile-host)
133 (funcall (symbol-function 'with-parsed-tramp-file-name) 132 "Compile on host: ")
134 default-directory l 133 host (if (or remote-compile-prompt-for-host
135 (setq host l-host 134 (null remote-compile-host))
136 user l-user)) 135 (read-from-minibuffer prompt
137 (setq prompt (if (stringp remote-compile-host) 136 "" nil nil
138 (format "Compile on host (default %s): " 137 'remote-compile-host-history)
139 remote-compile-host) 138 remote-compile-host)
140 "Compile on host: ") 139 user (if remote-compile-prompt-for-user
141 host (if (or remote-compile-prompt-for-host 140 (read-from-minibuffer (format
142 (null remote-compile-host)) 141 "Compile by user (default %s): "
143 (read-from-minibuffer prompt 142 (or remote-compile-user
144 "" nil nil 143 (user-login-name)))
145 'remote-compile-host-history) 144 "" nil nil
146 remote-compile-host) 145 'remote-compile-user-history)
147 user (if remote-compile-prompt-for-user 146 remote-compile-user))
148 (read-from-minibuffer (format
149 "Compile by user (default %s): "
150 (or remote-compile-user
151 (user-login-name)))
152 "" nil nil
153 'remote-compile-user-history)
154 remote-compile-user)))
155 (setq command (read-from-minibuffer "Compile command: " 147 (setq command (read-from-minibuffer "Compile command: "
156 compile-command nil nil 148 compile-command nil nil
157 '(compile-history . 1))) 149 '(compile-history . 1)))
@@ -164,8 +156,6 @@ See \\[compile]."
164 ((null remote-compile-user) 156 ((null remote-compile-user)
165 (setq remote-compile-user (user-login-name)))) 157 (setq remote-compile-user (user-login-name))))
166 (let* (localname ;; Pacify byte-compiler. 158 (let* (localname ;; Pacify byte-compiler.
167 (parsed (and (featurep 'tramp)
168 (file-remote-p default-directory)))
169 (compile-command 159 (compile-command
170 (format "%s %s -l %s \"(%scd %s; %s)\"" 160 (format "%s %s -l %s \"(%scd %s; %s)\""
171 remote-shell-program 161 remote-shell-program
@@ -174,10 +164,7 @@ See \\[compile]."
174 (if remote-compile-run-before 164 (if remote-compile-run-before
175 (concat remote-compile-run-before "; ") 165 (concat remote-compile-run-before "; ")
176 "") 166 "")
177 (if parsed 167 ""
178 (funcall (symbol-function 'with-parsed-tramp-file-name)
179 default-directory nil localname)
180 "")
181 compile-command))) 168 compile-command)))
182 (setq remote-compile-host host) 169 (setq remote-compile-host host)
183 (save-some-buffers nil nil) 170 (save-some-buffers nil nil)
@@ -185,13 +172,13 @@ See \\[compile]."
185 ;; Set comint-file-name-prefix in the compilation buffer so 172 ;; Set comint-file-name-prefix in the compilation buffer so
186 ;; compilation-parse-errors will find referenced files by Tramp. 173 ;; compilation-parse-errors will find referenced files by Tramp.
187 (with-current-buffer compilation-last-buffer 174 (with-current-buffer compilation-last-buffer
188 (when (featurep 'tramp) 175 (when (fboundp 'tramp-make-tramp-file-name)
189 (set (make-local-variable 'comint-file-name-prefix) 176 (set (make-local-variable 'comint-file-name-prefix)
190 (funcall (symbol-function 'tramp-make-tramp-file-name) 177 (tramp-make-tramp-file-name
191 nil ;; method. 178 nil ;; method.
192 remote-compile-user 179 remote-compile-user
193 remote-compile-host 180 remote-compile-host
194 "")))))) 181 ""))))))
195 182
196;;; arch-tag: 2866a132-ece4-4ce9-9f91-ec147f803f73 183;; arch-tag: 2866a132-ece4-4ce9-9f91-ec147f803f73
197;;; rcompile.el ends here 184;;; rcompile.el ends here