core: name startup-hook function and move spacemacs-buffer//startup-hook

This commit is contained in:
syl20bnr 2017-01-22 00:31:30 -05:00
parent a00179c13f
commit 333f762b36
2 changed files with 11 additions and 12 deletions

View File

@ -1031,17 +1031,15 @@ REFRESH if the buffer should be redrawn."
(erase-buffer)))
(spacemacs-buffer/set-mode-line "")
(spacemacs-buffer/insert-banner-and-buttons)
(if (bound-and-true-p spacemacs-initialized)
(progn
(spacemacs-buffer//notes-redisplay-current-note)
(configuration-layer/display-summary emacs-start-time)
(when dotspacemacs-startup-lists
(spacemacs-buffer/insert-startup-lists))
(spacemacs-buffer//insert-footer)
(spacemacs-buffer/set-mode-line spacemacs--default-mode-line)
(force-mode-line-update)
(spacemacs-buffer-mode))
(add-hook 'emacs-startup-hook 'spacemacs-buffer//startup-hook t))))
(when (bound-and-true-p spacemacs-initialized)
(spacemacs-buffer//notes-redisplay-current-note)
(configuration-layer/display-summary emacs-start-time)
(when dotspacemacs-startup-lists
(spacemacs-buffer/insert-startup-lists))
(spacemacs-buffer//insert-footer)
(spacemacs-buffer/set-mode-line spacemacs--default-mode-line)
(force-mode-line-update)
(spacemacs-buffer-mode))))
(if save-line
(progn (goto-char (point-min))
(forward-line (1- save-line))

View File

@ -184,7 +184,7 @@ defer call using `spacemacs-post-user-config-hook'."
"Add post init processing."
(add-hook
'emacs-startup-hook
(lambda ()
(defun spacemacs/startup-hook ()
;; This is set here so that emacsclient will show the startup buffer (and
;; so that it can be changed in user-config if necessary). It was set to
;; nil earlier in the startup process to properly handle command line
@ -202,6 +202,7 @@ defer call using `spacemacs-post-user-config-hook'."
(with-current-buffer "*scratch*"
(funcall dotspacemacs-scratch-mode)))
(configuration-layer/display-summary emacs-start-time)
(spacemacs-buffer//startup-hook)
(spacemacs/check-for-new-version nil spacemacs-version-check-interval)
(setq spacemacs-initialized t))))