aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Nicolaescu2007-09-21 20:19:10 +0000
committerDan Nicolaescu2007-09-21 20:19:10 +0000
commit23d4cba5c7601c1a3bb3d2c79e535dab8d9adac0 (patch)
tree1b638a1e924d8a7af594c2ceb392e3d7932ba645
parent71f44e7ad49b434c191a84fcd46a7dfa94894735 (diff)
downloademacs-23d4cba5c7601c1a3bb3d2c79e535dab8d9adac0.tar.gz
emacs-23d4cba5c7601c1a3bb3d2c79e535dab8d9adac0.zip
* xt-mouse.el (xterm-mouse-mode): Re-enable suspend-tty-functions.
* term.c (Fsuspend_tty): Run suspend-tty-functions before cleaning up the tty state.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/xt-mouse.el15
-rw-r--r--src/ChangeLog5
-rw-r--r--src/term.c19
4 files changed, 24 insertions, 19 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ef920fda5bb..d81faec84fb 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12007-09-21 Dan Nicolaescu <dann@ics.uci.edu>
2
3 * xt-mouse.el (xterm-mouse-mode): Re-enable suspend-tty-functions.
4
12007-09-21 Juanma Barranquero <lekktu@gmail.com> 52007-09-21 Juanma Barranquero <lekktu@gmail.com>
2 6
3 * frame.el (suspend-frame): Call `iconify-or-deiconify-frame' also 7 * frame.el (suspend-frame): Call `iconify-or-deiconify-frame' also
diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el
index 49f1886f878..15aebb08ab2 100644
--- a/lisp/xt-mouse.el
+++ b/lisp/xt-mouse.el
@@ -214,15 +214,8 @@ down the SHIFT key while pressing the mouse button."
214 (add-hook 'delete-frame-functions 'xterm-mouse-handle-delete-frame) 214 (add-hook 'delete-frame-functions 'xterm-mouse-handle-delete-frame)
215 215
216 ;; Restore normal mouse behaviour outside Emacs. 216 ;; Restore normal mouse behaviour outside Emacs.
217 217 (add-hook 'suspend-tty-functions
218 ;; Temporarily disable this hook, it does not work, when 218 'turn-off-xterm-mouse-tracking-on-terminal)
219 ;; `suspend-tty' calls `suspend-tty-functions' the tty->output
220 ;; is already set to 0 so the 'send-string-to-terminal' call
221 ;; in `turn-off-xterm-mouse-tracking-on-terminal' will result
222 ;; in a crash.
223 ;; (add-hook 'suspend-tty-functions
224 ;; 'turn-off-xterm-mouse-tracking-on-terminal)
225
226 (add-hook 'resume-tty-functions 219 (add-hook 'resume-tty-functions
227 'turn-on-xterm-mouse-tracking-on-terminal) 220 'turn-on-xterm-mouse-tracking-on-terminal)
228 (add-hook 'suspend-hook 'turn-off-xterm-mouse-tracking) 221 (add-hook 'suspend-hook 'turn-off-xterm-mouse-tracking)
@@ -234,8 +227,8 @@ down the SHIFT key while pressing the mouse button."
234 (remove-hook 'after-make-frame-functions 227 (remove-hook 'after-make-frame-functions
235 'turn-on-xterm-mouse-tracking-on-terminal) 228 'turn-on-xterm-mouse-tracking-on-terminal)
236 (remove-hook 'delete-frame-functions 'xterm-mouse-handle-delete-frame) 229 (remove-hook 'delete-frame-functions 'xterm-mouse-handle-delete-frame)
237 ;; (remove-hook 'suspend-tty-functions 230 (remove-hook 'suspend-tty-functions
238 ;; 'turn-off-xterm-mouse-tracking-on-terminal) 231 'turn-off-xterm-mouse-tracking-on-terminal)
239 (remove-hook 'resume-tty-functions 232 (remove-hook 'resume-tty-functions
240 'turn-on-xterm-mouse-tracking-on-terminal) 233 'turn-on-xterm-mouse-tracking-on-terminal)
241 (remove-hook 'suspend-hook 'turn-off-xterm-mouse-tracking) 234 (remove-hook 'suspend-hook 'turn-off-xterm-mouse-tracking)
diff --git a/src/ChangeLog b/src/ChangeLog
index 5e31ba344fd..3d3b64588e3 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12007-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
12007-09-21 Stefan Monnier <monnier@iro.umontreal.ca> 62007-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. */