]> code.delx.au - gnu-emacs-elpa/commitdiff
multishell - Merge edge-case but significant fixes
authorKen Manheimer <ken.manheimer@gmail.com>
Thu, 21 Jan 2016 18:38:58 +0000 (13:38 -0500)
committerKen Manheimer <ken.manheimer@gmail.com>
Thu, 21 Jan 2016 18:45:48 +0000 (13:45 -0500)
including one case that can apply kill-buffer to the wrong buffer, sigh.

packages/multishell/multishell.el

index 62c9d3e8509b31a1542fa00613fa5e52b55baa58..7295aa1ea904dc60eb71e57fc0367aade177db51 100644 (file)
@@ -319,11 +319,7 @@ customize the savehist group to activate savehist."
          (curr-buff-proc (get-buffer-process from-buffer))
          (target-buffer (if from-buffer-is-shell
                             from-buffer
-                          (let ((got (get-buffer target-shell-buffer-name)))
-                            (if (buffer-live-p got)
-                                got
-                              (kill-buffer got)
-                              (get-buffer target-shell-buffer-name)))))
+                          (get-buffer target-shell-buffer-name)))
          inwin
          already-there)
 
@@ -539,15 +535,16 @@ Return them as a list (name dir), with dir nil if none given."
         (cd default-directory)
       (error
        ;; Aargh. Need to isolate this tramp bug.
-       (when (and (stringp (cadr err))
-                  (string-equal (cadr err)
-                                "Selecting deleted buffer"))
-         (signal (car err)
-                 (list
-                  (format "%s, %s (\"%s\")"
-                          "Tramp shell can fail on empty (homedir) path"
-                          "please try again with an explicit path"
-                          (cadr err)))))))
+       (if (and (stringp (cadr err))
+                (string-equal (cadr err)
+                              "Selecting deleted buffer"))
+           (signal (car err)
+                   (list
+                    (format "%s, %s (\"%s\")"
+                            "Tramp shell can fail on empty (homedir) path"
+                            "please try again with an explicit path"
+                            (cadr err))))
+         (signal (car err)(cdr err)))))
     (setq buffer (set-buffer (apply 'make-comint
                                     (multishell-unbracket-asterisks buffer-name)
                                     prog