Move bootstrap into init-packages.el

This commit is contained in:
Henrik Lissner 2016-01-27 20:42:11 -05:00
parent 15277fb395
commit d5115262b7
4 changed files with 105 additions and 117 deletions

View file

@ -142,24 +142,5 @@
(IS-LINUX 'core-os-linux)
(IS-WINDOWS 'core-os-win32)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun narf-init ()
(setq-default
gc-cons-threshold 8388608
gc-cons-percentage 0.3)
(defadvice save-buffers-kill-emacs (around no-query-kill-emacs activate)
"Prevent annoying \"Active processes exist\" query when you quit Emacs."
(cl-flet ((process-list ())) ad-do-it))
(defun display-startup-echo-area-message ()
(after! workgroups2
(message "%sLoaded in %s" (narf/tab-display t t) (emacs-init-time))))
(require 'server)
(unless (server-running-p)
(server-start)))
(provide 'core)
;;; core.el ends here

View file

@ -11,17 +11,9 @@
(defconst narf-theme 'narf-light)
(defconst narf-default-font (font-spec :family "Hack" :size 14))
(defconst narf-writing-font (font-spec :family "Deja Sans" :size 14))
(set-frame-font narf-default-font)
(let (file-name-handler-alist
(gc-cons-threshold 169715200))
(tool-bar-mode -1) ; no toolbar
(load (concat user-emacs-directory "init-packages.el"))
(load-theme narf-theme t)
(mapc 'require
`(core ; core/core.el
(defconst narf-packages
'(core ; core/core.el
core-popup ; taming stray windows
core-ui ; draw me like one of your French editors
@ -53,7 +45,8 @@
my-bindings
my-commands
))
(narf-init))
(load (concat user-emacs-directory "init-packages.el"))
(setq wg-session-file (expand-file-name "wg-org-default" narf-temp-dir))
(cd org-directory)

View file

@ -3,7 +3,9 @@
(setq-default
;; stop package.el from being annoying. NARF relies entirely on Cask.
package--init-file-ensured t
package-enable-at-startup nil)
package-enable-at-startup nil
gc-cons-threshold 8388608
gc-cons-percentage 0.3)
(eval-and-compile
(defconst narf-emacs-dir user-emacs-directory)
@ -55,9 +57,28 @@
(--subdirs narf-packages-dir)
load-path))))
;;;;;;;;;;;;;;;;
;; Load local settings, if available
(when (file-exists-p "~/.emacs.local.el")
(load "~/.emacs.local.el"))
;; prematurely optimize for faster startup
(let (file-name-handler-alist
(gc-cons-threshold 169715200))
(scroll-bar-mode -1) ; no scrollbar
(tool-bar-mode -1) ; no toolbar
(load-theme narf-theme t)
(mapc 'require narf-packages))
(defadvice save-buffers-kill-emacs (around no-query-kill-emacs activate)
"Prevent annoying \"Active processes exist\" query when you quit Emacs."
(cl-flet ((process-list ())) ad-do-it))
(defun display-startup-echo-area-message ()
(after! workgroups2
(message "%sLoaded in %s" (narf/tab-display t t) (emacs-init-time))))
(require 'server)
(unless (server-running-p)
(server-start))
;;; init-packages.el ends here

25
init.el
View file

@ -47,17 +47,8 @@
(defconst narf-writing-font (font-spec :family "Hack" :size 14))
(defconst narf-big-font (font-spec :family "Inconsolata" :size 20))
;; prematurely optimize for faster startup
(let (file-name-handler-alist
(gc-cons-threshold 169715200))
(scroll-bar-mode -1) ; no scrollbar
(tool-bar-mode -1) ; no toolbar
(load (concat user-emacs-directory "init-packages.el"))
(load-theme narf-theme t)
(mapc 'require
`(core ; core/core.el
(defconst narf-packages
'(core ; core/core.el
;;; The heart of NARF
core-popup ; taming stray windows
@ -84,10 +75,9 @@
module-lisp ; drowning in parentheses
module-lua ; one-based indices? one-based indices.
module-markdown ; markdown
module-nim ; look out Abraham
module-org ; for fearless [organized] leader
;; module-org ; for fearless [organized] leader
module-php ; making php less painful to work with
module-plantuml ; to help show how right I am
module-plantuml ; to help show others how right I am
module-python ; beautiful is better than ugly
module-regex ; /^[^\s](meaning)[^\n]*/
module-ruby ; <3
@ -96,9 +86,12 @@
module-swift ; yay, emoji variables!
module-vim ; my mistress
module-web ; for the 2.0'er
;;; Experimental
;; module-crystal ; ruby at the speed of c
;; module-eshell ; for inferior OSes *cough*windows
;; module-nim ; look out Abraham
;; module-pony ; Dear Princess Compiler
;;; Specific custom functionality
lib-plugin ; plugin dev for various programs
@ -110,8 +103,8 @@
;;; Key bindings & ex commands
my-bindings
my-commands
)))
))
(narf-init)
(load (concat user-emacs-directory "init-packages.el"))
;;; I think so Brain...