Permalink
Browse files

Move 'require-package calls next to the related setup code

  • Loading branch information...
1 parent 49711f6 commit 2612b9f9a6e4e514c91e3516b6a1295255a6ef36 @purcell committed Mar 4, 2013
View
@@ -1,4 +1,4 @@
-(require 'auto-complete)
+(require-package 'auto-complete)
(require 'auto-complete-config)
(global-auto-complete-mode t)
(setq ac-expand-on-auto-complete nil)
View
@@ -1,3 +1,13 @@
+(require-package 'clojure-mode)
+(require-package 'clojure-test-mode)
+(require-package 'cljsbuild-mode)
+(require-package 'elein)
+(require-package 'nrepl)
+(require-package 'slamhound)
+(require-package 'slime)
+(require-package 'ac-nrepl)
+
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Slime with Clojure
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
View
@@ -1,3 +1,4 @@
+(require-package 'crontab-mode)
(add-auto-mode 'crontab-mode "\\.?cron\\(tab\\)?\\'")
(provide 'init-crontab)
View
@@ -1,3 +1,11 @@
+(require-package 'mmm-mode)
+(require-package 'sass-mode)
+(require-package 'scss-mode)
+(require-package 'less-css-mode)
+(require-package 'flymake-css)
+(require-package 'flymake-sass)
+
+
(eval-after-load 'mmm-vars
'(progn
(mmm-add-group
@@ -27,6 +35,10 @@
;; Colourise CSS colour literals
+(when (featurep 'color)
+ ;; rainbow-mode needs color.el, bundled with Emacs >= 24.
+ (require-package 'rainbow-mode))
+
(eval-after-load 'rainbow-mode
'(dolist (hook '(css-mode-hook html-mode-hook sass-mode-hook))
(add-hook hook 'rainbow-mode)))
View
@@ -1,6 +1,8 @@
-(autoload 'csv-mode "csv-mode" "Major mode for editing comma-separated value files." t)
+(require-package 'csv-mode)
+(require-package 'csv-nav)
+
(add-auto-mode 'csv-mode "\\.[Cc][Ss][Vv]\\'")
-(autoload 'csv-nav-mode "csv-nav-mode" "Major mode for navigating comma-separated value files." t)
+(autoload 'csv-nav-mode "csv-nav" "Major mode for navigating comma-separated value files." t)
(setq csv-separators '("," ";" "|" " "))
View
@@ -1,3 +1,7 @@
+(require-package 'darcsum)
+(require-package 'vc-darcs)
+
+
;; TODO: include this in the vc-darcs ELPA package
(add-to-list 'vc-handled-backends 'DARCS)
(autoload 'vc-darcs-find-file-hook "vc-darcs")
View
@@ -1,3 +1,5 @@
+(require-package 'dired+)
+
(eval-after-load 'dired
'(progn
(require 'dired+)
View
@@ -1,3 +1,6 @@
+(require-package 'unfill)
+(require-package 'whole-line-or-region)
+
;;----------------------------------------------------------------------------
;; Some basic preferences
;;----------------------------------------------------------------------------
@@ -53,18 +56,20 @@
;;----------------------------------------------------------------------------
;; Show matching parens
;;----------------------------------------------------------------------------
+(require-package 'mic-paren)
(paren-activate) ; activating mic-paren
;;----------------------------------------------------------------------------
;; Expand region
;;----------------------------------------------------------------------------
-(require 'expand-region)
+(require-package 'expand-region)
(global-set-key (kbd "C-=") 'er/expand-region)
;;----------------------------------------------------------------------------
;; Fix per-window memory of buffer point positions
;;----------------------------------------------------------------------------
+(require-package 'pointback)
(global-pointback-mode)
(defadvice skeleton-insert (before disable-pointback activate)
"Disable pointback when using skeleton functions like `sgml-tag'."
@@ -99,10 +104,13 @@
(global-set-key (kbd "M-T") 'transpose-lines)
(global-set-key (kbd "C-.") 'set-mark-command)
(global-set-key (kbd "C-x C-.") 'pop-global-mark)
+
+(require-package 'ace-jump-mode)
(global-set-key (kbd "C-;") 'ace-jump-mode)
(global-set-key (kbd "C-:") 'ace-jump-word-mode)
+(require-package 'multiple-cursors)
;; multiple-cursors
(global-set-key (kbd "C-<") 'mc/mark-previous-like-this)
(global-set-key (kbd "C->") 'mc/mark-next-like-this)
@@ -146,12 +154,14 @@
;;----------------------------------------------------------------------------
;; Page break lines
;;----------------------------------------------------------------------------
+(require-package 'page-break-lines)
(global-page-break-lines-mode)
;;----------------------------------------------------------------------------
;; Fill column indicator
;;----------------------------------------------------------------------------
(when (> emacs-major-version 23)
+ (require-package 'fill-column-indicator)
(defun sanityinc/prog-mode-fci-settings ()
(turn-on-fci-mode)
(when show-trailing-whitespace
@@ -188,6 +198,7 @@
;;----------------------------------------------------------------------------
;; Shift lines up and down with M-up and M-down
;;----------------------------------------------------------------------------
+(require-package 'move-text)
(move-text-default-bindings)
View
@@ -96,123 +96,5 @@ ARCHIVE is the string name of the package archive.")
(package-initialize)
-(require-package 'ido-ubiquitous)
-(when (< emacs-major-version 24)
- (require-package 'color-theme))
-(require-package 'auto-compile)
-(require-package 'auto-complete)
-(require-package 'ace-jump-mode)
-(require-package 'fill-column-indicator)
-(require-package 'multiple-cursors)
-(require-package 'expand-region)
-(require-package 'tagedit)
-(require-package 'gnuplot)
-(require-package 'haskell-mode)
-(require-package 'magit)
-(require-package 'git-gutter-fringe)
-(require-package 'git-blame)
-(require-package 'git-commit-mode)
-(require-package 'gitignore-mode)
-(require-package 'gitconfig-mode)
-(require-package 'wgrep)
-(require-package 'flymake-cursor)
-(require-package 'csv-mode)
-(require-package 'csv-nav)
-(require-package 'json)
-(require-package 'js3-mode)
-(when (>= emacs-major-version 24)
- (require-package 'js2-mode))
-(require-package 'lua-mode)
-(require-package 'project-local-variables)
-(require-package 'ruby-mode)
-(require-package 'inf-ruby)
-(require-package 'robe)
-(require-package 'yari)
-(require-package 'yaml-mode)
-(require-package 'paredit)
-(require-package 'eldoc-eval)
-(ignore-errors
- (require-package 'erlang))
-(require-package 'slime)
-(require-package 'slime-fuzzy)
-(require-package 'slime-repl)
-(require-package 'yagist)
-(require-package 'haml-mode)
-(require-package 'sass-mode)
-(require-package 'scss-mode)
-(require-package 'elein)
-(require-package 'markdown-mode)
-(require-package 'smex)
-(require-package 'sql-indent)
-(require-package 'dired+)
-(when (featurep 'color)
- ;; rainbow-mode needs color.el, bundled with Emacs >= 24.
- (require-package 'rainbow-mode))
-(require-package 'maxframe)
-(when (< emacs-major-version 24)
- (require-package 'org))
-(require-package 'org-fstree)
-(when *is-a-mac*
- (require-package 'org-mac-link-grabber)
- (require-package 'org-mac-iCal))
-(require-package 'htmlize)
-(require-package 'clojure-mode)
-(require-package 'clojure-test-mode)
-(require-package 'cljsbuild-mode)
-(require-package 'nrepl)
-(require-package 'slamhound)
-(require-package 'diminish)
-(require-package 'js-comint)
-(require-package 'php-mode)
-(require-package 'smarty-mode)
-(require-package 'scratch)
-(require-package 'mic-paren)
-(require-package 'rainbow-delimiters)
-(require-package 'todochiku)
-(require-package 'marmalade)
-(require-package 'textile-mode)
-(require-package 'darcsum)
-(require-package 'pretty-mode)
-
-;; I maintain this chunk:
-(require-package 'ac-slime)
-(require-package 'ac-nrepl)
-(require-package 'coffee-mode)
-(require-package 'color-theme-sanityinc-solarized)
-(require-package 'color-theme-sanityinc-tomorrow)
-(require-package 'crontab-mode)
-(require-package 'dsvn)
-(require-package 'elisp-slime-nav)
-(require-package 'exec-path-from-shell)
-(require-package 'flymake-coffee)
-(require-package 'flymake-css)
-(require-package 'flymake-haml)
-(require-package 'flymake-jslint)
-(require-package 'flymake-json)
-(require-package 'flymake-php)
-(require-package 'flymake-python-pyflakes)
-(require-package 'flymake-ruby)
-(require-package 'flymake-sass)
-(require-package 'flymake-shell)
-(require-package 'hippie-expand-slime)
-(require-package 'hl-sexp)
-(require-package 'ibuffer-vc)
-(require-package 'less-css-mode)
-(require-package 'lively)
-(require-package 'mmm-mode)
-(require-package 'move-text)
-(require-package 'mwe-log-commands)
-(when *is-a-mac*
- (require-package 'osx-location))
-(require-package 'page-break-lines)
-(require-package 'pointback)
-(require-package 'regex-tool)
-(require-package 'rinari)
-(require-package 'ruby-compilation)
-(require-package 'session)
-(require-package 'tidy)
-(require-package 'unfill)
-(require-package 'vc-darcs)
-(require-package 'whole-line-or-region)
(provide 'init-elpa)
View
@@ -1,3 +1,7 @@
-(require 'erlang-start)
+(ignore-errors
+ (require-package 'erlang))
+
+(when (package-installed-p 'erlang)
+ (require 'erlang-start))
(provide 'init-erlang)
View
@@ -5,6 +5,7 @@
(when (memq window-system '(mac ns))
+ (require-package 'exec-path-from-shell)
(exec-path-from-shell-initialize))
(provide 'init-exec-path)
View
@@ -1,3 +1,5 @@
+(require-package 'flymake-cursor)
+
(setq flymake-gui-warnings-enabled nil)
;; Stop flymake from breaking when ruby-mode is invoked by mmm-mode,
View
@@ -1,3 +1,11 @@
+(require-package 'magit)
+(require-package 'git-gutter-fringe)
+(require-package 'git-blame)
+(require-package 'git-commit-mode)
+(require-package 'gitignore-mode)
+(require-package 'gitconfig-mode)
+(require-package 'yagist)
+
(setq magit-save-some-buffers nil
magit-process-popup-time 10
magit-completing-read-function 'magit-ido-completing-read)
View
@@ -1,3 +1,5 @@
+(require-package 'todochiku)
+
(require 'todochiku) ;; growl notifications when compilation finishes
(setq todochiku-icons-directory (expand-file-name "~/.emacs.d/site-lisp/todochiku-icons"))
View
@@ -1,3 +1,5 @@
+(require-package 'haml-mode)
+(require-package 'flymake-haml)
(add-hook 'haml-mode-hook 'flymake-haml-load)
(provide 'init-haml)
View
@@ -1,3 +1,4 @@
+(require-package 'haskell-mode)
(setq haskell-font-lock-symbols t)
(add-hook 'haskell-mode-hook
View
@@ -1,3 +1,5 @@
+(require-package 'ibuffer-vc)
+
(defun ibuffer-set-up-preferred-filters ()
(ibuffer-vc-set-filter-groups-by-vc-root)
(unless (eq ibuffer-sorting-mode 'filename/process)
View
@@ -1,3 +1,6 @@
+(require-package 'ido-ubiquitous)
+(require-package 'smex)
+
;; Use C-f during file selection to switch to regular find-file
(ido-mode t) ; use 'buffer rather than t to use only buffer switching
(ido-everywhere t)
View
@@ -1,3 +1,15 @@
+(require-package 'json)
+(require-package 'js3-mode)
+(when (>= emacs-major-version 24)
+ (require-package 'js2-mode))
+(require-package 'js-comint)
+(require-package 'rainbow-delimiters)
+(require-package 'coffee-mode)
+(require-package 'flymake-coffee)
+(require-package 'flymake-jslint)
+(require-package 'flymake-json)
+
+
(defcustom preferred-javascript-mode
(first (remove-if-not #'fboundp '(js2-mode js3-mode)))
"Javascript mode to use for .js files."
View
@@ -1,8 +1,13 @@
+(require-package 'elisp-slime-nav)
+(require-package 'lively)
+
+(require-package 'pretty-mode)
(autoload 'turn-on-pretty-mode "pretty-mode")
;; ----------------------------------------------------------------------------
;; Paredit
;; ----------------------------------------------------------------------------
+(require-package 'paredit)
(autoload 'enable-paredit-mode "paredit")
@@ -71,6 +76,7 @@
;; Automatic byte compilation
;; ----------------------------------------------------------------------------
+(require-package 'auto-compile)
(auto-compile-on-save-mode 1)
;; TODO: also use auto-compile-on-load-mode
;; TODO: exclude .dir-locals.el
@@ -79,6 +85,8 @@
;; Highlight current sexp
;; ----------------------------------------------------------------------------
+(require-package 'hl-sexp)
+
;; Prevent flickery behaviour due to hl-sexp-mode unhighlighting before each command
(eval-after-load 'hl-sexp
'(defadvice hl-sexp-mode (after unflicker (turn-on) activate)
@@ -115,6 +123,7 @@
(add-hook hook 'sanityinc/emacs-lisp-setup)))
+(require-package 'eldoc-eval)
(require 'eldoc-eval)
(add-to-list 'auto-mode-alist '("\\.emacs-project\\'" . emacs-lisp-mode))
View
@@ -1,3 +1,5 @@
+(require-package 'markdown-mode)
+
(setq auto-mode-alist
(cons '("\\.\\(md\\|markdown\\)\\'" . markdown-mode) auto-mode-alist))
View
@@ -1,3 +1,5 @@
+(require-package 'marmalade)
+
;;; Handy code for uploading new versions of my own packages to marmalade
(autoload 'marmalade-upload-buffer "marmalade")
Oops, something went wrong.

0 comments on commit 2612b9f

Please sign in to comment.