diff options
author | Tom Willemse | 2013-04-30 17:57:56 +0200 |
---|---|---|
committer | Tom Willemse | 2013-04-30 17:57:56 +0200 |
commit | 4a5b5a31a63ba21f7722784b14c050142a66d741 (patch) | |
tree | e2026e16c80358433851eb1ebac456a93048687a /emacs | |
parent | b7c74aded046797d24f33a03b30f2a4b5771e7b7 (diff) | |
download | dotfiles-4a5b5a31a63ba21f7722784b14c050142a66d741.tar.gz dotfiles-4a5b5a31a63ba21f7722784b14c050142a66d741.zip |
Use compilation-shell-minor-mode for pony buffers
It still allows for shell use, like the `*ponysh*' python shell.
Diffstat (limited to 'emacs')
-rw-r--r-- | emacs/init.org | 28 |
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 |