From 4a5b5a31a63ba21f7722784b14c050142a66d741 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Tue, 30 Apr 2013 17:57:56 +0200 Subject: [PATCH] Use compilation-shell-minor-mode for pony buffers It still allows for shell use, like the `*ponysh*' python shell. --- emacs/init.org | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/emacs/init.org b/emacs/init.org index 002ff9d..dbe0dfa 100644 --- a/emacs/init.org +++ b/emacs/init.org @@ -1262,6 +1262,24 @@ (setq jit-lock-defer-time 0.2) #+END_SRC +* Turn on compilation-shell-minor-mode for pony buffers + + Turn on =compilation-shell-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-shell-minor-mode= for *every* =comint-mode= buffer, we can + add a hook that adds a local hook. + + I use =compilation-shell-minor-mode= because some pony mode buffers + are interactive, such as the pony-shell buffer. + + #+BEGIN_SRC emacs-lisp + (defun turn-on-compilation-shell-for-pony () + (add-hook 'pony-minor-mode-hook 'compilation-shell-minor-mode nil t)) + (add-hook 'comint-mode-hook 'turn-on-compilation-shell-for-pony) + #+END_SRC + * All the rest This still needs to be sorted out and documented, haven't had time @@ -1483,16 +1501,6 @@ (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) - ;;;; EMMS (eval-after-load "emms" `(progn