Commits

Anonymous committed baf67dd

Smex is now an elpa package. Use use-package to initialize

Comments (0)

Files changed (3)

     parenface
     php-mode
     rainbow-mode
+    smex
     undo-tree
     w32-browser)
   "A list of packages to ensure are installed at launch.")
-(defun smex-update-after-load (unused)
-  (when (boundp 'smex-cache)
-    (smex-update)))
-(add-hook 'after-load-functions 'smex-update-after-load)
+(use-package smex
+  :init
+  (progn
+    (bind-key "M-x" 'beautify-smex)
+    (bind-key "M-X" 'smex-major-mode-commands)
+    ;; This is your old M-x.
+    (bind-key "C-c C-c M-x" 'execute-extended-command)
 
-(defun beautify-smex ()
-  (interactive)
-  (unwind-protect (progn (setq ido-decorations '( "{" "}" " | " " | ..." "[" "]" " [No match]" " [Matched]" " [Not readable]" " [Too big]" " [Confirm]"))
-                         (smex))
-    (setq ido-decorations (quote ("\n-> " "" "\n   " "\n   ..." "[" "]" " [No match]" " [Matched]" " [Not readable]" " [Too big]" " [Confirm]")))))
-
-(bind-key "M-x" 'beautify-smex)
-(bind-key "M-X" 'smex-major-mode-commands)
-;; This is your old M-x.
-(bind-key "C-c C-c M-x" 'execute-extended-command)
+    (defun beautify-smex ()
+      (interactive)
+      (unwind-protect
+          (progn
+            (setq ido-decorations
+                  '("{" "}" " | " " | ..." "[" "]" " [No match]" " [Matched]" " [Not readable]" " [Too big]" " [Confirm]"))
+            (smex))
+        (setq ido-decorations
+              '("\n-> " "" "\n   " "\n   ..." "[" "]" " [No match]" " [Matched]" " [Not readable]" " [Too big]" " [Confirm]")))))
+  :config
+  (progn
+    (defun smex-update-after-load (unused)
+      (when (boundp 'smex-cache)
+        (smex-update)))
+    (add-hook 'after-load-functions 'smex-update-after-load)))
 (load "files/multi-web-mode")
 (load "files/latex-mode")
 (load "files/mode-line")
+(load "files/smex")
 
 ;; vendor
-(vendor 'smex)
 (vendor 'yasnippet)
 (vendor 'typopunct 'typopunct-change-language 'typopunct-mode)
 (vendor 'wc-mode)