]> code.delx.au - gnu-emacs-elpa/commitdiff
multishell-list-open-as-default - new operation, on "O"
authorKen Manheimer <ken.manheimer@gmail.com>
Sat, 30 Jan 2016 11:16:06 +0000 (06:16 -0500)
committerKen Manheimer <ken.manheimer@gmail.com>
Sat, 30 Jan 2016 11:16:06 +0000 (06:16 -0500)
multishell-list.el

index 882a1d17940d69290457909ed5e2575dc53a8609..578abdbb5016672e781bec7190f18b3a165e945f 100644 (file)
   "Pop to current entry's shell, and refresh the listing buffer."
   (interactive)
   (multishell-pop-to-shell nil (tabulated-list-get-id)))
+(defun multishell-list-open-as-default ()
+  "Pop to current entry's shell, and set as the default shell."
+  (interactive)
+  (message "%s <==" (multishell-name-from-entry (tabulated-list-get-id)))
+  (multishell-pop-to-shell '(16) (tabulated-list-get-id)))
 (defun multishell-list-open-here ()
   "Switch to current entry's shell buffer."
   (interactive)
 (define-key multishell-list-mode-map (kbd "d") 'multishell-list-delete)
 (define-key multishell-list-mode-map (kbd "e") 'multishell-list-edit-entry)
 (define-key multishell-list-mode-map (kbd "o") 'multishell-list-open-pop)
+(define-key multishell-list-mode-map (kbd "O") 'multishell-list-open-as-default)
 (define-key multishell-list-mode-map
   (kbd "<return>") 'multishell-list-open-here)