Permalink
Browse files

Remove unnecessary autoloads, and tidy up various bits & pieces

  • Loading branch information...
1 parent 3801ba1 commit 8be1cc8082567dc57bb6dd9488385c0bbc4759ba @purcell purcell committed Nov 2, 2011
Showing with 29 additions and 48 deletions.
  1. +0 −2 init-clojure.el
  2. +1 −1 init-darcs.el
  3. +0 −3 init-editing-utils.el
  4. +0 −2 init-erlang.el
  5. +8 −8 init-git.el
  6. +0 −1 init-growl.el
  7. +0 −1 init-haml.el
  8. +9 −13 init-ibuffer.el
  9. +0 −1 init-javascript.el
  10. +1 −2 init-lisp.el
  11. +6 −4 init-nxml.el
  12. +0 −1 init-ruby-mode.el
  13. +0 −1 init-sessions.el
  14. +1 −1 init-utils.el
  15. +3 −7 init.el
View
@@ -53,8 +53,6 @@
-(require 'elein)
-
(eval-after-load "viper"
'(add-to-list 'viper-vi-state-mode-list 'clojure-mode))
View
@@ -1,8 +1,8 @@
+;; TODO: include this in the vc-darcs ELPA package
(add-to-list 'vc-handled-backends 'DARCS)
(autoload 'vc-darcs-find-file-hook "vc-darcs")
(add-hook 'find-file-hooks 'vc-darcs-find-file-hook)
-(require 'darcsum)
(setq darcsum-whatsnew-switches "-l")
(eval-after-load "grep"
@@ -1,5 +1,3 @@
-(require 'diminish)
-
;;----------------------------------------------------------------------------
;; Some basic preferences
;;----------------------------------------------------------------------------
@@ -163,7 +161,6 @@
;;----------------------------------------------------------------------------
;; Cut/copy the current line if no region is active
;;----------------------------------------------------------------------------
-(require 'whole-line-or-region)
(whole-line-or-region-mode t)
(diminish 'whole-line-or-region-mode)
(make-variable-buffer-local 'whole-line-or-region-mode)
View
@@ -4,8 +4,6 @@
;;(add-hook 'erlang-load-hook 'my-erlang-load-hook)
(setq erlang-root-dir "/opt/local/lib/erlang")
(require 'erlang-start)
-;;(require 'distel)
-;;(add-hook 'erlang-mode-hook 'distel-erlang-mode-hook))
(provide 'init-erlang)
View
@@ -1,11 +1,7 @@
-;;(setq load-path (cons (expand-file-name "/usr/share/doc/git-core/contrib/emacs") load-path))
-;; Downloaded from http://git.kernel.org/?p=git/git.git ;a=tree;hb=HEAD;f=contrib/emacs
-(require 'vc-git)
-(when (featurep 'vc-git) (add-to-list 'vc-handled-backends 'git))
(autoload 'git-blame-mode "git-blame" "Minor mode for incremental blame for Git." t)
-(require 'magit)
+(autoload 'magit-status "magit")
(setq magit-save-some-buffers nil)
(setq magit-process-popup-time 4)
(setq magit-completing-read-function 'magit-ido-completing-read)
@@ -21,9 +17,13 @@
(when *is-a-mac*
(add-hook 'magit-mode-hook (lambda () (local-unset-key [(meta h)]))))
-(require 'magit-svn)
-(require 'rebase-mode)
-(require 'diff-git)
+(eval-after-load 'magit
+ '(progn
+ (require 'magit-svn)))
+
+(autoload 'rebase-mode "rebase-mode")
+(add-to-list 'auto-mode-alist '("git-rebase-todo" . rebase-mode))
+(require 'diff-git) ;; TODO: see if magit can do the same thing
;;----------------------------------------------------------------------------
;; git-svn conveniences
View
@@ -1,5 +1,4 @@
(require 'todochiku) ;; growl notifications when compilation finishes
-(add-hook 'compilation-mode-hook (lambda () (local-set-key [f6] 'recompile)))
(setq todochiku-icons-directory (expand-file-name "~/.emacs.d/site-lisp/todochiku-icons"))
(provide 'init-growl)
View
@@ -1,7 +1,6 @@
(add-auto-mode 'haml-mode "\.haml$")
(add-auto-mode 'sass-mode "\.sass$" "\.scss$")
-(require 'flymake-haml)
(add-hook 'haml-mode-hook 'flymake-haml-load)
(add-hook 'sass-mode-hook 'flymake-sass-load)
View
@@ -1,7 +1,3 @@
-(require 'ibuffer)
-
-(require 'ibuffer-vc)
-
(defun ibuffer-set-up-preferred-filters ()
(ibuffer-vc-set-filter-groups-by-vc-root)
(ibuffer-do-sort-by-filename/process))
@@ -10,15 +6,15 @@
-
-;; Use human readable Size column instead of original one
-(define-ibuffer-column size-h
- (:name "Size" :inline t)
- (cond
- ((> (buffer-size) 1000000) (format "%7.1fM" (/ (buffer-size) 1000000.0)))
- ((> (buffer-size) 1000) (format "%7.1fk" (/ (buffer-size) 1000.0)))
- (t (format "%8d" (buffer-size)))))
-
+(eval-after-load 'ibuffer
+ '(progn
+ ;; Use human readable Size column instead of original one
+ (define-ibuffer-column size-h
+ (:name "Size" :inline t)
+ (cond
+ ((> (buffer-size) 1000000) (format "%7.1fM" (/ (buffer-size) 1000000.0)))
+ ((> (buffer-size) 1000) (format "%7.1fk" (/ (buffer-size) 1000.0)))
+ (t (format "%8d" (buffer-size)))))))
;; Modify the default ibuffer-formats
(setq ibuffer-formats
View
@@ -74,7 +74,6 @@
(add-hook 'coffee-mode-hook 'flymake-coffee-load)
-(require 'js-comint)
(setq inferior-js-program-command "js")
(defun add-inferior-js-keys ()
(local-set-key "\C-x\C-e" 'js-send-last-sexp)
View
@@ -1,4 +1,4 @@
-(require 'pretty-mode)
+(autoload 'turn-on-pretty-mode "pretty-mode")
(add-hook 'emacs-lisp-mode-hook 'turn-on-pretty-mode)
(autoload 'enable-paredit-mode "paredit")
@@ -94,7 +94,6 @@
(remove-hook 'pre-command-hook #'hl-sexp-unhighlight))))
-(require 'elisp-slime-nav)
(add-hook 'emacs-lisp-mode-hook (lambda () (elisp-slime-nav-mode t)))
View
@@ -11,10 +11,12 @@
(setq ido-use-filename-at-point nil)))
(setq nxml-slash-auto-complete-flag t)
-(require 'whattf-dt)
-(eval-after-load "rng-loc"
- '(push (expand-file-name "schemas.xml" (directory-of-library "whattf-dt"))
- rng-schema-locating-files))
+
+(eval-after-load 'rng-loc
+ '(progn
+ (require 'whattf-dt)
+ (push (expand-file-name "schemas.xml" (directory-of-library "whattf-dt"))
+ rng-schema-locating-files)))
;;----------------------------------------------------------------------------
View
@@ -21,7 +21,6 @@
;;----------------------------------------------------------------------------
;; Ruby - flymake
;;----------------------------------------------------------------------------
-(require 'flymake-ruby)
(add-hook 'ruby-mode-hook 'flymake-ruby-load)
View
@@ -20,7 +20,6 @@
;;----------------------------------------------------------------------------
;; Restore histories and registers after saving
;;----------------------------------------------------------------------------
-(require 'session)
(setq session-save-file (expand-file-name "~/.emacs.d/.session"))
(add-hook 'after-init-hook 'session-initialize)
View
@@ -27,7 +27,7 @@
;;----------------------------------------------------------------------------
;; Find the directory containing a given library
;;----------------------------------------------------------------------------
-(require 'find-func)
+(autoload 'find-library-name "find-func")
(defun directory-of-library (library-name)
(file-name-as-directory (file-name-directory (find-library-name library-name))))
View
@@ -17,17 +17,13 @@
(require 'cl)
;;----------------------------------------------------------------------------
-;; Set $PATH
-;;----------------------------------------------------------------------------
-(require 'init-exec-path)
-
-;;----------------------------------------------------------------------------
;; Load configs for specific features and modes
;;----------------------------------------------------------------------------
-(require 'init-site-lisp)
+(require 'init-utils)
+(require 'init-site-lisp) ;; Must come before elpa, as it may provide package.el
(require 'init-elpa)
(require 'init-marmalade)
-(require 'init-utils)
+(require 'init-exec-path) ;; Set up $PATH
(require 'init-frame-hooks)
(require 'init-xterm)
(require 'init-title-bar)

0 comments on commit 8be1cc8

Please sign in to comment.