Suspending SXEmacs means stopping SXEmacs temporarily and
returning control to its superior process, which is usually the shell.
This allows you to resume editing later in the same SXEmacs process,
with the same buffers, the same kill ring, the same undo history, and so
on. To resume SXEmacs, use the appropriate command in the parent
Some operating systems do not support suspension of jobs; on these systems, “suspension” actually creates a new shell temporarily as a subprocess of SXEmacs. Then you would exit the shell to return to SXEmacs.
Suspension is not useful with window systems such as X, because the SXEmacs job may not have a parent that can resume it again, and in any case you can give input to some other job such as a shell merely by moving to a different window. Nonetheless, you can use the suspend-or-iconify feature in this case.
This function stops SXEmacs and returns control to the superior process.
If and when the superior process resumes SXEmacs,
nil to its caller in Lisp.
If optional arg stuffstring is non-
nil, its characters are
sent to be read as terminal input by SXEmacs’s superior shell. The
characters in stuffstring are not echoed by the superior shell;
only the results appear.
suspend-emacs runs the normal hook
After the user resumes SXEmacs,
suspend-emacs runs the normal
suspend-resume-hook. See Hooks.
The next redisplay after resumption will redraw the entire screen,
unless the variable
no-redraw-on-reenter is non-
(see Refresh Screen).
In the following example, note that ‘pwd’ is not echoed after SXEmacs is suspended. But it is read and executed by the shell.
(suspend-emacs) ⇒ nil
(add-hook 'suspend-hook (function (lambda () (or (y-or-n-p "Really suspend? ") (error "Suspend cancelled"))))) ⇒ (lambda nil (or (y-or-n-p "Really suspend? ") (error "Suspend cancelled")))
(add-hook 'suspend-resume-hook (function (lambda () (message "Resumed!")))) ⇒ (lambda nil (message "Resumed!"))
(suspend-emacs "pwd") ⇒ nil
---------- Buffer: Minibuffer ---------- Really suspend? y ---------- Buffer: Minibuffer ----------
---------- Parent Shell ---------- lewis@slug % /user/lewis/manual lewis@slug % fg
---------- Echo Area ---------- Resumed!
This variable is a normal hook run before suspending.
This variable is a normal hook run after suspending.