Commit 96be6b6e authored by Alexander Gramiak's avatar Alexander Gramiak Committed by Noam Postavsky

Improve error messages regarding initial-buffer-choice (Bug#29098)

* lisp/startup.el (command-line-1) <initial-buffer-choice>: Make the
messages conform to Emacs conventions, and show the invalid return
value in the message.
parent 00fb1270
......@@ -2515,9 +2515,9 @@ nil default-directory" name)
((eq initial-buffer-choice t)
(get-buffer-create "*scratch*"))
(t
(error "initial-buffer-choice must be a string, a function, or t.")))))
(error "`initial-buffer-choice' must be a string, a function, or t")))))
(unless (buffer-live-p buf)
(error "initial-buffer-choice is not a live buffer."))
(error "Value returned by `initial-buffer-choice' is not a live buffer: %S" buf))
(setq displayable-buffers (cons buf displayable-buffers))))
;; Display the first two buffers in `displayable-buffers'. If
......
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