Rather than define, why don't you advice the creation process. In
general, advice is nicer than redefining. It's also better to do
change something more specific -- pop-to-buffer is a very generic
function.
I think the guilty function is this one:
(defun nrepl-create-repl-buffer (process)
"Create a repl buffer for PROCESS."
(nrepl-init-repl-buffer
process
(let ((buffer-name (nrepl-repl-buffer-name)))
(pop-to-buffer buffer-name)
buffer-name)))
And this solves the problem -- or rather reverts the pop up!
(defadvice nrepl-create-repl-buffer
(after nrepl-create-advice activate)
(bury-buffer ad-return-value)
ad-return-value)
Phil