changeset 88094:21873b86ecb7

(remote-compile): Remove broken code.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 31 Jan 2008 15:09:19 +0000
parents fa454b3c5b7b
children 852ae38a0128
files lisp/ChangeLog lisp/net/rcompile.el
diffstat 2 files changed, 34 insertions(+), 43 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu Jan 31 11:35:46 2008 +0000
+++ b/lisp/ChangeLog	Thu Jan 31 15:09:19 2008 +0000
@@ -1,3 +1,7 @@
+2008-01-31  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* net/rcompile.el (remote-compile): Remove broken code.
+
 2008-01-31  Jason Rumney  <jasonr@gnu.org>
 
 	* term/w32-win.el (image-library-alist): Prefer libxpm.dll.
@@ -54,8 +58,8 @@
 	* progmodes/cc-langs.el (c-specifier-key): Exclude "template"
 	from this regexp; part of same fix as next change to cc-engine.el.
 
-	* progmodes/cc-engine.el (c-guess-basic-syntax, CASE 5A.5): Anchor
-	the "{" of a template function correctly on "template", not the
+	* progmodes/cc-engine.el (c-guess-basic-syntax, CASE 5A.5):
+	Anchor the "{" of a template function correctly on "template", not the
 	following "<".
 
 	* progmodes/cc-defs.el (c-version): Increase to 5.31.5.
--- a/lisp/net/rcompile.el	Thu Jan 31 11:35:46 2008 +0000
+++ b/lisp/net/rcompile.el	Thu Jan 31 15:09:19 2008 +0000
@@ -115,43 +115,35 @@
 
 ;;;; entry point
 
-;; We use the Tramp internal functions `with-parsed-tramp-file-name'
-;; and `tramp-make-tramp-file-name'.  Better would be, if there are
-;; functions to provide user, host and localname of a remote filename,
-;; independent of Tramp's implementation.  The function calls are
-;; wrapped by `funcall' in order to pacify the byte compiler.
-;; ange-ftp check removed, because it is handled also by Tramp.
+;; We use the Tramp internal function`tramp-make-tramp-file-name'.
+;; Better would be, if there are functions to provide user, host and
+;; localname of a remote filename, independent of Tramp's implementation.
+;; The function calls are wrapped by `funcall' in order to pacify the byte
+;; compiler.  ange-ftp check removed, because it is handled also by Tramp.
 ;;;###autoload
 (defun remote-compile (host user command)
   "Compile the current buffer's directory on HOST.  Log in as USER.
 See \\[compile]."
   (interactive
-   (let ((parsed (and (featurep 'tramp)
-		      (file-remote-p default-directory)))
-         host user command prompt l l-host l-user)
-     (if parsed
-	 (funcall (symbol-function 'with-parsed-tramp-file-name)
-		  default-directory l
-		  (setq host l-host
-			user l-user))
-       (setq prompt (if (stringp remote-compile-host)
-                        (format "Compile on host (default %s): "
-                                remote-compile-host)
-                      "Compile on host: ")
-             host (if (or remote-compile-prompt-for-host
-                          (null remote-compile-host))
-                      (read-from-minibuffer prompt
-                                            "" nil nil
-                                            'remote-compile-host-history)
-                    remote-compile-host)
-             user (if remote-compile-prompt-for-user
-                      (read-from-minibuffer (format
-                                             "Compile by user (default %s): "
-                                             (or remote-compile-user
-                                                 (user-login-name)))
-                                            "" nil nil
-                                            'remote-compile-user-history)
-                    remote-compile-user)))
+   (let (host user command prompt l l-host l-user)
+     (setq prompt (if (stringp remote-compile-host)
+                      (format "Compile on host (default %s): "
+                              remote-compile-host)
+                    "Compile on host: ")
+           host (if (or remote-compile-prompt-for-host
+                        (null remote-compile-host))
+                    (read-from-minibuffer prompt
+                                          "" nil nil
+                                          'remote-compile-host-history)
+                  remote-compile-host)
+           user (if remote-compile-prompt-for-user
+                    (read-from-minibuffer (format
+                                           "Compile by user (default %s): "
+                                           (or remote-compile-user
+                                               (user-login-name)))
+                                          "" nil nil
+                                          'remote-compile-user-history)
+                  remote-compile-user))
      (setq command (read-from-minibuffer "Compile command: "
                                          compile-command nil nil
                                          '(compile-history . 1)))
@@ -164,8 +156,6 @@
         ((null remote-compile-user)
          (setq remote-compile-user (user-login-name))))
   (let* (localname ;; Pacify byte-compiler.
-	 (parsed (and (featurep 'tramp)
-		      (file-remote-p default-directory)))
          (compile-command
           (format "%s %s -l %s \"(%scd %s; %s)\""
 		  remote-shell-program
@@ -174,10 +164,7 @@
                   (if remote-compile-run-before
                       (concat remote-compile-run-before "; ")
                     "")
-		  (if parsed
-		      (funcall (symbol-function 'with-parsed-tramp-file-name)
-			       default-directory nil localname)
-		    "")
+                  ""
                   compile-command)))
     (setq remote-compile-host host)
     (save-some-buffers nil nil)
@@ -185,13 +172,13 @@
     ;; Set comint-file-name-prefix in the compilation buffer so
     ;; compilation-parse-errors will find referenced files by Tramp.
     (with-current-buffer compilation-last-buffer
-      (when (featurep 'tramp)
+      (when (fboundp 'tramp-make-tramp-file-name)
 	(set (make-local-variable 'comint-file-name-prefix)
-	     (funcall (symbol-function 'tramp-make-tramp-file-name)
+	     (tramp-make-tramp-file-name
 	      nil ;; method.
 	      remote-compile-user
 	      remote-compile-host
 	      ""))))))
 
-;;; arch-tag: 2866a132-ece4-4ce9-9f91-ec147f803f73
+;; arch-tag: 2866a132-ece4-4ce9-9f91-ec147f803f73
 ;;; rcompile.el ends here