all repos — nixfiles @ 99794c9d0f3bceeb4c8e5ffc6ded49051bc0c999

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

Emacs: Fix :ensure-ing of non-packages
Alan Pearce alan.pearce@spotcap.com
Sun, 29 Nov 2015 21:00:46 +0100
commit

99794c9d0f3bceeb4c8e5ffc6ded49051bc0c999

parent

47b52b5cfbffe149fd7e73e7c47d2a07885a0273

1 files changed, 18 insertions(+), 2 deletions(-)

jump to
M tag-emacs/emacs.d/init.orgtag-emacs/emacs.d/init.org
@@ -41,8 +41,11 @@ package-user-dir (concat "~/.emacs.d/packages/" emacs-version "/elpa"))     (package-initialize)
     (unless (package-installed-p 'use-package)
       (package-refresh-contents)
-      (package-install 'use-package))
-    (require 'use-package))
+      (package-install 'use-package)))
+  (eval-when-compile (require 'use-package))
+  (unless (featurep 'use-package)
+    (require 'diminish)
+    (require 'bind-key))
   (setq use-package-verbose t
         use-package-always-ensure t)
   (use-package benchmark-init
@@ -507,6 +510,7 @@ (add-to-list 'tramp-default-proxies-alist '("localhost" nil nil))               (add-to-list 'tramp-default-proxies-alist '("router" nil nil))))
 
   (use-package tramp-sh
+    :ensure nil
     :defer t
     :config (progn
               (add-to-list 'tramp-remote-path "/usr/local/sbin")
@@ -880,6 +884,7 @@ #+BEGIN_SRC emacs-lisp
 (use-package dired
   :defer 3
+  :ensure nil
   :config (progn
             (bind-key "<return>" #'dired-find-file dired-mode-map)
             (bind-key "^" (lambda () (interactive) (find-alternate-file "..")) dired-mode-map)
@@ -916,6 +921,7 @@   (use-package dired-x
     :commands (dired-omit-mode
                dired-expunge)
+    :ensure nil
     :config (progn
               (setq dired-omit-files "#\\|\\.$"
                     dired-omit-verbose nil
@@ -1104,6 +1110,7 @@ " nil t)         (replace-match ""))))
 
   (use-package rect
+    :ensure nil
     :init (defun copy-rectangle (start end)
             "Copy the region-rectangle."
             (interactive "r")
@@ -1373,6 +1380,7 @@ Some modes that I don’t really customise much, mostly for configuration files.
 #+BEGIN_SRC emacs-lisp
   (use-package xrdb-mode
+    :ensure nil
     :mode (("\\.Xdefaults\\'" . xrdb-mode)
            ("\\.Xresources\\'" . xrdb-mode)))
 
@@ -1532,6 +1540,7 @@ #+BEGIN_SRC emacs-lisp
 (use-package org-babel
   :defer t
+  :ensure nil
   :config (org-babel-do-load-languages
            'org-babel-load-languages
            '((ledger . t)
@@ -1560,6 +1569,7 @@ ***** TODO Setup org-mobile #+BEGIN_SRC emacs-lisp
   (use-package org-mobile
     :defer 30
+    :ensure nil
     :config (progn
               (setq org-mobile-directory "~/Mobile/Org"
                     org-mobile-inbox-for-pull "~/Mobile/Org/from-mobile.org")
@@ -1716,6 +1726,7 @@ #+BEGIN_SRC emacs-lisp
 (use-package ielm
   :defer t
+  :ensure nil
   :config (progn
             (add-hook 'ielm-mode-hook (lambda ()
                                         (run-hooks 'lisp-mode-common-hook)))))
@@ -2062,6 +2073,7 @@ (add-hook 'eshell-load-hook (lambda ()                                             (bind-key "C-c C-l" #'helm-eshell-history eshell-mode-map)))))
 
   (use-package em-smart
+    :ensure nil
     :commands eshell-smart-initialize
     :init (progn
             (add-hook 'eshell-load-hook #'eshell-smart-initialize))
@@ -2095,11 +2107,13 @@ #+BEGIN_SRC emacs-lisp
   (use-package shell
     :defer t
+    :ensure nil
     :config (define-key shell-mode-map
               (kbd "C-d") 'comint-delchar-or-eof-or-kill-buffer))
 
   (use-package comint
     :defer t
+    :ensure nil
     :config (bind-key "C-c C-l" #'helm-comint-input-ring comint-mode-map))
 
   (defun comint-delchar-or-eof-or-kill-buffer (arg)
@@ -2128,6 +2142,7 @@ #+BEGIN_SRC emacs-lisp
   (use-package align
     :defer 10
+    :ensure nil
     :config (progn
               (add-to-list 'align-rules-list
                            '(colon-key-value
@@ -2188,6 +2203,7 @@ =zap-to-char=. 
 #+BEGIN_SRC emacs-lisp
 (use-package misc
+  :ensure nil
   :bind (("M-z" . zap-up-to-char)
          ("M-Z" . zap-to-char)))
 #+END_SRC