Skip to content

Commit

Permalink
Make scratch buffer major mode configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBB committed Jan 5, 2016
1 parent de17125 commit 19f88da
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/core-dotspacemacs.el
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ banner, `random' chooses a random text banner in `core/banners'
directory. A string value must be a path to a .PNG file.
If the value is nil then no banner is displayed.")

(defvar dotspacemacs-scratch-mode 'text-mode
"Default major mode of the scratch buffer.")

(defvar dotspacemacs-check-for-update t
"If non nil then spacemacs will check for updates at startup
when the current branch is not `develop'")
Expand Down
3 changes: 3 additions & 0 deletions core/core-spacemacs.el
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@
"`dotspacemacs/user-config'"))
(dotspacemacs|call-func dotspacemacs/config
"Calling dotfile user config..."))
(when (fboundp dotspacemacs-scratch-mode)
(with-current-buffer "*scratch*"
(funcall dotspacemacs-scratch-mode)))
;; from jwiegley
;; https://github.com/jwiegley/dot-emacs/blob/master/init.el
(let ((elapsed (float-time
Expand Down
2 changes: 2 additions & 0 deletions core/templates/.spacemacs.template
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ values."
;; Number of recent files to show in the startup buffer. Ignored if
;; `dotspacemacs-startup-lists' doesn't include `recents'. (default 5)
dotspacemacs-startup-recent-list-size 5
;; Default major mode of the scratch buffer (default `text-mode')
dotspacemacs-scratch-mode 'text-mode
;; List of themes, the first of the list is loaded when spacemacs starts.
;; Press <SPC> T n to cycle to the next theme in the list (works great
;; with 2 themes variants, one dark and one light)
Expand Down

0 comments on commit 19f88da

Please sign in to comment.