Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
b7d2ebbf
Commit
b7d2ebbf
authored
Feb 19, 1993
by
Richard M. Stallman
Browse files
(Fsuspend_emacs): Rename suspend-hook to suspend-hooks and run it manually.
parent
5cba3869
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
12 deletions
+17
-12
src/keyboard.c
src/keyboard.c
+17
-12
No files found.
src/keyboard.c
View file @
b7d2ebbf
...
...
@@ -3770,14 +3770,15 @@ DEFUN ("suspend-emacs", Fsuspend_emacs, Ssuspend_emacs, 0, 1, "",
"Stop Emacs and return to superior process. You can resume later.
\n
\
On systems that don't have job control, run a subshell instead.
\n\n
\
If optional arg STUFFSTRING is non-nil, its characters are stuffed
\n
\
to be read as terminal input by Emacs's superior shell.
\n
\
Before suspending, if `suspend-hook' is bound and value is non-nil
\n
\
call the value as a function of no args. Don't suspend if it returns non-nil.
\n
\
Otherwise, suspend normally and after resumption call
\n
\
to be read as terminal input by Emacs's parent, after suspension.
\n
\
\n
\
Before suspending, call the functions in `suspend-hooks' with no args.
\n
\
If any of them returns nil, don't call the rest and don't suspend.
\n
\
Otherwise, suspend normally and after resumption run the normal hook
\n
\
`suspend-resume-hook' if that is bound and non-nil.
\n
\
\n
\
Some operating systems cannot stop the Emacs process and resume it later.
\n
\
On such systems, Emacs
will
start a subshell
and wait for it to exit
."
)
On such systems, Emacs start
s
a subshell
instead of suspending
."
)
(
stuffstring
)
Lisp_Object
stuffstring
;
{
...
...
@@ -3785,21 +3786,25 @@ On such systems, Emacs will start a subshell and wait for it to exit.")
int
count
=
specpdl_ptr
-
specpdl
;
int
old_height
,
old_width
;
int
width
,
height
;
struct
gcpro
gcpro1
;
struct
gcpro
gcpro1
,
gcpro2
;
extern
init_sys_modes
();
if
(
!
NILP
(
stuffstring
))
CHECK_STRING
(
stuffstring
,
0
);
GCPRO1
(
stuffstring
);
/*
Call value of
suspend-hook
if it is bound and value is non-nil. */
if
(
!
NILP
(
Vrun_hooks
))
/*
Run the functions in
suspend-hook
s. */
tem
=
Fsymbol_value
(
intern
(
"suspend-hooks"
));
while
(
CONSP
(
tem
))
{
tem
=
call1
(
Vrun_hooks
,
intern
(
"suspend-hook"
));
if
(
!
EQ
(
tem
,
Qnil
))
return
Qnil
;
Lisp_Object
val
;
GCPRO2
(
stuffstring
,
tem
);
val
=
call0
(
Fcar
(
tem
));
UNGCPRO
;
tem
=
Fcdr
(
tem
);
if
(
!
EQ
(
val
,
Qnil
))
return
Qnil
;
}
GCPRO1
(
stuffstring
);
get_frame_size
(
&
old_width
,
&
old_height
);
reset_sys_modes
();
/* sys_suspend can get an error if it tries to fork a subshell
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment