 (defun peepopen-bind-carbon-keys ()
   (define-key *textmate-mode-map* [(meta t)] 'peepopen-goto-file-gui))
 
-(defun string-join (separator strings)
-  "Join all STRINGS using SEPARATOR."
-  (mapconcat 'identity strings separator))
+(defun peepopen-bind-ns-keys ()
+  (define-key *textmate-mode-map* [(super t)] 'peepopen-goto-file-gui))
 
-(peepopen-bind-keys)
+;;;###autoload
+(add-hook 'textmate-mode-hook 'peepopen-bind-keys)
 
 (provide 'peepopen)

;; (add-to-list 'load-path "~/.emacs.d/vendor/")
;; (require 'peepopen)

(defun peepopen-goto-file-gui ()
  "Uses external GUI app to quickly jump to a file in the project."
  (interactive)
  (let ((root (textmate-project-root)))
    (when (null root)
      (error

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

;;;###autoload
(defun peepopen-bind-keys ()
  (cond ((featurep 'aquamacs) (peepopen-bind-aquamacs-keys))
	((featurep 'mac-carbon) (peepopen-bind-carbon-keys))
	((featurep 'ns) (peepopen-bind-ns-keys))))

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