aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKarl Heuer1994-02-26 05:54:26 +0000
committerKarl Heuer1994-02-26 05:54:26 +0000
commit8026024c1bbe372d3702b53e221db3bdb30f88d8 (patch)
treeb004889d38c241900af9719fe4dc25db84fe57b9 /src
parente48f95c966b2442063fbad785cb0b04f29a5985e (diff)
downloademacs-8026024c1bbe372d3702b53e221db3bdb30f88d8.tar.gz
emacs-8026024c1bbe372d3702b53e221db3bdb30f88d8.zip
(Fsuspend_emacs): New variable cannot-suspend forces a subshell even if the
system seems to support job control.
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index f9ba311624e..6d190e213d1 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -474,6 +474,10 @@ static char echobuf[300];
474/* Where to append more text to echobuf if we want to. */ 474/* Where to append more text to echobuf if we want to. */
475static char *echoptr; 475static char *echoptr;
476 476
477/* Nonzero means don't try to suspend even if the operating system seems
478 to support it. */
479static int cannot_suspend;
480
477#define min(a,b) ((a)<(b)?(a):(b)) 481#define min(a,b) ((a)<(b)?(a):(b))
478#define max(a,b) ((a)>(b)?(a):(b)) 482#define max(a,b) ((a)>(b)?(a):(b))
479 483
@@ -5160,7 +5164,8 @@ Also cancel any kbd macro being defined.")
5160 5164
5161DEFUN ("suspend-emacs", Fsuspend_emacs, Ssuspend_emacs, 0, 1, "", 5165DEFUN ("suspend-emacs", Fsuspend_emacs, Ssuspend_emacs, 0, 1, "",
5162 "Stop Emacs and return to superior process. You can resume later.\n\ 5166 "Stop Emacs and return to superior process. You can resume later.\n\
5163On systems that don't have job control, run a subshell instead.\n\n\ 5167If `cannot-suspend' is non-nil, or if the system doesn't support job\n\
5168control, run a subshell instead.\n\n\
5164If optional arg STUFFSTRING is non-nil, its characters are stuffed\n\ 5169If optional arg STUFFSTRING is non-nil, its characters are stuffed\n\
5165to be read as terminal input by Emacs's parent, after suspension.\n\ 5170to be read as terminal input by Emacs's parent, after suspension.\n\
5166\n\ 5171\n\
@@ -5195,7 +5200,10 @@ On such systems, Emacs starts a subshell instead of suspending.")
5195 and the system resources aren't available for that. */ 5200 and the system resources aren't available for that. */
5196 record_unwind_protect (init_sys_modes, 0); 5201 record_unwind_protect (init_sys_modes, 0);
5197 stuff_buffered_input (stuffstring); 5202 stuff_buffered_input (stuffstring);
5198 sys_suspend (); 5203 if (cannot_suspend)
5204 sys_subshell ();
5205 else
5206 sys_suspend ();
5199 unbind_to (count, Qnil); 5207 unbind_to (count, Qnil);
5200 5208
5201 /* Check if terminal/window size has changed. 5209 /* Check if terminal/window size has changed.
@@ -5841,6 +5849,11 @@ This keymap works like `function-key-map', but comes after that,\n\
5841and applies even for keys that have ordinary bindings."); 5849and applies even for keys that have ordinary bindings.");
5842 Vkey_translation_map = Qnil; 5850 Vkey_translation_map = Qnil;
5843 5851
5852 DEFVAR_BOOL ("cannot-suspend", &cannot_suspend,
5853 "Non-nil means to always spawn a subshell instead of suspending,\n\
5854even if the operating system has support for stopping a process.");
5855 cannot_suspend = 0;
5856
5844 DEFVAR_BOOL ("menu-prompting", &menu_prompting, 5857 DEFVAR_BOOL ("menu-prompting", &menu_prompting,
5845 "Non-nil means prompt with menus when appropriate.\n\ 5858 "Non-nil means prompt with menus when appropriate.\n\
5846This is done when reading from a keymap that has a prompt string,\n\ 5859This is done when reading from a keymap that has a prompt string,\n\