all repos — nixfiles @ 9e66b67149a19eb204fe9f3bb6e8f5981e0d6190

System and user configuration, managed by nix and home-manager

Emacs: improve startup speed
Alan Pearce alan@alanpearce.eu
Tue, 18 Feb 2020 16:01:12 +0100
commit

9e66b67149a19eb204fe9f3bb6e8f5981e0d6190

parent

d5b0b8e3c2d6b3ac13350c97e18b2fbb4f5fa275

1 files changed, 10 insertions(+), 10 deletions(-)

jump to
M user/emacs/.emacs.d/init.eluser/emacs/.emacs.d/init.el
@@ -2,9 +2,10 @@ ;;; init --- user init file (setq inhibit-startup-echo-area-message "alan")
 (setq inhibit-startup-screen t
       initial-scratch-message ""
-      initial-major-mode 'text-mode
+      initial-major-mode 'fundamental-mode
       package-enable-at-startup nil
-      evil-want-keybinding nil)
+      evil-want-keybinding nil
+      frame-inhibit-implied-resize t)
 
 (package-initialize)
 
@@ -211,7 +212,7 @@ (bury-buffer))      "Save and bury buffer" :color blue)
     ("q" nil "cancel" :color blue))
   :hook (magit-diff-visit-file . (lambda ()
-                                   (when smerge-mode
+                                   (when (bound-and-true-p smerge-mode)
                                      (unpackaged/smerge-hydra/body)))))
 
 (use-package swiper
@@ -617,7 +618,7 @@ (use-package eshell-toggle
   :after projectile
   :commands (eshell-toggle)
-  :general ("C-`" . eshell-toggle)
+  :general ("C-`" #'eshell-toggle)
   :config (setq eshell-toggle-use-projectile-root t))
 
 (use-package esh-autosuggest
@@ -706,12 +707,11 @@ (general-add-hook 'after-save-hook                                       #'executable-make-buffer-file-executable-if-script-p :append :local)))
 
 (add-to-list 'auto-mode-alist '("\\.env\\'" . conf-unix-mode))
-(use-package sh-script
-  :mode (("\\.zsh\\'" . shell-script-mode)
-         ("zshenv\\'" . shell-script-mode)
-         ("zshrc\\'"  . shell-script-mode))
-  :config (setq sh-shell-file "/usr/bin/env zsh"
-                sh-basic-offset 2))
+(add-to-list 'auto-mode-alist '("\\.zsh\\'" . shell-script-mode))
+(add-to-list 'auto-mode-alist '("zshenv\\'" . shell-script-mode))
+(add-to-list 'auto-mode-alist '("zshrc\\'"  . shell-script-mode))
+(setq sh-shell-file "/usr/bin/env zsh"
+      sh-basic-offset 2)
 
 (add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)