summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2013-12-30 23:07:34 +0100
committerGravatar Tom Willemse2013-12-30 23:07:34 +0100
commit7c66f014fb60cf77896fc49e4a0629d07cf9bcd7 (patch)
treee21bf44f3f78b9cc9ed414e1359e0b6e564e2d0d
parente0ecb3b26e102a7278b85b666f5c3debaeb4c84a (diff)
downloademacs-7c66f014fb60cf77896fc49e4a0629d07cf9bcd7.tar.gz
emacs-7c66f014fb60cf77896fc49e4a0629d07cf9bcd7.zip
Reorder module-specific settings
-rw-r--r--.emacs.d/init.el196
1 files changed, 96 insertions, 100 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
index 5199005..ed7a05d 100644
--- a/.emacs.d/init.el
+++ b/.emacs.d/init.el
@@ -857,103 +857,12 @@ If no direction is given, don't split."
;; be too late.
(setq elnode-do-init nil)
-;;;; uniquify
-
-(stante-after uniquify
- (setq uniquify-buffer-name-style 'post-forward))
-
-;;;; Visual cues
-
-(turn-off menu-bar-mode scroll-bar-mode tool-bar-mode blink-cursor-mode
- column-number-mode line-number-mode tooltip-mode)
-
-;;;; eww
-
-(stante-after eww
- (setq eww-download-path ; Don't go to ~/Downloads
- "~/downloads/"))
-
-;;;; Typography
-
-;; Use double spaces to end lines in Emacs Lisp. The checkdoc
-;; function starts complaining if you don't.
-(add-hook 'emacs-lisp-mode-hook #'init-locally-enable-double-spaces)
-
-;;;; Symbols
-
-(eval-and-compile
- (mapc #'loadpath-add-and-autoload
- '("~/.emacs.d/site-lisp" "~/projects/emacs/pony-mode/src"
- "~/.emacs.d/vendor-lisp/org/lisp"
- "~/.emacs.d/vendor-lisp/org/contrib/lisp"
- "~/.emacs.d/vendor-lisp/mozrepl"
- "~/.emacs.d/vendor-lisp/eap" "/usr/share/emacs/site-lisp")))
-
-(add-hook 'emacs-lisp-mode-hook #'init-set-emacs-lisp-symbols)
-(add-hook 'lisp-mode-hook #'init-set-emacs-lisp-symbols)
-(add-hook 'python-mode-hook #'init-set-python-symbols)
-
-(when (fboundp 'prettify-symbols-mode)
- (add-hook 'prog-mode-hook 'prettify-symbols-mode))
-
-(stante-after slime
- (setq slime-lisp-implementations
- '((sbcl ("sbcl" "--noinform") :coding-system utf-8-unix)
- (clisp ("clisp") :coding-system utf-8-unix))
- slime-default-lisp 'sbcl))
-
-(stante-after simple
- (define-key special-mode-map "z" #'kill-this-buffer))
-
-(defadvice windmove-do-window-select
- (around init-windmove-stumpwm activate)
- "If no window can be moved to, move stumpwm."
- (condition-case err
- ad-do-it
- (error (stumpwm-command (format "move-focus %s" (ad-get-arg 0))))))
-
-(global-set-key (kbd "C-c S") #'split-window-right)
-(global-set-key (kbd "C-c s") #'split-window-below)
-(global-set-key (kbd "C-c Q") #'delete-other-windows)
-(global-set-key (kbd "C-c R") #'delete-window)
-
-(add-to-list 'load-path "/usr/lib/node_modules/tern/emacs/")
-
-(stante-after tern
- (require 'tern-auto-complete)
- (tern-ac-setup))
-
-(add-hook 'js2-mode-hook #'tern-mode)
-
-(global-set-key (kbd "C-. C-.") #'init-switch-to-other-buffer)
-
-(stante-after woman
- (setq woman-fill-column 72))
-
-(add-hook 'c-mode-hook #'smartparens-strict-mode)
-
-(add-hook 'javascript-mode-hook 'moz-minor-mode)
-
-(global-set-key (kbd "C-c -") #'decrease-number-at-point)
-(global-set-key (kbd "C-c +") #'increase-number-at-point)
-
-(defadvice org-agenda-redo (after ext:org-agenda-redo-add-appts)
- "Pressing `r' on the agenda will also add appointments."
- (progn
- (setq appt-time-msg-list nil)
- (org-agenda-to-appt)))
-
-(defadvice term-handle-exit (after oni:kill-buffer-after-exit activate)
- "Kill the term buffer if the process finished."
- (kill-buffer (current-buffer)))
+;;;; Module-specific settings
(stante-after appt
(setq appt-disp-window-function #'oni:appt-display-window-and-jabber)
(setq appt-display-diary nil))
-(stante-after "bindings"
- (setq mode-line-default-help-echo ""))
-
(stante-after auto-complete
(add-to-list 'ac-modes 'slime-repl-mode)
(setq-default ac-sources '(ac-source-imenu
@@ -969,6 +878,9 @@ If no direction is given, don't split."
(setq ac-auto-show-menu nil
ac-use-quick-help nil))
+(stante-after "bindings"
+ (setq mode-line-default-help-echo ""))
+
(stante-after browse-url
(setq browse-url-browser-function 'browse-url-generic)
(setq browse-url-generic-program (getenv "BROWSER")))
@@ -1033,6 +945,10 @@ If no direction is given, don't split."
(stante-after eltuki
(setq eltuki-blog-dir "~/documents/blog"))
+(stante-after em-dirs
+ (add-hook 'eshell-directory-change-hook
+ #'oni:current-dir-in-buffer-name))
+
(stante-after em-prompt
(setq eshell-highlight-prompt nil)
(setq eshell-prompt-function 'oni-eshell-prompt)
@@ -1069,6 +985,13 @@ If no direction is given, don't split."
(setq erc-timestamp-format "[%H:%M] ")
(setq erc-timestamp-only-if-changed-flag nil))
+(stante-after esh-mode
+ (add-to-list 'eshell-output-filter-functions #'oni:eshell-handle-url))
+
+(stante-after eww
+ (setq eww-download-path ; Don't go to ~/Downloads
+ "~/downloads/"))
+
(stante-after files
(setq-default require-final-newline t)
(setq auto-mode-case-fold nil)
@@ -1183,7 +1106,14 @@ If no direction is given, don't split."
(setq sendmail-program "/usr/bin/msmtp"))
(stante-after simple
- (setq read-mail-command 'gnus))
+ (setq read-mail-command 'gnus)
+ (define-key special-mode-map "z" #'kill-this-buffer))
+
+(stante-after slime
+ (setq slime-lisp-implementations
+ '((sbcl ("sbcl" "--noinform") :coding-system utf-8-unix)
+ (clisp ("clisp") :coding-system utf-8-unix))
+ slime-default-lisp 'sbcl))
(stante-after smartparens
(setq sp-cancel-autoskip-on-backward-movement nil
@@ -1200,6 +1130,10 @@ If no direction is given, don't split."
(setq initial-scratch-message nil)
(setq user-mail-address "tom@ryuslash.org"))
+(stante-after tern
+ (require 'tern-auto-complete)
+ (tern-ac-setup))
+
(stante-after time-stamp
(setq time-stamp-active t)
(setq time-stamp-format "%04y-%02m-%02d %02H:%02M:%02S (%u)"))
@@ -1209,6 +1143,9 @@ If no direction is given, don't split."
(setq type-break-interval (* 60 50))
(setq type-break-keystroke-threshold '(nil . nil)))
+(stante-after uniquify
+ (setq uniquify-buffer-name-style 'post-forward))
+
(stante-after w3m
(setq w3m-fill-column 72))
@@ -1224,10 +1161,76 @@ If no direction is given, don't split."
'display-buffer-alist
'("^\\*magit: .*\\*$" display-buffer-same-window)))
+(stante-after woman
+ (setq woman-fill-column 72))
+
(stante-after yasnippet
(setq yas-fallback-behavior nil)
(setq yas-prompt-functions '(yas-ido-prompt)))
+;;;; Visual cues
+
+(turn-off menu-bar-mode scroll-bar-mode tool-bar-mode blink-cursor-mode
+ column-number-mode line-number-mode tooltip-mode)
+
+;;;; Typography
+
+;; Use double spaces to end lines in Emacs Lisp. The checkdoc
+;; function starts complaining if you don't.
+(add-hook 'emacs-lisp-mode-hook #'init-locally-enable-double-spaces)
+
+;;;; Symbols
+
+(eval-and-compile
+ (mapc #'loadpath-add-and-autoload
+ '("~/.emacs.d/site-lisp" "~/projects/emacs/pony-mode/src"
+ "~/.emacs.d/vendor-lisp/org/lisp"
+ "~/.emacs.d/vendor-lisp/org/contrib/lisp"
+ "~/.emacs.d/vendor-lisp/mozrepl"
+ "~/.emacs.d/vendor-lisp/eap" "/usr/share/emacs/site-lisp")))
+
+(add-hook 'emacs-lisp-mode-hook #'init-set-emacs-lisp-symbols)
+(add-hook 'lisp-mode-hook #'init-set-emacs-lisp-symbols)
+(add-hook 'python-mode-hook #'init-set-python-symbols)
+
+(when (fboundp 'prettify-symbols-mode)
+ (add-hook 'prog-mode-hook 'prettify-symbols-mode))
+
+(defadvice windmove-do-window-select
+ (around init-windmove-stumpwm activate)
+ "If no window can be moved to, move stumpwm."
+ (condition-case err
+ ad-do-it
+ (error (stumpwm-command (format "move-focus %s" (ad-get-arg 0))))))
+
+(global-set-key (kbd "C-c S") #'split-window-right)
+(global-set-key (kbd "C-c s") #'split-window-below)
+(global-set-key (kbd "C-c Q") #'delete-other-windows)
+(global-set-key (kbd "C-c R") #'delete-window)
+
+(add-to-list 'load-path "/usr/lib/node_modules/tern/emacs/")
+
+(add-hook 'js2-mode-hook #'tern-mode)
+
+(global-set-key (kbd "C-. C-.") #'init-switch-to-other-buffer)
+
+(add-hook 'c-mode-hook #'smartparens-strict-mode)
+
+(add-hook 'javascript-mode-hook 'moz-minor-mode)
+
+(global-set-key (kbd "C-c -") #'decrease-number-at-point)
+(global-set-key (kbd "C-c +") #'increase-number-at-point)
+
+(defadvice org-agenda-redo (after ext:org-agenda-redo-add-appts)
+ "Pressing `r' on the agenda will also add appointments."
+ (progn
+ (setq appt-time-msg-list nil)
+ (org-agenda-to-appt)))
+
+(defadvice term-handle-exit (after oni:kill-buffer-after-exit activate)
+ "Kill the term buffer if the process finished."
+ (kill-buffer (current-buffer)))
+
(mode-hooks
((clojure emacs-lisp lisp sawfish scheme ielm geiser-repl slime-repl)
paredit-mode)
@@ -1395,13 +1398,6 @@ If no direction is given, don't split."
(electric-indent-mode -1)
-(stante-after esh-mode
- (add-to-list 'eshell-output-filter-functions #'oni:eshell-handle-url))
-
-(stante-after em-dirs
- (add-hook 'eshell-directory-change-hook
- #'oni:current-dir-in-buffer-name))
-
(provide 'init)
;;; init.el ends here