From: Glenn Morris Date: Wed, 19 Mar 2008 07:11:57 +0000 (+0000) Subject: (tramp-drop-volume-letter): Evaluate when compiling. X-Git-Tag: emacs-pretest-23.0.90~7053 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=699a11fbb605e8410309f1eb825297cc16fd8640;p=emacs.git (tramp-drop-volume-letter): Evaluate when compiling. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1f70b0284ca..6f4c93f2fcf 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2008-03-19 Glenn Morris + + * net/tramp.el (tramp-drop-volume-letter): Evaluate when compiling. + (tramp-handle-shell-command): Use condition-case rather than + ignore-errors. + 2008-03-19 Dan Nicolaescu * diff-mode.el (diff-header): Make the color louder. diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 78781aa7e27..d530da37e22 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -3497,16 +3497,17 @@ This is like `dired-recursive-delete-directory' for Tramp files." ;; 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))) + (save-match-data (replace-regexp-in-string tramp-root-regexp "/" name))) - (defalias 'tramp-drop-volume-letter 'identity)) + (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 @@ Lisp error raised when PROGRAM is nil is trapped also, returning 1." ;; 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