]> git.eshelyaron.com Git - emacs.git/commitdiff
(compilation-shell-minor-mode): New function.
authorRichard M. Stallman <rms@gnu.org>
Mon, 11 Jan 1999 17:37:34 +0000 (17:37 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 11 Jan 1999 17:37:34 +0000 (17:37 +0000)
lisp/progmodes/compile.el

index ddb4942525d2700c028d5b9d39f405b0af04f166..18b1d387b5ad7bf73afb3fe4bced04203519e833 100644 (file)
@@ -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.