Skip to content

Commit

Permalink
Remove unnecessary autoloads, and tidy up various bits & pieces
Browse files Browse the repository at this point in the history
  • Loading branch information
purcell committed Nov 2, 2011
1 parent 3801ba1 commit 8be1cc8
Show file tree
Hide file tree
Showing 15 changed files with 29 additions and 48 deletions.
2 changes: 0 additions & 2 deletions init-clojure.el
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@



(require 'elein)


(eval-after-load "viper"
'(add-to-list 'viper-vi-state-mode-list 'clojure-mode))
Expand Down
2 changes: 1 addition & 1 deletion init-darcs.el
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
3 changes: 0 additions & 3 deletions init-editing-utils.el
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
(require 'diminish)

;;----------------------------------------------------------------------------
;; Some basic preferences
;;----------------------------------------------------------------------------
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions init-erlang.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)
16 changes: 8 additions & 8 deletions init-git.el
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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
Expand Down
1 change: 0 additions & 1 deletion init-growl.el
Original file line number Diff line number Diff line change
@@ -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)
1 change: 0 additions & 1 deletion init-haml.el
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
22 changes: 9 additions & 13 deletions init-ibuffer.el
Original file line number Diff line number Diff line change
@@ -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))
Expand All @@ -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
Expand Down
1 change: 0 additions & 1 deletion init-javascript.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions init-lisp.el
Original file line number Diff line number Diff line change
@@ -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")
Expand Down Expand Up @@ -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)))


Expand Down
10 changes: 6 additions & 4 deletions init-nxml.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)))


;;----------------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion init-ruby-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
;;----------------------------------------------------------------------------
;; Ruby - flymake
;;----------------------------------------------------------------------------
(require 'flymake-ruby)
(add-hook 'ruby-mode-hook 'flymake-ruby-load)


Expand Down
1 change: 0 additions & 1 deletion init-sessions.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion init-utils.el
Original file line number Diff line number Diff line change
Expand Up @@ -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))))

Expand Down
10 changes: 3 additions & 7 deletions init.el
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,14 @@
;;----------------------------------------------------------------------------
(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)
Expand Down

0 comments on commit 8be1cc8

Please sign in to comment.