The specific code to open files from the command line is in startup.el
. The function is command-line-1
and it calls find-file-other-window
(in two different places).
You should be able to do something like this in your .emacs, but I'm not sure about the details:
(defadvice find-file-other-window (before split (file &optional wildcards))
(if <during command line processing>
(split-window-horizontally)))
(ad-activate 'find-file-other-window)