]> code.delx.au - gnu-emacs/commitdiff
Fix Bug#17295.
authorMichael Albinus <michael.albinus@gmx.de>
Tue, 6 May 2014 08:42:53 +0000 (10:42 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Tue, 6 May 2014 08:42:53 +0000 (10:42 +0200)
* net/tramp-sh.el (tramp-remote-process-environment): Remove
HISTFILE and HISTSIZE; it's too late to set them here.  Add
:version entry.
(tramp-open-shell): Do not let-bind `tramp-end-of-output'.  Add
"HISTSIZE=/dev/null" to the shell's env arguments.  Do not send
extra "PSx=..." commands.
(tramp-maybe-open-connection): Setenv HISTFILE to /dev/null.

lisp/ChangeLog
lisp/net/tramp-sh.el

index 713d34dda8d1e5ac0ae5ec8377261752e3ae2b05..8a6b61b891b3480d1f6dc3e02d00bbe864007e43 100644 (file)
@@ -1,3 +1,14 @@
+2014-05-06  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/tramp-sh.el (tramp-remote-process-environment): Remove
+       HISTFILE and HISTSIZE; it's too late to set them here.  Add
+       :version entry.
+       (tramp-open-shell): Do not let-bind `tramp-end-of-output'.  Add
+       "HISTSIZE=/dev/null" to the shell's env arguments.  Do not send
+       extra "PSx=..." commands.
+       (tramp-maybe-open-connection): Setenv HISTFILE to /dev/null.
+       (Bug#17295)
+
 2014-05-06  Glenn Morris  <rgm@gnu.org>
 
        * emacs-lisp/find-gc.el (find-gc-source-directory): Give it a value.
index 9c86c8c48bd92c0ab38d03c5fadc27c68a9d66d6..431d6183d71d81f1920015f3ba24e5b6ef0d7cc9 100644 (file)
@@ -425,7 +425,7 @@ as given in your `~/.profile'."
 
 ;;;###tramp-autoload
 (defcustom tramp-remote-process-environment
-  `("HISTFILE=$HOME/.tramp_history" "HISTSIZE=1" "TMOUT=0" "LC_CTYPE=''"
+  `("TMOUT=0" "LC_CTYPE=''"
     ,(format "TERM=%s" tramp-terminal-type)
     "EMACS=t" ;; Deprecated.
     ,(format "INSIDE_EMACS='%s,tramp:%s'" emacs-version tramp-version)
@@ -440,6 +440,7 @@ which might have been set in the init files like ~/.profile.
 Special handling is applied to the PATH environment, which should
 not be set here. Instead, it should be set via `tramp-remote-path'."
   :group 'tramp
+  :version "24.4"
   :type '(repeat string))
 
 (defcustom tramp-sh-extra-args '(("/bash\\'" . "-norc -noprofile"))
@@ -3726,8 +3727,7 @@ file exists and nonzero exit status otherwise."
   (with-tramp-progress-reporter
       vec 5 (format "Opening remote shell `%s'" shell)
     ;; Find arguments for this shell.
-    (let ((tramp-end-of-output tramp-initial-end-of-output)
-         (alist tramp-sh-extra-args)
+    (let ((alist tramp-sh-extra-args)
          item extra-args)
       (while (and alist (null extra-args))
        (setq item (pop alist))
@@ -3735,18 +3735,12 @@ file exists and nonzero exit status otherwise."
          (setq extra-args (cdr item))))
       (tramp-send-command
        vec (format
-           "exec env ENV='' PROMPT_COMMAND='' PS1=%s PS2='' PS3='' %s %s"
+           "exec env ENV='' HISTFILE=/dev/null PROMPT_COMMAND='' PS1=%s PS2='' PS3='' %s %s"
            (tramp-shell-quote-argument tramp-end-of-output)
            shell (or extra-args ""))
        t))
     (tramp-set-connection-property
-     (tramp-get-connection-process vec) "remote-shell" shell)
-    ;; Setting prompts.
-    (tramp-send-command
-     vec (format "PS1=%s" (tramp-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)))
+     (tramp-get-connection-process vec) "remote-shell" shell)))
 
 (defun tramp-find-shell (vec)
   "Opens a shell on the remote host which groks tilde expansion."
@@ -4456,6 +4450,7 @@ connection if a previous connection has died for some reason."
                (delete-process p))
              (setenv "TERM" tramp-terminal-type)
              (setenv "LC_ALL" "en_US.utf8")
+             (setenv "HISTFILE" "/dev/null")
              (setenv "PROMPT_COMMAND")
              (setenv "PS1" tramp-initial-end-of-output)
              (let* ((target-alist (tramp-compute-multi-hops vec))