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)
|
||||
|
||||
(defun prelude-clojure-mode-defaults ()
|
||||
(run-hooks 'prelude-lisp-coding-hook))
|
||||
(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)
|
||||
(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,41 +32,42 @@
|
|||
|
||||
;;; Code:
|
||||
|
||||
(require 'coffee-mode)
|
||||
(eval-after-load 'coffee-mode
|
||||
'(progn
|
||||
(defun prelude-coffee-mode-defaults ()
|
||||
"coffee-mode-defaults"
|
||||
|
||||
(defun prelude-coffee-mode-defaults ()
|
||||
"coffee-mode-defaults"
|
||||
;; CoffeeScript uses two spaces.
|
||||
(set (make-local-variable 'tab-width) 2)
|
||||
|
||||
;; CoffeeScript uses two spaces.
|
||||
(set (make-local-variable 'tab-width) 2)
|
||||
;; If you don't have js2-mode
|
||||
(setq coffee-js-mode 'javascript-mode)
|
||||
|
||||
;; If you don't have js2-mode
|
||||
(setq coffee-js-mode 'javascript-mode)
|
||||
;; If you don't want your compiled files to be wrapped
|
||||
(setq coffee-args-compile '("-c" "--bare"))
|
||||
|
||||
;; If you don't want your compiled files to be wrapped
|
||||
(setq coffee-args-compile '("-c" "--bare"))
|
||||
;; *Messages* spam
|
||||
(setq coffee-debug-mode t)
|
||||
|
||||
;; *Messages* spam
|
||||
(setq coffee-debug-mode t)
|
||||
;; electric-indent doesn't play nice with coffee-mode's "smart"
|
||||
;; indent
|
||||
(electric-indent-mode -1)
|
||||
|
||||
;; electric-indent doesn't play nice with coffee-mode's "smart"
|
||||
;; indent
|
||||
(electric-indent-mode -1)
|
||||
;; Emacs key binding
|
||||
(define-key coffee-mode-map [(meta r)] 'coffee-compile-buffer)
|
||||
|
||||
;; Emacs key binding
|
||||
(define-key coffee-mode-map [(meta r)] 'coffee-compile-buffer)
|
||||
;; Riding edge.
|
||||
(setq coffee-command "~/dev/coffee")
|
||||
|
||||
;; Riding edge.
|
||||
(setq coffee-command "~/dev/coffee")
|
||||
;; Compile '.coffee' files on every save
|
||||
(and (file-exists-p (buffer-file-name))
|
||||
(file-exists-p (coffee-compiled-file-name))
|
||||
(coffee-cos-mode t)))
|
||||
|
||||
;; Compile '.coffee' files on every save
|
||||
(and (file-exists-p (buffer-file-name))
|
||||
(file-exists-p (coffee-compiled-file-name))
|
||||
(coffee-cos-mode t)))
|
||||
(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)
|
||||
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
(defun prelude-css-mode-defaults ()
|
||||
(setq css-indent-offset 2)
|
||||
(rainbow-mode +1))
|
||||
(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)
|
||||
(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:
|
||||
|
||||
(defun prelude-haskell-mode-defaults ()
|
||||
(run-hooks 'prelude-prog-mode-hook) ;; run manually; not derived from prog-mode
|
||||
(subword-mode +1)
|
||||
(turn-on-haskell-doc-mode)
|
||||
(turn-on-haskell-indentation))
|
||||
(eval-after-load 'haskell-mode
|
||||
'(progn
|
||||
(defun prelude-haskell-mode-defaults ()
|
||||
;; 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)
|
||||
(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:
|
||||
|
||||
(defun prelude-js-mode-defaults ()
|
||||
;; electric-layout-mode doesn't play nice with js-mode
|
||||
(electric-layout-mode -1))
|
||||
(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)
|
||||
(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")))
|
||||
|
||||
(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")
|
||||
;; Emacs users care more for WikEmacs than Wikipedia :-)
|
||||
(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,19 +47,23 @@
|
|||
"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)
|
||||
|
||||
(defun prelude-ruby-mode-defaults ()
|
||||
(inf-ruby-setup-keybindings)
|
||||
;; turn off the annoying input echo in irb
|
||||
(setq comint-process-echoes t)
|
||||
(ruby-block-mode t)
|
||||
;; bind yari in the local keymap
|
||||
(local-set-key (kbd "C-h r") 'yari))
|
||||
(eval-after-load 'ruby-mode
|
||||
'(progn
|
||||
(defun prelude-ruby-mode-defaults ()
|
||||
(inf-ruby-setup-keybindings)
|
||||
;; turn off the annoying input echo in irb
|
||||
(setq comint-process-echoes t)
|
||||
(ruby-block-mode t)
|
||||
;; bind yari in the local keymap
|
||||
(local-set-key (kbd "C-h r") 'yari))
|
||||
|
||||
(setq prelude-ruby-mode-hook 'prelude-ruby-mode-defaults)
|
||||
|
||||
(add-hook 'ruby-mode-hook (lambda () (run-hooks 'prelude-ruby-mode-hook)))
|
||||
(setq prelude-ruby-mode-hook 'prelude-ruby-mode-defaults)
|
||||
|
||||
(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