]> git.eshelyaron.com Git - emacs.git/commitdiff
Improve error messages regarding initial-buffer-choice (Bug#29098)
authorAlexander Gramiak <agrambot@gmail.com>
Wed, 1 Nov 2017 03:10:52 +0000 (21:10 -0600)
committerNoam Postavsky <npostavs@gmail.com>
Thu, 9 Aug 2018 12:12:07 +0000 (08:12 -0400)
* 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.

lisp/startup.el

index 33f8ca63f8dba08895b45fc995387c220ca98aa9..63b831ee38d1b6bbfa012ef0a28cca5967f54b02 100644 (file)
@@ -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