summaryrefslogtreecommitdiffstats
path: root/emacs/init.org
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/init.org')
-rw-r--r--emacs/init.org28
1 files 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