diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/term.c | 19 |
2 files changed, 16 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 5e31ba344fd..3d3b64588e3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2007-09-21 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 2 | |||
| 3 | * term.c (Fsuspend_tty): Run suspend-tty-functions before cleaning | ||
| 4 | up the tty state. | ||
| 5 | |||
| 1 | 2007-09-21 Stefan Monnier <monnier@iro.umontreal.ca> | 6 | 2007-09-21 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 7 | ||
| 3 | * termhooks.h (term_gpm): Delete. Use gpm_tty's NULLness instead. | 8 | * termhooks.h (term_gpm): Delete. Use gpm_tty's NULLness instead. |
diff --git a/src/term.c b/src/term.c index 160e387e98d..be3430574f7 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -2244,6 +2244,17 @@ A suspended tty may be resumed by calling `resume-tty' on it. */) | |||
| 2244 | 2244 | ||
| 2245 | if (f) | 2245 | if (f) |
| 2246 | { | 2246 | { |
| 2247 | /* First run `suspend-tty-functions' and then clean up the tty | ||
| 2248 | state because `suspend-tty-functions' might need to change | ||
| 2249 | the tty state. */ | ||
| 2250 | if (!NILP (Vrun_hooks)) | ||
| 2251 | { | ||
| 2252 | Lisp_Object args[2]; | ||
| 2253 | args[0] = intern ("suspend-tty-functions"); | ||
| 2254 | XSETTERMINAL (args[1], t); | ||
| 2255 | Frun_hook_with_args (2, args); | ||
| 2256 | } | ||
| 2257 | |||
| 2247 | reset_sys_modes (t->display_info.tty); | 2258 | reset_sys_modes (t->display_info.tty); |
| 2248 | 2259 | ||
| 2249 | delete_keyboard_wait_descriptor (fileno (f)); | 2260 | delete_keyboard_wait_descriptor (fileno (f)); |
| @@ -2258,14 +2269,6 @@ A suspended tty may be resumed by calling `resume-tty' on it. */) | |||
| 2258 | if (FRAMEP (t->display_info.tty->top_frame)) | 2269 | if (FRAMEP (t->display_info.tty->top_frame)) |
| 2259 | FRAME_SET_VISIBLE (XFRAME (t->display_info.tty->top_frame), 0); | 2270 | FRAME_SET_VISIBLE (XFRAME (t->display_info.tty->top_frame), 0); |
| 2260 | 2271 | ||
| 2261 | /* Run `suspend-tty-functions'. */ | ||
| 2262 | if (!NILP (Vrun_hooks)) | ||
| 2263 | { | ||
| 2264 | Lisp_Object args[2]; | ||
| 2265 | args[0] = intern ("suspend-tty-functions"); | ||
| 2266 | XSETTERMINAL (args[1], t); | ||
| 2267 | Frun_hook_with_args (2, args); | ||
| 2268 | } | ||
| 2269 | } | 2272 | } |
| 2270 | 2273 | ||
| 2271 | /* Clear display hooks to prevent further output. */ | 2274 | /* Clear display hooks to prevent further output. */ |