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:
|
;;; 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
|
;; create shorter aliases
|
||||||
(defalias 'ack 'ack-and-a-half)
|
(defalias 'ack 'ack-and-a-half)
|
||||||
(defalias 'ack-same 'ack-and-a-half-same)
|
(defalias 'ack-same 'ack-and-a-half-same)
|
||||||
|
|
|
@ -35,16 +35,18 @@
|
||||||
(require 'prelude-lisp)
|
(require 'prelude-lisp)
|
||||||
|
|
||||||
;; To start SLIME in your Clojure project:
|
;; 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
|
;; 2. Invoke M-x clojure-jack-in from a project
|
||||||
(require 'clojure-mode)
|
|
||||||
|
|
||||||
|
(eval-after-load 'clojure-mode
|
||||||
|
'(progn
|
||||||
(defun prelude-clojure-mode-defaults ()
|
(defun prelude-clojure-mode-defaults ()
|
||||||
(run-hooks 'prelude-lisp-coding-hook))
|
(run-hooks 'prelude-lisp-coding-hook))
|
||||||
|
|
||||||
(setq prelude-clojure-mode-hook 'prelude-clojure-mode-defaults)
|
(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)
|
(provide 'prelude-clojure)
|
||||||
|
|
||||||
|
|
|
@ -32,8 +32,8 @@
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(require 'coffee-mode)
|
(eval-after-load 'coffee-mode
|
||||||
|
'(progn
|
||||||
(defun prelude-coffee-mode-defaults ()
|
(defun prelude-coffee-mode-defaults ()
|
||||||
"coffee-mode-defaults"
|
"coffee-mode-defaults"
|
||||||
|
|
||||||
|
@ -66,7 +66,8 @@
|
||||||
|
|
||||||
(setq prelude-coffee-mode-hook 'prelude-coffee-mode-defaults)
|
(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)
|
(provide 'prelude-coffee)
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
|
(eval-after-load 'css-mode
|
||||||
|
'(progn
|
||||||
(defun prelude-css-mode-defaults ()
|
(defun prelude-css-mode-defaults ()
|
||||||
(setq css-indent-offset 2)
|
(setq css-indent-offset 2)
|
||||||
(rainbow-mode +1))
|
(rainbow-mode +1))
|
||||||
|
|
||||||
(setq prelude-css-mode-hook 'prelude-css-mode-defaults)
|
(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)
|
(provide 'prelude-css)
|
||||||
|
|
|
@ -32,15 +32,19 @@
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
|
(eval-after-load 'haskell-mode
|
||||||
|
'(progn
|
||||||
(defun prelude-haskell-mode-defaults ()
|
(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)
|
(subword-mode +1)
|
||||||
(turn-on-haskell-doc-mode)
|
(turn-on-haskell-doc-mode)
|
||||||
(turn-on-haskell-indentation))
|
(turn-on-haskell-indentation))
|
||||||
|
|
||||||
(setq prelude-haskell-mode-hook 'prelude-haskell-mode-defaults)
|
(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)
|
(provide 'prelude-haskell)
|
||||||
|
|
||||||
|
|
|
@ -32,13 +32,15 @@
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
|
(eval-after-load 'js-mode
|
||||||
|
'(progn
|
||||||
(defun prelude-js-mode-defaults ()
|
(defun prelude-js-mode-defaults ()
|
||||||
;; electric-layout-mode doesn't play nice with js-mode
|
;; electric-layout-mode doesn't play nice with js-mode
|
||||||
(electric-layout-mode -1))
|
(electric-layout-mode -1))
|
||||||
|
|
||||||
(setq prelude-js-mode-hook 'prelude-js-mode-defaults)
|
(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)
|
(provide 'prelude-js)
|
||||||
|
|
||||||
|
|
|
@ -32,11 +32,8 @@
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(autoload 'markdown-mode "markdown-mode.el"
|
(add-to-list 'auto-mode-alist '("\\.md$" . markdown-mode))
|
||||||
"Major mode for editing Markdown files" t)
|
(add-to-list 'auto-mode-alist '("\\.markdown$" . markdown-mode))
|
||||||
(setq auto-mode-alist
|
|
||||||
(cons '("\\.markdown$" . markdown-mode)
|
|
||||||
(cons '("\\.md$" . markdown-mode) auto-mode-alist)))
|
|
||||||
|
|
||||||
(provide 'prelude-markdown)
|
(provide 'prelude-markdown)
|
||||||
|
|
||||||
|
|
|
@ -32,13 +32,13 @@
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(require 'mediawiki)
|
(eval-after-load 'mediawiki
|
||||||
|
'(progn
|
||||||
(setq mediawiki-site-alist '(("Wikipedia" "http://en.wikipedia.org/w" "" "" "Main Page")
|
(setq mediawiki-site-alist '(("Wikipedia" "http://en.wikipedia.org/w" "" "" "Main Page")
|
||||||
("WikEmacs" "http://wikemacs.org/w/" "" "" "Main Page")))
|
("WikEmacs" "http://wikemacs.org/w/" "" "" "Main Page")))
|
||||||
|
|
||||||
;; Emacs users care more for WikEmacs than Wikipedia :-)
|
;; Emacs users care more for WikEmacs than Wikipedia :-)
|
||||||
(setq mediawiki-site-default "WikEmacs")
|
(setq mediawiki-site-default "WikEmacs")))
|
||||||
|
|
||||||
(provide 'prelude-mediawiki)
|
(provide 'prelude-mediawiki)
|
||||||
|
|
||||||
|
|
|
@ -43,8 +43,8 @@
|
||||||
|
|
||||||
(defvar prelude-packages
|
(defvar prelude-packages
|
||||||
'(ack-and-a-half auctex clojure-mode coffee-mode deft expand-region
|
'(ack-and-a-half auctex clojure-mode coffee-mode deft expand-region
|
||||||
gist haml-mode haskell-mode helm helm-projectile inf-ruby
|
gist groovy-mode haml-mode haskell-mode helm helm-projectile inf-ruby
|
||||||
magit magithub markdown-mode paredit projectile
|
magit magithub markdown-mode mediawiki paredit projectile
|
||||||
python sass-mode rainbow-mode scss-mode solarized-theme
|
python sass-mode rainbow-mode scss-mode solarized-theme
|
||||||
volatile-highlights yaml-mode yari yasnippet zenburn-theme)
|
volatile-highlights yaml-mode yari yasnippet zenburn-theme)
|
||||||
"A list of packages to ensure are installed at launch.")
|
"A list of packages to ensure are installed at launch.")
|
||||||
|
|
|
@ -47,7 +47,11 @@
|
||||||
"Run an inferior Ruby process")
|
"Run an inferior Ruby process")
|
||||||
(autoload 'inf-ruby-keys "inf-ruby"
|
(autoload 'inf-ruby-keys "inf-ruby"
|
||||||
"Set local key defs for inf-ruby in ruby-mode")
|
"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 ()
|
(defun prelude-ruby-mode-defaults ()
|
||||||
(inf-ruby-setup-keybindings)
|
(inf-ruby-setup-keybindings)
|
||||||
;; turn off the annoying input echo in irb
|
;; turn off the annoying input echo in irb
|
||||||
|
@ -58,8 +62,8 @@
|
||||||
|
|
||||||
(setq prelude-ruby-mode-hook 'prelude-ruby-mode-defaults)
|
(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)
|
(provide 'prelude-ruby)
|
||||||
|
|
||||||
;;; prelude-ruby.el ends here
|
;;; 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