Commit d3605ed7 authored by Samer Masterson's avatar Samer Masterson

Show files when `initial-buffer-choice' is non-nil

* startup.el (command-line-1): When Emacs is given a file as an
argument and `initial-buffer-choice' is non-nil, display both the file
and `initial-buffer-choice'.  For more than one file, show
`initial-buffer-choice' and *Buffer List*.  Refactor display-changing
commands out of the command line arg parser.
(initial-buffer-choice): Clarify docstring.
parent 5d75612f
......@@ -193,17 +193,23 @@ It processes any command-line options that were not handled earlier.
@item
It now exits if the option @code{--batch} was specified.
@item
If the @file{*scratch*} buffer exists and is empty, it inserts
@code{initial-scratch-message} into that buffer.
@item
If @code{initial-buffer-choice} is a string, it visits the file (or
directory) with that name. If it is a function, it calls the function
with no arguments and selects the buffer that it returns.
with no arguments and selects the buffer that it returns. If one file
is given as a command line argument, the file is opened alongside
@code{initial-buffer-choice}. If more than one file is given, the
@file{*Buffer List*} buffer is shown alongside
@code{initial-buffer-choice}.
@ignore
@c I do not think this should be mentioned. AFAICS it is just a dodge
@c around inhibit-startup-screen not being settable on a site-wide basis.
If it is @code{t}, it selects the @file{*scratch*} buffer.
@end ignore
If the @file{*scratch*} buffer exists and is empty, it inserts
@code{initial-scratch-message} into that buffer.
@c To make things nice and confusing, the next three items can be
@c called from two places. If displaying a startup screen, they are
......
......@@ -70,6 +70,14 @@ so if you want to use it, you can always take a copy from an older Emacs.
* Startup Changes in Emacs 25.1
+++
** When Emacs is given a file as a command line argument and
`initial-buffer-choice' is non-nil, display both the file and
`initial-buffer-choice'. When Emacs is given more than one file and
`initial-buffer-choice' is non-nil, show `initial-buffer-choice'
and *Buffer List*. This makes Emacs convenient to use from the
command line when `initial-buffer-choice' is non-nil.
* Changes in Emacs 25.1
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment