 ;; (add-to-list 'load-path "~/.emacs.d/vendor/")
 ;; (require 'peepopen)
 
+;;;###autoload
 (defun peepopen-goto-file-gui ()
   "Uses external GUI app to quickly jump to a file in the project."
   (interactive)
+  (defun string-join (separator strings)
+    "Join all STRINGS using SEPARATOR."
+    (mapconcat 'identity strings separator))
   (let ((root (textmate-project-root)))
     (when (null root)
       (error

     (format "open -a PeepOpen '%s'"
             (expand-file-name root)))))

(defun peepopen-bind-keys ()
  (if (boundp 'aquamacs-version)
      (peepopen-bind-aquamacs-keys)
    (peepopen-bind-carbon-keys)))

(defun peepopen-bind-aquamacs-keys ()
  ;; Need `osx-key-mode-map' to override

(defun peepopen-bind-carbon-keys ()
  (define-key *textmate-mode-map* [(meta t)] 'peepopen-goto-file-gui))

(defun peepopen-bind-ns-keys ()
  (define-key *textmate-mode-map* [(super t)] 'peepopen-goto-file-gui))

;;;###autoload
(add-hook 'textmate-mode-hook 'peepopen-bind-keys)

(provide 'peepopen)
