summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <davet@gnu.org>2015-05-24 03:32:03 -0400
committerDavid Thompson <davet@gnu.org>2015-05-24 03:32:03 -0400
commit9251b3b76e40969c52a1b837f1cb64252bf82aac (patch)
tree1be1b94bed9b2b38a8c60354198579322ec545aa
parent904bad6fd25c5f13cc06df1370c66372cc8dc0e2 (diff)
emacs: Tweak config some more.
-rw-r--r--dotfiles/.emacs.d/init.el70
1 files changed, 34 insertions, 36 deletions
diff --git a/dotfiles/.emacs.d/init.el b/dotfiles/.emacs.d/init.el
index 8dde4b8..f2ab70a 100644
--- a/dotfiles/.emacs.d/init.el
+++ b/dotfiles/.emacs.d/init.el
@@ -20,13 +20,9 @@
'(better-defaults
elfeed
emms
- geiser
ido-ubiquitous
js2-mode
- magit
- notmuch
notmuch-unread
- paredit
rainbow-delimiters
smex
web-mode
@@ -93,21 +89,28 @@
(display-battery-mode t))
;;;
-;;; Buffers
+;;; Minibuffer
;;;
-;; ido is awesome for the minibuffer.
-(setq ido-everywhere t)
-(setq ido-enable-flex-matching t)
+(setf ido-everywhere t
+ ido-enable-flex-matching t)
+
(ido-mode t)
+
(when-require 'ido-ubiquitous
(ido-ubiquitous-mode t))
;; Ignore compiled Guile files. This has the side-effect of looking
;; like I hate GoLang.
-(setq ido-ignore-files (cons "\\.go$" ido-ignore-files))
+(setf ido-ignore-files (cons "\\.go$" ido-ignore-files))
-(when-require 'projectile (projectile-global-mode))
+;; Much improved M-x prompt.
+(when-require 'smex
+ (global-set-key (kbd "M-x") 'smex))
+
+;;;
+;;; Buffers
+;;;
;; Kill buffers that haven't been modified in awhile.
(require 'midnight)
@@ -161,6 +164,11 @@ might be bad."
(global-set-key (kbd "C-c g") 'magit-status))
+;; Follow symlinks automatically instead of asking each time.
+(setf vc-follow-symlinks t)
+
+(when-require 'projectile (projectile-global-mode))
+
;;;
;;; Ediff
;;;
@@ -198,24 +206,26 @@ might be bad."
;;; PHP
;;;
-(add-hook 'php-mode-hook (lambda () (setf c-basic-offset 2)))
+(when-require 'php-mode
+ (add-hook 'php-mode-hook (lambda () (setf c-basic-offset 2))))
;;;
;;; Lisp
;;;
-;; Highlight matching parens, automatically insert pairs, use rainbow
-;; delimiters and use paredit for Lisp buffers.
+(show-paren-mode t)
+
(when-require 'rainbow-delimiters
(global-rainbow-delimiters-mode t))
(when-require 'paredit
- (add-hook 'emacs-lisp-mode-hook (lambda () (paredit-mode t)))
- (add-hook 'lisp-mode-hook (lambda () (paredit-mode t)))
- (add-hook 'lisp-interaction-mode-hook (lambda () (paredit-mode t)))
- (add-hook 'scheme-mode-hook (lambda () (paredit-mode t))))
+ (defun use-paredit ()
+ (paredit-mode t))
-(show-paren-mode t)
+ (add-hook 'emacs-lisp-mode-hook 'use-paredit)
+ (add-hook 'lisp-mode-hook 'use-paredit)
+ (add-hook 'lisp-interaction-mode-hook 'use-paredit)
+ (add-hook 'scheme-mode-hook 'use-paredit))
(when-require 'geiser
(setf geiser-active-implementations '(guile))
@@ -229,36 +239,26 @@ might be bad."
(put 'and-let* 'scheme-indent-function 1)
(put 'syntax-parameterize 'scheme-indent-function 1)
+(put 'with-mutex 'scheme-indent-function 1)
+(put 'test-group 'scheme-indent-function 1)
+(put 'mock 'scheme-indent-function 1)
+
+;; TODO: Move to relevant project's .dir-locals.el
(put 'colambda 'scheme-indent-function 1)
(put 'codefine 'scheme-indent-function 1)
(put 'with-agenda 'scheme-indent-function 1)
-(put 'gl-begin 'scheme-indent-function 1)
-(put 'with-gl-push-matrix 'scheme-indent-function 0)
-(put 'with-gl-bind-texture 'scheme-indent-function 2)
-(put 'with-gl-client-state 'scheme-indent-function 1)
-(put 'with-gl-enable 'scheme-indent-function 1)
(put 'with-mesh 'scheme-indent-function 1)
-(put 'with-vertex-buffer 'scheme-indent-function 1)
(put 'with-texture 'scheme-indent-function 1)
-(put 'with-texture-maybe 'scheme-indent-function 1)
(put 'with-shader-program 'scheme-indent-function 1)
-(put 'uniforms 'scheme-indent-function 1)
-(put 'with-sprite-batch 'scheme-indent-function 1)
(put 'with-window 'scheme-indent-function 1)
-(put 'with-test-prefix 'scheme-indent-function 0)
-(put 'with-mutex 'scheme-indent-function 1)
(put 'bind-key-commands 'scheme-indent-function 2)
(put 'signal-let 'scheme-indent-function 1)
(put 'signal-let* 'scheme-indent-function 1)
-(put 'test-group 'scheme-indent-function 1)
-(put 'mock 'scheme-indent-function 1)
(put 'with-framebuffer 'scheme-indent-function 1)
(put 'with-render-context 'scheme-indent-function 1)
(put 'with-push-context 'scheme-indent-function 1)
(put 'with-temp-transform 'scheme-indent-function 2)
(put 'chain 'scheme-indent-function 1)
-(put 'call-with-port-or-input-file 'scheme-indent-function 1)
-(put 'call-with-port-or-output-file 'scheme-indent-function 1)
;;;
;;; Ruby
@@ -318,6 +318,7 @@ might be bad."
("davet@fsf.org" . "FSF/INBOX.Sent")
("davet@gnu.org" . "FSF/INBOX.Sent")
(".*" . "sent")))
+
(setf notmuch-saved-searches
'((:name "unread" :query "tag:unread")
(:name "inbox" :query "tag:inbox")
@@ -434,9 +435,6 @@ might be bad."
(forward-line -1)
(indent-for-tab-command))
-(when-require 'smex
- (global-set-key (kbd "M-x") 'smex))
-
(global-set-key (kbd "RET") 'newline-and-indent)
(global-set-key (kbd "<C-return>") 'open-line-below)
(global-set-key (kbd "<C-M-return>") 'open-line-above)