emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/net/tramp.el,v


From: Michael Albinus
Subject: [Emacs-diffs] Changes to emacs/lisp/net/tramp.el,v
Date: Tue, 08 Jan 2008 20:07:22 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Michael Albinus <albinus>       08/01/08 20:07:21

Index: net/tramp.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/net/tramp.el,v
retrieving revision 1.165
retrieving revision 1.166
diff -u -b -r1.165 -r1.166
--- net/tramp.el        23 Dec 2007 13:25:26 -0000      1.165
+++ net/tramp.el        8 Jan 2008 20:07:21 -0000       1.166
@@ -2,7 +2,7 @@
 ;;; -*- mode: Emacs-Lisp; coding: utf-8; -*-
 
 ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007 Free Software Foundation, Inc.
+;;   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
 ;; (copyright statements below in code to be updated with the above notice)
 
@@ -112,14 +112,14 @@
 
 (autoload 'uudecode-decode-region "uudecode")
 
-;; The following Tramp packages must be loaded after Tramp, because
-;; they require Tramp as well.
+;; The following Tramp packages must be loaded after tramp.el, because
+;; they require it as well.
 (eval-after-load "tramp"
   '(dolist
        (feature
        (list
 
-        ;; Tramp commands.
+        ;; Tramp interactive commands.
         'tramp-cmds
 
         ;; Load foreign FTP method.
@@ -891,7 +891,7 @@
 ;; "getconf PATH" yields:
 ;; HP-UX: 
/usr/bin:/usr/ccs/bin:/opt/ansic/bin:/opt/langtools/bin:/opt/fortran/bin
 ;; Solaris: /usr/xpg4/bin:/usr/ccs/bin:/usr/bin:/opt/SUNWspro/bin
-;; Linux (Debian, Suse): /bin:/usr/bin
+;; GNU/Linux (Debian, Suse): /bin:/usr/bin
 ;; FreeBSD: /usr/bin:/bin:/usr/sbin:/sbin: - beware trailing ":"!
 (defcustom tramp-remote-path
   '(tramp-default-remote-path "/usr/sbin" "/usr/local/bin"
@@ -914,7 +914,7 @@
                  (string :tag "Directory"))))
 
 (defcustom tramp-remote-process-environment
-  `("HISTFILE=$HOME/.tramp_history" "HISTSIZE=1" "LC_TIME=C"
+  `("HISTFILE=$HOME/.tramp_history" "HISTSIZE=1" "LC_CTYPE=C" "LC_TIME=C"
     ,(concat "TERM=" tramp-terminal-type)
     "CDPATH=" "HISTORY=" "MAIL=" "MAILCHECK=" "MAILPATH="
     "autocorrect=" "correct=")
@@ -1595,7 +1595,7 @@
 (defconst tramp-perl-encode
   "%s -e '
 # This script is contributed by Juanma Barranquero <address@hidden>.
-# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007
+# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008
 #   Free Software Foundation, Inc.
 use strict;
 
@@ -1637,7 +1637,7 @@
 (defconst tramp-perl-decode
   "%s -e '
 # This script is contributed by Juanma Barranquero <address@hidden>.
-# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007
+# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008
 #   Free Software Foundation, Inc.
 use strict;
 
@@ -1776,7 +1776,7 @@
 If (FUNCTION FILENAME) returns non-nil, then all I/O on that file is done by
 calling HANDLER.")
 
-;;; Internal functions which must come first.
+;;; Internal functions which must come first:
 
 (defsubst tramp-debug-message (vec fmt-string &rest args)
   "Append message to debug buffer.
@@ -2044,9 +2044,9 @@
    (cdr (assoc method tramp-completion-function-alist))))
 
 
-;;; Fontification of `read-file-name'.
+;;; Fontification of `read-file-name':
 
-;; rfn-eshadow.el is part of Emacs 22.  Its is autoloaded.
+;; rfn-eshadow.el is part of Emacs 22.  It is autoloaded.
 (defvar tramp-rfn-eshadow-overlay)
 (make-variable-buffer-local 'tramp-rfn-eshadow-overlay)
 
@@ -3609,7 +3609,7 @@
      minibuffer-electric-tilde)))
 
 
-;;; Remote commands.
+;;; Remote commands:
 
 (defun tramp-handle-executable-find (command)
   "Like `executable-find' for Tramp files."
@@ -3693,7 +3693,9 @@
         ((bufferp (car destination))
          (setq outbuf (car destination)))
         ((stringp (car destination))
-         (setq outbuf (get-buffer-create (car destination)))))
+         (setq outbuf (get-buffer-create (car destination))))
+        ((car destination)
+         (setq outbuf (current-buffer))))
        ;; stderr
        (cond
         ((stringp (cadr destination))
@@ -4539,7 +4541,7 @@
 
 (add-hook 'tramp-unload-hook 'tramp-unload-file-name-handlers)
 
-;;; File name handler functions for completion mode.
+;;; File name handler functions for completion mode:
 
 (defvar tramp-completion-mode nil
   "If non-nil, external packages signal that they are in file name completion.
@@ -6245,16 +6247,14 @@
 (defun tramp-wait-for-output (proc &optional timeout)
   "Wait for output from remote rsh command."
   (with-current-buffer (process-buffer proc)
-    (let ((found
-          (tramp-wait-for-regexp
-           proc timeout
-           ;; Initially, `tramp-end-of-output' is "$ ".  There might
-           ;; be leading escape sequences, which must be ignored.
-           (format "^[^$\n]*%s\r?$" (regexp-quote tramp-end-of-output)))))
+    ;; Initially, `tramp-end-of-output' is "$ ".  There might be
+    ;; leading escape sequences, which must be ignored.
+    (let* ((regexp (format "^[^$\n]*%s\r?$" (regexp-quote 
tramp-end-of-output)))
+          (found (tramp-wait-for-regexp proc timeout regexp)))
       (if found
          (let (buffer-read-only)
            (goto-char (point-max))
-           (forward-line -2)
+           (re-search-backward regexp nil t)
            (delete-region (point) (point-max)))
        (if timeout
            (tramp-error




reply via email to

[Prev in Thread] Current Thread [Next in Thread]