changeset 24053:551467b8a092

(compilation-shell-minor-mode): New function.
author Richard M. Stallman <rms@gnu.org>
date Mon, 11 Jan 1999 17:37:34 +0000
parents 157787e56b41
children 19ff7845d5f7
files lisp/progmodes/compile.el
diffstat 1 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/compile.el	Mon Jan 11 15:30:06 1999 +0000
+++ b/lisp/progmodes/compile.el	Mon Jan 11 17:37:34 1999 +0000
@@ -971,6 +971,20 @@
 				     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.
 With arg, turn compilation mode on if and only if arg is positive.