]> code.delx.au - gnu-emacs-elpa/commitdiff
Register name/path association early, so name is at front of history.
authorKen Manheimer <ken.manheimer@gmail.com>
Thu, 21 Jan 2016 02:03:30 +0000 (21:03 -0500)
committerKen Manheimer <ken.manheimer@gmail.com>
Thu, 21 Jan 2016 02:03:30 +0000 (21:03 -0500)
multishell.el

index 1d10b9469973641fd53eac4e7862df00225bee24..62c9d3e8509b31a1542fa00613fa5e52b55baa58 100644 (file)
@@ -93,6 +93,8 @@
 (require 'comint)
 (require 'shell)
 
+(defvar multishell-version "1.0.5")
+
 (defgroup multishell nil
   "Allout extension that highlights outline structure graphically.
 
@@ -325,6 +327,11 @@ customize the savehist group to activate savehist."
          inwin
          already-there)
 
+    ;; Register early so the entry is pushed to the front:
+    (multishell-register-name-to-path (multishell-unbracket-asterisks
+                                       target-shell-buffer-name)
+                                      use-default-dir)
+
     (when doublearg
       (setq multishell-primary-name target-shell-buffer-name))
 
@@ -369,9 +376,7 @@ customize the savehist group to activate savehist."
     (let ((process (get-buffer-process (current-buffer))))
       (if (and process (equal 'stop (process-status process)))
           (continue-process process)))
-    (multishell-register-name-to-path (multishell-unbracket-asterisks
-                                       target-shell-buffer-name)
-                                      use-default-dir)
+
     (when (or already-there
              (equal (current-buffer) from-buffer))
       (goto-char (point-max))