[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 7e7d7bb 2/3: Merge commit '2c5d608ddfeb2dc1acc15d645d94cac
[elpa] master 7e7d7bb 2/3: Merge commit '2c5d608ddfeb2dc1acc15d645d94cac087f001d4'
Tue, 19 Jan 2016 06:55:19 +0000
Merge: 445258b 2c5d608
Author: Ken Manheimer <address@hidden>
Commit: Ken Manheimer <address@hidden>
Merge commit '2c5d608ddfeb2dc1acc15d645d94cac087f001d4'
packages/multishell/multishell.el | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/packages/multishell/multishell.el
index e6924e8..e23813d 100644
@@ -1,4 +1,4 @@
-;;; multishell.el --- facilitate use of multiple local and remote shell buffers
+;;; multishell.el --- facilitate multiple local and remote shell buffers
;; Copyright (C) 1999-2016 Free Software Foundation, Inc. and Ken Manheimer
@@ -175,11 +175,18 @@ emacs sessions."
(defun multishell-register-name-to-path (name path)
"Add or replace entry associating NAME with PATH in `multishell-history'.
-Promote to added/changed entry to the front of the list."
+If NAME already had a PATH and new PATH is empty, retain old one.
+Promote added/changed entry to the front of the list."
;; Add or promote to the front, tracking path changes in the process.
(let* ((entries (multishell-history-entries name))
- (becomes (concat name path)))
+ (becomes (concat name path))
(dolist (entry entries)
+ (when (or (not path) (string= path ""))
+ ;; Retain explicit established path.
+ (setq path (cadr (multishell-split-entry-name-and-tramp entry))
+ becomes (concat name path)))
(setq multishell-history (delete entry multishell-history)))
(setq multishell-history (push becomes multishell-history))))