From: Richard M. Stallman Date: Mon, 11 Jan 1999 17:37:34 +0000 (+0000) Subject: (compilation-shell-minor-mode): New function. X-Git-Tag: emacs-20.4~896 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7052680be69dc748f2997576e1fc118f2909bfd9;p=emacs.git (compilation-shell-minor-mode): New function. --- diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index ddb4942525d..18b1d387b5a 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -970,6 +970,20 @@ Compilation major mode are available.") compilation-minor-mode-map) minor-mode-map-alist))) +;;;###autoload +(defun compilation-shell-minor-mode (&optional arg) + "Toggle compilation shell minor mode. +With arg, turn compilation mode on if and only if arg is positive. +See `compilation-mode'. +Turning the mode on runs the normal hook `compilation-shell-minor-mode-hook'." + (interactive "P") + (if (setq compilation-shell-minor-mode (if (null arg) + (null compilation-shell-minor-mode) + (> (prefix-numeric-value arg) 0))) + (let ((mode-line-process)) + (compilation-setup) + (run-hooks 'compilation-shell-minor-mode-hook)))) + ;;;###autoload (defun compilation-minor-mode (&optional arg) "Toggle compilation minor mode.