summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2013-04-11 15:31:07 +0200
committerGravatar Tom Willemse2013-04-11 15:31:07 +0200
commit9ab70194a65f1d7ab726aaacdb43a58a02a048b6 (patch)
tree5956d0f5c4d98f4343a33d3b519d44a2e7aeeafa
parenta55c5dc5800c8cf40e84b129bb7985a64a5b4d21 (diff)
downloaddotfiles-9ab70194a65f1d7ab726aaacdb43a58a02a048b6.tar.gz
dotfiles-9ab70194a65f1d7ab726aaacdb43a58a02a048b6.zip
Emacs: Enable compilation-minor-mode for pony-mode comint buffers
-rw-r--r--emacs/init.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/emacs/init.el b/emacs/init.el
index 176d904..8e7fd45 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -602,6 +602,16 @@ Depending on the value of `buffer-narrowed-p'."
(setq eap-music-library "/mnt/music")
(setq eap-playlist-library "~/music/playlists")
+;;; Turn on `compilation-minor-mode' whenever `pony-minor-mode' starts
+;;; in a `comint-mode' buffer. Since buffers like `*ponymanage*' and
+;;; `*ponyserver*' don't have their own specialized modes, but use
+;;; `comint-mode' and turn on `pony-minor-mode', and I don't want to
+;;; enable `compilation-minor-mode' for *every* `comint-mode' buffer,
+;;; we can add a hook that adds a local hook.
+(defun turn-on-compilation-for-pony ()
+ (add-hook 'pony-minor-mode-hook 'compilation-minor-mode nil t))
+(add-hook 'comint-mode-hook 'turn-on-compilation-for-pony)
+
;;; Finally, load any `customize' settings and slime.
(load custom-file)
(load (expand-file-name "~/quicklisp/slime-helper.el"))