changeset 93062:079f34f8306f

(tramp-drop-volume-letter): Evaluate when compiling.
author Glenn Morris <rgm@gnu.org>
date Wed, 19 Mar 2008 07:10:36 +0000
parents d8532269f863
children ad46073f1c8b
files lisp/net/tramp.el
diffstat 1 files changed, 10 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/net/tramp.el	Wed Mar 19 04:59:34 2008 +0000
+++ b/lisp/net/tramp.el	Wed Mar 19 07:10:36 2008 +0000
@@ -3497,16 +3497,17 @@
 
 ;; Canonicalization of file names.
 
-(if (memq system-type '(cygwin windows-nt))
-    (defun tramp-drop-volume-letter (name)
-      "Cut off unnecessary drive letter from file NAME.
+(eval-and-compile			; silence compiler
+  (if (memq system-type '(cygwin windows-nt))
+      (defun tramp-drop-volume-letter (name)
+	"Cut off unnecessary drive letter from file NAME.
 The function `tramp-handle-expand-file-name' calls `expand-file-name'
 locally on a remote file name.  When the local system is a W32 system
 but the remote system is Unix, this introduces a superfluous drive
 letter into the file name.  This function removes it."
-      (save-match-data (replace-regexp-in-string tramp-root-regexp "/" name)))
-
-  (defalias 'tramp-drop-volume-letter 'identity))
+	(save-match-data (replace-regexp-in-string tramp-root-regexp "/" name)))
+
+    (defalias 'tramp-drop-volume-letter 'identity)))
 
 (defun tramp-handle-expand-file-name (name &optional dir)
   "Like `expand-file-name' for Tramp files.
@@ -3810,7 +3811,9 @@
     ;; support 2 (asynchronous) processes in parallel.
     (when p
       (if (yes-or-no-p "A command is running.  Kill it? ")
-	  (ignore-errors (kill-process p))
+	  (condition-case nil
+	      (kill-process p)
+	    (error nil))
 	(error "Shell command in progress")))
 
     (with-current-buffer output-buffer