From 7052680be69dc748f2997576e1fc118f2909bfd9 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 11 Jan 1999 17:37:34 +0000 Subject: [PATCH] (compilation-shell-minor-mode): New function. --- lisp/progmodes/compile.el | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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. -- 2.39.2