The following message is a courtesy copy of an article
that has been posted to comp.emacs.xemacs as well.
I am CCing this to xemacs-beta(a)xemacs.org, in case anybody there cares.
To recap for those folks, Javier is annoyed that starting XEmacs with
"xemacs *.c *.h" brings up a split window. He wants a single window to
start with.
On 30 May 2001 at 10:32:29 -0700, derethor(a)yahoo.com (Javier Loureiro
Varela) wrote:
both of them are the files... the last ones by alphabetical order.
It looks like this behavior is hardcoded into XEmacs. The function
command-line-1, which is defined in startup.el, processes the command
line arguments. The last thing it does is this:
(when file-p
(setq file-p nil)
(incf file-count)
(setq arg (expand-file-name arg dir))
(cond
((= file-count 1)
(find-file arg))
(noninteractive (find-file arg))
(t (find-file-other-window arg)))
So if you ask for more than one file on the command line, it uses
find-file-other-window to fetch all but the first. That function is
defined in files.el. It calls switch-to-buffer-other-window, which
binds the variable pop-up-windows to t before calling pop-to-buffer. So
binding pop-up-windows to nil on the command line won't work, since
switch-to-buffer-other-window will rebind it.
If the call to find-file-other-window was replaced with a call to
find-file-noselect, then you would get a single window, you would be
left looking at the *first* file specified on the command line instead
of the last one, and you wouldn't have to watch all of the files you
specified go flashing by as they load (which is especially annoying if
you use font-lock).
--
Jerry James