emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r100935: * net/tramp.el (tramp-handle


From: Michael Albinus
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r100935: * net/tramp.el (tramp-handle-start-file-process): Check only for
Date: Thu, 29 Jul 2010 15:13:11 +0200
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 100935
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Thu 2010-07-29 15:13:11 +0200
message:
  * net/tramp.el (tramp-handle-start-file-process): Check only for
  `remote-tty' process property.
  (tramp-open-shell): Don't check for tty.
  (tramp-open-connection-setup-interactive-shell): Set `remote-tty'
  process property.
  
  * progmodes/gdb-mi.el (gdb-init-1): Check also for tty on a remote
  host.
modified:
  lisp/ChangeLog
  lisp/net/tramp.el
  lisp/progmodes/gdb-mi.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-07-28 18:54:42 +0000
+++ b/lisp/ChangeLog    2010-07-29 13:13:11 +0000
@@ -1,3 +1,14 @@
+2010-07-29  Michael Albinus  <address@hidden>
+
+       * net/tramp.el (tramp-handle-start-file-process): Check only for
+       `remote-tty' process property.
+       (tramp-open-shell): Don't check for tty.
+       (tramp-open-connection-setup-interactive-shell): Set `remote-tty'
+       process property.
+
+       * progmodes/gdb-mi.el (gdb-init-1): Check also for tty on a remote
+       host.
+
 2010-07-28  Chong Yidong  <address@hidden>
 
        * emacs-lisp/package.el (package-load-list, package-archives)

=== modified file 'lisp/net/tramp.el'
--- a/lisp/net/tramp.el 2010-07-28 10:02:18 +0000
+++ b/lisp/net/tramp.el 2010-07-29 13:13:11 +0000
@@ -4538,14 +4538,12 @@
          (with-current-buffer (tramp-get-connection-buffer v)
            (clear-visited-file-modtime)
            (narrow-to-region (point-max) (point-max)))
-         (if (stringp program)
-             ;; Send the command.  `tramp-send-command' opens a new
-             ;; connection.
+         (if command
+             ;; Send the command.
              (tramp-send-command v command nil t) ; nooutput
-           ;; Check, whether a pty is associated, and set it as
-           ;; process property.
-           (condition-case nil
-               (tramp-send-command-and-read v "echo \\\"`tty`\\\"")
+           ;; Check, whether a pty is associated.
+           (tramp-maybe-open-connection v)
+           (unless (process-get (tramp-get-connection-process v) 'remote-tty)
              (tramp-error
               v 'file-error "pty association is not supported for `%s'" name)))
          ;; Set query flag for this process.
@@ -6631,10 +6629,7 @@
      vec (format "PS1=%s" (shell-quote-argument tramp-end-of-output)) t)
     (tramp-send-command vec "PS2=''" t)
     (tramp-send-command vec "PS3=''" t)
-    (tramp-send-command vec "PROMPT_COMMAND=''" t)
-    ;; Dump tty in the traces.
-    (when (>= tramp-verbose 9)
-      (tramp-send-command vec "tty" t))))
+    (tramp-send-command vec "PROMPT_COMMAND=''" t)))
 
 (defun tramp-find-shell (vec)
   "Opens a shell on the remote host which groks tilde expansion."
@@ -7071,6 +7066,11 @@
   (when (string-match "^IRIX64" (tramp-get-connection-property vec "uname" ""))
     (tramp-send-command vec "set +H" t))
 
+  ;; 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))))
+
   ;; Set the environment.
   (tramp-message vec 5 "Setting default environment")
 

=== modified file 'lisp/progmodes/gdb-mi.el'
--- a/lisp/progmodes/gdb-mi.el  2010-03-28 19:22:52 +0000
+++ b/lisp/progmodes/gdb-mi.el  2010-07-29 13:13:11 +0000
@@ -795,7 +795,10 @@
   (gdb-input
    ;; Needs GDB 6.4 onwards
    (list (concat "-inferior-tty-set "
-                (process-tty-name (get-process "gdb-inferior")))
+                (or
+                 ;; The process can run on a remote host.
+                 (process-get (get-process "gdb-inferior") 'remote-tty)
+                 (process-tty-name (get-process "gdb-inferior"))))
         'ignore))
   (if (eq window-system 'w32)
       (gdb-input (list "-gdb-set new-console off" 'ignore)))


reply via email to

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