From 9ab70194a65f1d7ab726aaacdb43a58a02a048b6 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Thu, 11 Apr 2013 15:31:07 +0200 Subject: [PATCH] Emacs: Enable compilation-minor-mode for pony-mode comint buffers --- emacs/init.el | 10 ++++++++++ 1 file changed, 10 insertions(+) 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"))