Inside my .emacs
file I have these two functions:
(defun bh/switch-to-vs ()
(interactive)
(universal-argument)
(shell "*vs*"))
(defun bh/switch-to-android ()
(interactive)
(universal-argument)
(shell "*android*"))
I bind keys to those two methods like this:
(global-set-key [f1] 'bh/switch-to-vs)
(global-set-key [f2] 'bh/switch-to-android)
All working fine, but I prefer defining a function which takes the name of the shell as an argument. I need something like this:
(defun bh/switch-to (shell_name)
(interactive)
(universal-argument)
(shell shell_name))
However, I have trouble calling this method from inside (global-set-key [f1] 'bh/switch-to vs)
// not sure how to call it, getting various errors.
How to make this work?