core: hide home buffer if a file is passed on the command line
Note that any non Emacsy command line parameter and non processed command line parameter (that is unknown from Spacemacs) will hide the home buffer. This should be good enough. Fixes #4057
This commit is contained in:
parent
76d8ff8621
commit
15c7ae5bdf
|
@ -10,9 +10,10 @@
|
|||
;;
|
||||
;;; License: GPLv3
|
||||
|
||||
;; process args
|
||||
(defun spacemacs//parse-command-line (args)
|
||||
"Process ARGS relevant to core-debug.el"
|
||||
"Handle Spacemacs specific command line arguments.
|
||||
The reason why we don't use the Emacs hooks for processing user defined
|
||||
arguments is that we want to process these arguments as soon as possible."
|
||||
(let ((i 0) new-args)
|
||||
(while (< i (length args))
|
||||
(let ((arg (nth i args))
|
||||
|
@ -43,4 +44,13 @@
|
|||
|
||||
(setq command-line-args (spacemacs//parse-command-line command-line-args))
|
||||
|
||||
(defun spacemacs//hide-home-buffer ()
|
||||
"Hides the Spacemacs home buffer at startup to not obfuscate the opened
|
||||
startup file.
|
||||
Note that any non Emacsy command line parameter will have the effect to
|
||||
hide the home buffer."
|
||||
(setq initial-buffer-choice nil))
|
||||
|
||||
(push 'spacemacs//hide-home-buffer command-line-functions)
|
||||
|
||||
(provide 'core-command-line)
|
||||
|
|
|
@ -86,6 +86,7 @@
|
|||
(spacemacs-buffer/warning "Cannot find font \"%s\"!"
|
||||
(car dotspacemacs-default-font))))
|
||||
;; spacemacs init
|
||||
(setq inhibit-startup-screen t)
|
||||
(spacemacs-buffer/goto-buffer)
|
||||
(unless (display-graphic-p)
|
||||
;; explicitly recreate the home buffer for the first GUI client
|
||||
|
|
Loading…
Reference in a new issue