about summary refs log tree commit diff
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2019-03-11T23·04+0000
committerWilliam Carroll <wpcarro@gmail.com>2019-03-11T23·08+0000
commit44e46bbce2bd94ff6c9379152696619186ae248d (patch)
tree32154c9e80ad33008ecb2011c9b1158d5bd8236d
parenta5512fd7063908814376cb6689eb7dac8f284e76 (diff)
Fix Emacs installation
My Emacs installation would fail on new machines because:

* use-package
* evil
* paredit

use-package is needed to install everything else.

evil and paredit were required in functions.el and other places before they were
called like (use-package evil ...). This should improve things but not fix the
entire issue.
-rw-r--r--configs/shared/emacs/.emacs.d/wpc/casing.el3
-rw-r--r--configs/shared/emacs/.emacs.d/wpc/fs-functions.el4
-rw-r--r--configs/shared/emacs/.emacs.d/wpc/functions.el8
-rw-r--r--configs/shared/emacs/.emacs.d/wpc/macros.el5
-rw-r--r--configs/shared/emacs/.emacs.d/wpc/packages/wpc-package.el6
-rw-r--r--configs/shared/emacs/.emacs.d/wpc/string-functions.el3
6 files changed, 5 insertions, 24 deletions
diff --git a/configs/shared/emacs/.emacs.d/wpc/casing.el b/configs/shared/emacs/.emacs.d/wpc/casing.el
index 598833a9f6c5..9f8e8a231851 100644
--- a/configs/shared/emacs/.emacs.d/wpc/casing.el
+++ b/configs/shared/emacs/.emacs.d/wpc/casing.el
@@ -7,9 +7,6 @@
 
 ;;; Code:
 
-(require 's)
-(require 'dash)
-
 ;; todo - grab the string at point and replace it with the output of
 ;; each fn
 
diff --git a/configs/shared/emacs/.emacs.d/wpc/fs-functions.el b/configs/shared/emacs/.emacs.d/wpc/fs-functions.el
index 1ceacfaed2c7..9ca970c242c3 100644
--- a/configs/shared/emacs/.emacs.d/wpc/fs-functions.el
+++ b/configs/shared/emacs/.emacs.d/wpc/fs-functions.el
@@ -5,10 +5,6 @@
 ;; Hosts ergonomic functions for working with a filesystem.
 
 ;;; Code:
-
-(require 'dash)
-(require 'f)
-
 (defun ensure-file-path (path)
   "Ensure that a file and its directories in PATH exist.
 Will error for inputs with a trailing slash."
diff --git a/configs/shared/emacs/.emacs.d/wpc/functions.el b/configs/shared/emacs/.emacs.d/wpc/functions.el
index 1905449a615e..f734c13d9a4b 100644
--- a/configs/shared/emacs/.emacs.d/wpc/functions.el
+++ b/configs/shared/emacs/.emacs.d/wpc/functions.el
@@ -5,14 +5,6 @@
 ;; This file hopefully contains friendly APIs that making ELisp development more enjoyable.
 
 ;;; Code:
-(require 'evil)
-(require 'projectile)
-(require 'paredit)
-(require 'term)
-(require 'f)
-(require 'yasnippet)
-(require 'ido)
-
 (defun wpc/evil-window-vsplit-right ()
   (interactive)
   (evil-window-vsplit)
diff --git a/configs/shared/emacs/.emacs.d/wpc/macros.el b/configs/shared/emacs/.emacs.d/wpc/macros.el
index aedd6f5b3cb9..02d7501b224d 100644
--- a/configs/shared/emacs/.emacs.d/wpc/macros.el
+++ b/configs/shared/emacs/.emacs.d/wpc/macros.el
@@ -5,11 +5,6 @@
 ;; This file contains helpful variables that I use in my ELisp development.
 
 ;;; Code:
-
-(require 'dash)
-(require 's)
-(require 'string-functions)
-
 (defmacro xi (&rest FORMS)
   `(lambda ,(--filter (s-contains? (symbol-name it)
                                    (prin1-to-string FORMS))
diff --git a/configs/shared/emacs/.emacs.d/wpc/packages/wpc-package.el b/configs/shared/emacs/.emacs.d/wpc/packages/wpc-package.el
index 4713dffd8486..6f43330ecb1a 100644
--- a/configs/shared/emacs/.emacs.d/wpc/packages/wpc-package.el
+++ b/configs/shared/emacs/.emacs.d/wpc/packages/wpc-package.el
@@ -11,7 +11,11 @@
 (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
 (package-initialize)
 
-(require 'use-package)
+(unless (package-installed-p 'use-package)
+  (package-refresh-contents)
+  (package-install 'use-package))
+(eval-when-compile
+  (require 'use-package))
 (setq use-package-always-ensure t)
 (use-package general)
 
diff --git a/configs/shared/emacs/.emacs.d/wpc/string-functions.el b/configs/shared/emacs/.emacs.d/wpc/string-functions.el
index a7c4a39c6343..2ddd22b223c4 100644
--- a/configs/shared/emacs/.emacs.d/wpc/string-functions.el
+++ b/configs/shared/emacs/.emacs.d/wpc/string-functions.el
@@ -6,9 +6,6 @@
 
 ;;; Code:
 
-(require 'dash)
-(require 's)
-
 ;; Strings
 (defun string/hookify (x)
   "Append \"-hook\" to X."