From 158dee8be2c6c827ff1aef134d451089c4860e2a Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Fri, 10 Jun 2016 15:00:19 +0200 Subject: [PATCH] Use use-package to configure smex --- emacs/.emacs.d/init.el | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el index 79a6a39..e504188 100644 --- a/emacs/.emacs.d/init.el +++ b/emacs/.emacs.d/init.el @@ -24,8 +24,7 @@ (require 'eww) (require 'php-mode) (require 'projectile) - (require 'slime) - (require 'smex)) + (require 'slime)) (load (concat user-emacs-directory "init2")) @@ -348,9 +347,6 @@ MODE1 is enabled and vice-versa." (clisp ("clisp") :coding-system utf-8-unix)) slime-default-lisp 'sbcl)) -(stante-after smex - (setq smex-save-file "~/.emacs.d/smex-items")) - (stante-after "startup" (setq inhibit-default-init t) (setq inhibit-startup-message t) @@ -451,6 +447,15 @@ MODE1 is enabled and vice-versa." :config (setq slack-buffer-function 'switch-to-buffer)) +(use-package smex + :ensure t + :commands (smex-initialize) + :bind (("M-x" . smex) + ("C-M-x" . smex-major-mode-commands)) + :init (smex-initialize) + :config + (setq smex-save-file (concat user-emacs-directory "data/smex-items"))) + ;;;; Hooks ;; Automatically make shell scripts executable after saving. @@ -649,7 +654,6 @@ MODE1 is enabled and vice-versa." (global-set-key (kbd "C-M-SPC") 'er/expand-region) (global-set-key (kbd "C-M-d") 'kill-word) (global-set-key (kbd "C-M-w") 'backward-kill-word) -(global-set-key (kbd "C-M-x") 'smex-major-mode-commands) (global-set-key (kbd "C-M-z") 'oni:indent-defun) (global-set-key (kbd "C-S-k") 'kill-whole-line) (global-set-key (kbd "C-c +") 'oni:increase-number-at-point) @@ -715,7 +719,6 @@ MODE1 is enabled and vice-versa." (oni:eval-after-init (ido-ubiquitous-mode) - (smex-initialize) (global-diff-hl-mode) (desktop-registry-auto-register) (yas-global-mode)