make heavier use of autogenerated autoloads and eval-after-load to
optimize the load time
This commit is contained in:
parent
5b2ef06840
commit
66bc6f0809
11 changed files with 83 additions and 2222 deletions
|
@ -32,11 +32,6 @@
|
|||
|
||||
;;; Code:
|
||||
|
||||
(autoload 'ack-and-a-half-same "ack-and-a-half" nil t)
|
||||
(autoload 'ack-and-a-half "ack-and-a-half" nil t)
|
||||
(autoload 'ack-and-a-half-find-file-same "ack-and-a-half" nil t)
|
||||
(autoload 'ack-and-a-half-find-file "ack-and-a-half" nil t)
|
||||
|
||||
;; create shorter aliases
|
||||
(defalias 'ack 'ack-and-a-half)
|
||||
(defalias 'ack-same 'ack-and-a-half-same)
|
||||
|
|
|
@ -35,16 +35,18 @@
|
|||
(require 'prelude-lisp)
|
||||
|
||||
;; To start SLIME in your Clojure project:
|
||||
;; 1. lein plugin install swank-clojure 1.3.1
|
||||
;; 1. lein plugin install swank-clojure 1.3.1 (or newer)
|
||||
;; 2. Invoke M-x clojure-jack-in from a project
|
||||
(require 'clojure-mode)
|
||||
|
||||
(eval-after-load 'clojure-mode
|
||||
'(progn
|
||||
(defun prelude-clojure-mode-defaults ()
|
||||
(run-hooks 'prelude-lisp-coding-hook))
|
||||
|
||||
(setq prelude-clojure-mode-hook 'prelude-clojure-mode-defaults)
|
||||
|
||||
(add-hook 'clojure-mode-hook (lambda () (run-hooks 'prelude-clojure-mode-hook)))
|
||||
(add-hook 'clojure-mode-hook (lambda ()
|
||||
(run-hooks 'prelude-clojure-mode-hook)))))
|
||||
|
||||
(provide 'prelude-clojure)
|
||||
|
||||
|
|
|
@ -32,8 +32,8 @@
|
|||
|
||||
;;; Code:
|
||||
|
||||
(require 'coffee-mode)
|
||||
|
||||
(eval-after-load 'coffee-mode
|
||||
'(progn
|
||||
(defun prelude-coffee-mode-defaults ()
|
||||
"coffee-mode-defaults"
|
||||
|
||||
|
@ -66,7 +66,8 @@
|
|||
|
||||
(setq prelude-coffee-mode-hook 'prelude-coffee-mode-defaults)
|
||||
|
||||
(add-hook 'coffee-mode-hook (lambda () (run-hooks 'prelude-coffee-mode-hook)))
|
||||
(add-hook 'coffee-mode-hook (lambda ()
|
||||
(run-hooks 'prelude-coffee-mode-hook)))))
|
||||
|
||||
(provide 'prelude-coffee)
|
||||
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
(eval-after-load 'css-mode
|
||||
'(progn
|
||||
(defun prelude-css-mode-defaults ()
|
||||
(setq css-indent-offset 2)
|
||||
(rainbow-mode +1))
|
||||
|
||||
(setq prelude-css-mode-hook 'prelude-css-mode-defaults)
|
||||
|
||||
(add-hook 'css-mode-hook (lambda () (run-hooks 'prelude-css-mode-hook)))
|
||||
(add-hook 'css-mode-hook (lambda () (run-hooks 'prelude-css-mode-hook)))))
|
||||
|
||||
(provide 'prelude-css)
|
||||
|
|
|
@ -32,15 +32,19 @@
|
|||
|
||||
;;; Code:
|
||||
|
||||
(eval-after-load 'haskell-mode
|
||||
'(progn
|
||||
(defun prelude-haskell-mode-defaults ()
|
||||
(run-hooks 'prelude-prog-mode-hook) ;; run manually; not derived from prog-mode
|
||||
;; run manually since haskell-mode is not derived from prog-mode
|
||||
(run-hooks 'prelude-prog-mode-hook)
|
||||
(subword-mode +1)
|
||||
(turn-on-haskell-doc-mode)
|
||||
(turn-on-haskell-indentation))
|
||||
|
||||
(setq prelude-haskell-mode-hook 'prelude-haskell-mode-defaults)
|
||||
|
||||
(add-hook 'haskell-mode-hook (lambda () (run-hooks 'prelude-haskell-mode-hook)))
|
||||
(add-hook 'haskell-mode-hook (lambda ()
|
||||
(run-hooks 'prelude-haskell-mode-hook)))))
|
||||
|
||||
(provide 'prelude-haskell)
|
||||
|
||||
|
|
|
@ -32,13 +32,15 @@
|
|||
|
||||
;;; Code:
|
||||
|
||||
(eval-after-load 'js-mode
|
||||
'(progn
|
||||
(defun prelude-js-mode-defaults ()
|
||||
;; electric-layout-mode doesn't play nice with js-mode
|
||||
(electric-layout-mode -1))
|
||||
|
||||
(setq prelude-js-mode-hook 'prelude-js-mode-defaults)
|
||||
|
||||
(add-hook 'js-mode-hook (lambda () (run-hooks 'prelude-js-mode-hook)))
|
||||
(add-hook 'js-mode-hook (lambda () (run-hooks 'prelude-js-mode-hook)))))
|
||||
|
||||
(provide 'prelude-js)
|
||||
|
||||
|
|
|
@ -32,11 +32,8 @@
|
|||
|
||||
;;; Code:
|
||||
|
||||
(autoload 'markdown-mode "markdown-mode.el"
|
||||
"Major mode for editing Markdown files" t)
|
||||
(setq auto-mode-alist
|
||||
(cons '("\\.markdown$" . markdown-mode)
|
||||
(cons '("\\.md$" . markdown-mode) auto-mode-alist)))
|
||||
(add-to-list 'auto-mode-alist '("\\.md$" . markdown-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.markdown$" . markdown-mode))
|
||||
|
||||
(provide 'prelude-markdown)
|
||||
|
||||
|
|
|
@ -32,13 +32,13 @@
|
|||
|
||||
;;; Code:
|
||||
|
||||
(require 'mediawiki)
|
||||
|
||||
(eval-after-load 'mediawiki
|
||||
'(progn
|
||||
(setq mediawiki-site-alist '(("Wikipedia" "http://en.wikipedia.org/w" "" "" "Main Page")
|
||||
("WikEmacs" "http://wikemacs.org/w/" "" "" "Main Page")))
|
||||
|
||||
;; Emacs users care more for WikEmacs than Wikipedia :-)
|
||||
(setq mediawiki-site-default "WikEmacs")
|
||||
(setq mediawiki-site-default "WikEmacs")))
|
||||
|
||||
(provide 'prelude-mediawiki)
|
||||
|
||||
|
|
|
@ -43,8 +43,8 @@
|
|||
|
||||
(defvar prelude-packages
|
||||
'(ack-and-a-half auctex clojure-mode coffee-mode deft expand-region
|
||||
gist haml-mode haskell-mode helm helm-projectile inf-ruby
|
||||
magit magithub markdown-mode paredit projectile
|
||||
gist groovy-mode haml-mode haskell-mode helm helm-projectile inf-ruby
|
||||
magit magithub markdown-mode mediawiki paredit projectile
|
||||
python sass-mode rainbow-mode scss-mode solarized-theme
|
||||
volatile-highlights yaml-mode yari yasnippet zenburn-theme)
|
||||
"A list of packages to ensure are installed at launch.")
|
||||
|
|
|
@ -47,7 +47,11 @@
|
|||
"Run an inferior Ruby process")
|
||||
(autoload 'inf-ruby-keys "inf-ruby"
|
||||
"Set local key defs for inf-ruby in ruby-mode")
|
||||
(autoload 'ruby-block-mode "ruby-block")
|
||||
(require 'ruby-end)
|
||||
|
||||
(eval-after-load 'ruby-mode
|
||||
'(progn
|
||||
(defun prelude-ruby-mode-defaults ()
|
||||
(inf-ruby-setup-keybindings)
|
||||
;; turn off the annoying input echo in irb
|
||||
|
@ -58,8 +62,8 @@
|
|||
|
||||
(setq prelude-ruby-mode-hook 'prelude-ruby-mode-defaults)
|
||||
|
||||
(add-hook 'ruby-mode-hook (lambda () (run-hooks 'prelude-ruby-mode-hook)))
|
||||
|
||||
(add-hook 'ruby-mode-hook (lambda ()
|
||||
(run-hooks 'prelude-ruby-mode-hook)))))
|
||||
(provide 'prelude-ruby)
|
||||
|
||||
;;; prelude-ruby.el ends here
|
||||
|
|
2146
vendor/mediawiki.el
vendored
2146
vendor/mediawiki.el
vendored
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue