Commit 6efb972c authored by Michael Albinus's avatar Michael Albinus

* 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.
parent 1e08a4a1
2011-03-12 Michael Albinus <michael.albinus@gmx.de>
* 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 <monnier@iro.umontreal.ca>
* ebuff-menu.el (electric-buffer-menu-mode-map): Move initialization
......
......@@ -438,6 +438,18 @@ element is not omitted."
(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:
......
......@@ -2313,7 +2313,7 @@ FILE must be a local file name on a connection identified via VEC."
(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 @@ beginning of local filename are not substituted."
(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 @@ coding system might not be determined. This function repairs it."
(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 @@ process to set up. VEC specifies the connection."
;; 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)
......
;;; 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 <kai.grossjohann@gmx.net>
;; 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 "tramp-devel@gnu.org"
"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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment