                            (signal 'go-play-error (cdr arg)))
                           (t
                            (re-search-forward "\n\n")
-                           (kill-new (format "http://play.golang.org/p/%s" (buffer-substring (point) (point-max))))
-                           (message "http://play.golang.org/p/%s" (buffer-substring (point) (point-max)))))))))))
+                           (let ((url (format "http://play.golang.org/p/%s"
+                                              (buffer-substring (point) (point-max)))))
+                             (when go-play-browse-function
+                               (funcall go-play-browse-function url)))))))))))
 
 ;;;###autoload
 (defun go-download-play (url)

    ("\\.go\\'" ("_test.go")))
  "See the documentation of `ff-other-file-alist' for details."
  :type '(repeat (list regexp (choice (repeat string) function)))
  :group 'go)

(defcustom go-coverage-display-buffer-func 'display-buffer-reuse-window

  (go-play-region (point-min) (point-max)))

(defun go-play-region (start end)
  "Send the region to the Playground.
If non-nil `go-play-browse-function' is called with the
Playground URL."
  (interactive "r")
  (let* ((url-request-method "POST")
         (url-request-extra-headers
