   :keymap ros-run-keymap
   (message "ros-run mode: k to stop, q to quit, r to restart"))
 
+(setq ros-run-mode-hook 'ansi-color-for-comint-mode-on)
+
+
 (defun rosemacs/contains-running-process (name)
   (let ((buf (get-buffer name)))
     (and buf

           (and proc
                (member (process-status proc) '(run stop)))))))

(defun ros-run (pkg exec &rest args)
  "pkg is a ros package name and exec is the executable name.  Tab completes package name.  Exec defaults to package name itself."
  (interactive (list (setq ros-run-temp-var (ros-completing-read-package
                                             nil (get-buffer-ros-package)))
                     (funcall ros-completion-function (format "Enter executable (default %s): " ros-run-temp-var)
                              (map 'list #'identity (ros-find-executables ros-run-temp-var))
                              nil nil nil nil ros-run-temp-var)))
  (let* ((name (format "*rosrun:%s/%s" pkg exec))
         (buf (get-buffer-create name)))
    (save-excursion
      (set-buffer buf)
      (setq ros-run-pkg pkg
            ros-run-executable exec
            ros-run-args args))
    (rosrun/restart buf)))

(defun rosrun/restart (buf)
  (if (rosemacs/contains-running-process buf)

(defvar rosemacs/nodes-vec (vector) "Vector of nodes")

(defvar roslaunch/history-list nil)
(defvar rosrun/history-list nil)

(defvar ros-buffer-package nil "A buffer-local variable for caching the current buffer's ros package.")
(make-variable-buffer-local 'ros-buffer-package)
