emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/emacs-23 r100524: * net/tramp.el (tramp-pro


From: Michael Albinus
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-23 r100524: * net/tramp.el (tramp-progress-reporter-update): Use
Date: Sat, 12 Mar 2011 14:26:19 +0100
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 100524
committer: Michael Albinus <address@hidden>
branch nick: emacs-23
timestamp: Sat 2011-03-12 14:26:19 +0100
message:
  * net/tramp.el (tramp-progress-reporter-update): Use
  `tramp-compat-funcall'.
  (tramp-handle-start-file-process): Use `tramp-compat-process-get'.
  (tramp-handle-insert-file-contents): Make `file-remote-p' call
  compatible.
  (tramp-open-connection-setup-interactive-shell): Use
  `tramp-compat-process-put'.
  
  * net/tramp-compat.el (tramp-compat-process-get)
  (tramp-compat-process-put): New defuns.
  
  * net/trampver.el: Update release number.
  
  Please do not merge with the trunk.
modified:
  lisp/ChangeLog
  lisp/net/tramp-compat.el
  lisp/net/tramp.el
  lisp/net/trampver.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-03-12 02:49:29 +0000
+++ b/lisp/ChangeLog    2011-03-12 13:26:19 +0000
@@ -1,3 +1,18 @@
+2011-03-12  Michael Albinus  <address@hidden>
+
+       * net/tramp.el (tramp-progress-reporter-update): Use
+       `tramp-compat-funcall'.
+       (tramp-handle-start-file-process): Use `tramp-compat-process-get'.
+       (tramp-handle-insert-file-contents): Make `file-remote-p' call
+       compatible.
+       (tramp-open-connection-setup-interactive-shell): Use
+       `tramp-compat-process-put'.
+
+       * net/tramp-compat.el (tramp-compat-process-get)
+       (tramp-compat-process-put): New defuns.
+
+       * net/trampver.el: Update release number.
+
 2011-03-12  Stefan Monnier  <address@hidden>
 
        * ebuff-menu.el (electric-buffer-menu-mode-map): Move initialization

=== modified file 'lisp/net/tramp-compat.el'
--- a/lisp/net/tramp-compat.el  2011-01-02 23:50:46 +0000
+++ b/lisp/net/tramp-compat.el  2011-03-12 13:26:19 +0000
@@ -438,6 +438,18 @@
          (setenv "UNIX95" unix95)
          result)))))
 
+;; The following functions do not exist in XEmacs.  We ignore this;
+;; they are used for checking a remote tty.
+(defun tramp-compat-process-get (process propname)
+  "Return the value of PROCESS' PROPNAME property.
+This is the last value stored with `(process-put PROCESS PROPNAME VALUE)'."
+  (ignore-errors (tramp-compat-funcall 'process-get process propname)))
+
+(defun tramp-compat-process-put (process propname value)
+  "Change PROCESS' PROPNAME property to VALUE.
+It can be retrieved with `(process-get PROCESS PROPNAME)'."
+  (ignore-errors (tramp-compat-funcall 'process-put process propname value)))
+
 (provide 'tramp-compat)
 
 ;;; TODO:

=== modified file 'lisp/net/tramp.el'
--- a/lisp/net/tramp.el 2011-01-10 20:36:09 +0000
+++ b/lisp/net/tramp.el 2011-03-12 13:26:19 +0000
@@ -2313,7 +2313,7 @@
   (let* ((parameters (cdr reporter))
         (message (aref parameters 3)))
     (when (string-match message (or (current-message) ""))
-      (funcall 'progress-reporter-update reporter value))))
+      (tramp-compat-funcall 'progress-reporter-update reporter value))))
 
 (defmacro with-progress-reporter (vec level message &rest body)
   "Executes BODY, spinning a progress reporter with MESSAGE.
@@ -4570,7 +4570,7 @@
                      (tramp-send-command v command nil t) ; nooutput
                    ;; Check, whether a pty is associated.
                    (tramp-maybe-open-connection v)
-                   (unless (process-get
+                   (unless (tramp-compat-process-get
                             (tramp-get-connection-process v) 'remote-tty)
                      (tramp-error
                       v 'file-error
@@ -5025,7 +5025,9 @@
            (set-visited-file-modtime)
            (set-buffer-modified-p nil)
            ;; For root, preserve owner and group when editing files.
-           (when (string-equal (file-remote-p filename 'user) "root")
+           (when (string-equal
+                  (tramp-file-name-handler 'file-remote-p filename 'user)
+                  "root")
              (set (make-local-variable 'backup-by-copying-when-mismatch) t)))
          (when (and (stringp local-copy)
                     (or remote-copy (null tramp-temp-buffer-file-name)))
@@ -7111,7 +7113,8 @@
   ;; Set `remote-tty' process property.
   (ignore-errors
     (let ((tty (tramp-send-command-and-read vec "echo \\\"`tty`\\\"")))
-      (unless (zerop (length tty)) (process-put proc 'remote-tty tty))))
+      (unless (zerop (length tty))
+       (tramp-compat-process-put proc 'remote-tty tty))))
 
   ;; Dump stty settings in the traces.
   (when (>= tramp-verbose 9)

=== modified file 'lisp/net/trampver.el'
--- a/lisp/net/trampver.el      2011-01-02 23:50:46 +0000
+++ b/lisp/net/trampver.el      2011-03-12 13:26:19 +0000
@@ -1,8 +1,8 @@
 ;;; trampver.el --- Transparent Remote Access, Multiple Protocol
 ;;; lisp/trampver.el.  Generated from trampver.el.in by configure.
 
-;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-;;   2010, 2011 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+;;   2011 Free Software Foundation, Inc.
 
 ;; Author: Kai Großjohann <address@hidden>
 ;; Keywords: comm, processes
@@ -30,14 +30,14 @@
 ;; version check is defined in macro AC_EMACS_INFO of aclocal.m4;
 ;; should be changed only there.
 
-(defconst tramp-version "2.1.20"
+(defconst tramp-version "2.1.21-pre"
   "This version of Tramp.")
 
 (defconst tramp-bug-report-address "address@hidden"
   "Email address to send bug reports to.")
 
 ;; Check for (X)Emacs version.
-(let ((x (if (or (>= emacs-major-version 22)   (and (featurep 'xemacs)      (= 
emacs-major-version 21)      (>= emacs-minor-version 4)))    "ok"    (format 
"Tramp 2.1.20 is not fit for %s"       (when (string-match "^.*$" 
(emacs-version))       (match-string 0 (emacs-version)))))))
+(let ((x (if (or (>= emacs-major-version 22)   (and (featurep 'xemacs)      (= 
emacs-major-version 21)      (>= emacs-minor-version 4)))    "ok"    (format 
"Tramp 2.1.21-pre is not fit for %s"           (when (string-match "^.*$" 
(emacs-version))       (match-string 0 (emacs-version)))))))
   (unless (string-match "\\`ok\\'" x) (error "%s" x)))
 
 (provide 'trampver)


reply via email to

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