Emacs: Move post-startup de-optimisation code to top of file
Alan Pearce alan@alanpearce.eu
Fri, 04 Aug 2017 10:17:36 +0200
2 files changed, 12 insertions(+), 11 deletions(-)
M emacs/.emacs.d/init.el → emacs/.emacs.d/init.el
@@ -17,6 +17,10 @@ (setq inhibit-startup-screen t) (setq gc-cons-threshold 100000000) (defvar file-name-handler-alist-backup file-name-handler-alist) (setq file-name-handler-alist nil) +(add-hook 'after-init-hook + #'(lambda () + (setq gc-cons-threshold 800000 + file-name-handler-alist file-name-handler-alist-backup))) (remove-hook 'find-file-hooks #'vc-refresh-state) ;; #+END_SRC @@ -2822,8 +2826,6 @@ :defer 2 :if (not (daemonp)) :config (unless (server-running-p server-name) (server-start))) -(setq gc-cons-threshold 800000 - file-name-handler-alist file-name-handler-alist-backup) ;; #+END_SRC ;; Local Variables:
M emacs/.emacs.d/init.org → emacs/.emacs.d/init.org
@@ -17,6 +17,10 @@ (setq inhibit-startup-screen t) (setq gc-cons-threshold 100000000) (defvar file-name-handler-alist-backup file-name-handler-alist) (setq file-name-handler-alist nil) +(add-hook 'after-init-hook + #'(lambda () + (setq gc-cons-threshold 800000 + file-name-handler-alist file-name-handler-alist-backup))) (remove-hook 'find-file-hooks #'vc-refresh-state) #+END_SRC @@ -604,7 +608,7 @@ ("s-G" . projectile-vc)) :demand t :diminish projectile-mode :config (progn - (projectile-mode -1) + (projectile-mode +1) (add-to-list 'projectile-globally-ignored-directories ".stversions") (defun yarn-install (&optional arg) @@ -1706,6 +1710,7 @@ #+BEGIN_SRC emacs-lisp (use-package ledger-mode :mode ("\\.ledger\\'" . ledger-mode) + :functions ledger-report :init (progn (defun open-budget () (interactive) @@ -2169,15 +2174,11 @@ #+BEGIN_SRC emacs-lisp (use-package js2-mode :mode (("\\.js\\'" . js2-mode)) :interpreter ("node" . js2-mode) - :functions js2-next-error + :functions (js2-next-error + js2--struct-put) :config (progn (define-key js2-mode-map [menu-bar Javascript] nil) - (defun js2--imenu-around (do-it name) - "Don't create a menu from js2-mode" - (if (not (string-equal name "IM-Javascript-IDE")) - (do-it name))) (add-hook 'js2-mode-hook #'js2-imenu-extras-mode) - (advice-add 'imenu-add-to-menubar :around #'js2--imenu-around) (defun ap/js2-prev-error () (interactive) (js2-next-error -1)) @@ -2825,8 +2826,6 @@ :defer 2 :if (not (daemonp)) :config (unless (server-running-p server-name) (server-start))) -(setq gc-cons-threshold 800000 - file-name-handler-alist file-name-handler-alist-backup) #+END_SRC Local Variables: