From e4019195fdc2c3c121057ab29f7f1045b656db81 Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Tue, 4 Sep 2007 23:28:49 +0000 Subject: [PATCH] * server.el (server-start, server-unload-hook): Undo previous change. * xt-mouse.el: Undo previous change. * term.c (Vsuspend_tty_functions, Vresume_tty_functions) (syms_of_term, Fsuspend_tty, Fresume_tty): Undo previous change. --- etc/NEWS | 4 ++-- lisp/ChangeLog | 7 +++++++ lisp/server.el | 4 ++-- lisp/xt-mouse.el | 4 ++-- src/ChangeLog | 5 +++++ src/term.c | 28 ++++++++++++++-------------- 6 files changed, 32 insertions(+), 20 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index e6961286fa5..bd147587acd 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -236,9 +236,9 @@ session, and `make-frame-on-tty' works during a graphical session. `terminal-parameter', `set-terminal-parameter', `modify-terminal-parameters'. -*** New hooks: `suspend-tty-hook' and `resume-tty-hook' +*** New hooks: `suspend-tty-functions' and `resume-tty-functions' are called after a tty frame has been suspended or resumed, -respectively. The hooks are called with the terminal id of the frame +respectively. The functions are called with the terminal id of the frame being suspended/resumed as a parameter. *** New functions: `environment', `let-environment'. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0d1881db8f9..c237c28d24a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2007-09-04 Dan Nicolaescu + + * server.el (server-start, server-unload-hook): Undo previous + change. + + * xt-mouse.el: Undo previous change. + 2007-09-04 Juri Linkov * startup.el (fancy-about-text): New variable. diff --git a/lisp/server.el b/lisp/server.el index 44dbb8484a9..be271051095 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -485,7 +485,7 @@ kill any existing server communications subprocess." (when server-process (server-log (message "Restarting server"))) (letf (((default-file-modes) ?\700)) - (add-hook 'suspend-tty-hook 'server-handle-suspend-tty) + (add-hook 'suspend-tty-functions 'server-handle-suspend-tty) (add-hook 'delete-frame-functions 'server-handle-delete-frame) (add-hook 'kill-buffer-query-functions 'server-kill-buffer-query-function) (add-hook 'kill-emacs-query-functions 'server-kill-emacs-query-function) @@ -1225,7 +1225,7 @@ only these files will be asked to be saved." (defun server-unload-hook () "Unload the server library." (server-mode -1) - (remove-hook 'suspend-tty-hook 'server-handle-suspend-tty) + (remove-hook 'suspend-tty-functions 'server-handle-suspend-tty) (remove-hook 'delete-frame-functions 'server-handle-delete-frame) (remove-hook 'kill-buffer-query-functions 'server-kill-buffer-query-function) (remove-hook 'kill-emacs-query-functions 'server-kill-emacs-query-function) diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el index 9a2603d57c8..af7a3789df0 100644 --- a/lisp/xt-mouse.el +++ b/lisp/xt-mouse.el @@ -251,8 +251,8 @@ down the SHIFT key while pressing the mouse button." (add-hook 'delete-frame-functions 'xterm-mouse-handle-delete-frame) ;; Restore normal mouse behaviour outside Emacs. -(add-hook 'suspend-tty-hook 'turn-off-xterm-mouse-tracking-on-terminal) -(add-hook 'resume-tty-hook 'turn-on-xterm-mouse-tracking-on-terminal) +(add-hook 'suspend-tty-functions 'turn-off-xterm-mouse-tracking-on-terminal) +(add-hook 'resume-tty-functions 'turn-on-xterm-mouse-tracking-on-terminal) (add-hook 'suspend-hook 'turn-off-xterm-mouse-tracking) (add-hook 'suspend-resume-hook 'turn-on-xterm-mouse-tracking) (add-hook 'kill-emacs-hook 'turn-off-xterm-mouse-tracking) diff --git a/src/ChangeLog b/src/ChangeLog index 2533d5f0c6c..0675b3a7ad1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2007-09-04 Dan Nicolaescu + + * term.c (Vsuspend_tty_functions, Vresume_tty_functions) + (syms_of_term, Fsuspend_tty, Fresume_tty): Undo previous change. + 2007-09-04 Jason Rumney * term.c (init_tty) [WINDOWSNT]: Add hooks that are not accessible diff --git a/src/term.c b/src/term.c index d8bf5647e2d..98d3b868349 100644 --- a/src/term.c +++ b/src/term.c @@ -124,10 +124,10 @@ static int visible_cursor; extern Lisp_Object Qspace, QCalign_to, QCwidth; /* Functions to call after suspending a tty. */ -Lisp_Object Vsuspend_tty_hook; +Lisp_Object Vsuspend_tty_functions; /* Functions to call after resuming a tty. */ -Lisp_Object Vresume_tty_hook; +Lisp_Object Vresume_tty_functions; /* Chain of all tty device parameters. */ struct tty_display_info *tty_list; @@ -2229,7 +2229,7 @@ not updated. TTY may be a terminal id, a frame, or nil for the terminal device of the currently selected frame. -This function runs `suspend-tty-hook' after suspending the +This function runs `suspend-tty-functions' after suspending the device. The functions are run with one arg, the id of the suspended terminal device. @@ -2264,11 +2264,11 @@ A suspended tty may be resumed by calling `resume-tty' on it. */) if (FRAMEP (t->display_info.tty->top_frame)) FRAME_SET_VISIBLE (XFRAME (t->display_info.tty->top_frame), 0); - /* Run `suspend-tty-hook'. */ + /* Run `suspend-tty-functions'. */ if (!NILP (Vrun_hooks)) { Lisp_Object args[2]; - args[0] = intern ("suspend-tty-hook"); + args[0] = intern ("suspend-tty-functions"); args[1] = make_number (t->id); Frun_hook_with_args (2, args); } @@ -2288,7 +2288,7 @@ suspended terminal are revived. It is an error to resume a terminal while another terminal is active on the same device. -This function runs `resume-tty-hook' after resuming the terminal. +This function runs `resume-tty-functions' after resuming the terminal. The functions are run with one arg, the id of the resumed terminal device. @@ -2329,11 +2329,11 @@ the currently selected frame. */) init_sys_modes (t->display_info.tty); - /* Run `resume-tty-hook'. */ + /* Run `resume-tty-functions'. */ if (!NILP (Vrun_hooks)) { Lisp_Object args[2]; - args[0] = intern ("resume-tty-hook"); + args[0] = intern ("resume-tty-functions"); args[1] = make_number (t->id); Frun_hook_with_args (2, args); } @@ -3875,18 +3875,18 @@ This variable can be used by terminal emulator packages. */); system_uses_terminfo = 0; #endif - DEFVAR_LISP ("suspend-tty-hook", &Vsuspend_tty_hook, - doc: /* Hook to be run after suspending a tty. + DEFVAR_LISP ("suspend-tty-functions", &Vsuspend_tty_functions, + doc: /* Functions to be run after suspending a tty. The functions are run with one argument, the terminal id to be suspended. See `suspend-tty'. */); - Vsuspend_tty_hook = Qnil; + Vsuspend_tty_functions = Qnil; - DEFVAR_LISP ("resume-tty-hook", &Vresume_tty_hook, - doc: /* Hook to be run after resuming a tty. + DEFVAR_LISP ("resume-tty-functions", &Vresume_tty_functions, + doc: /* Functions to be run after resuming a tty. The functions are run with one argument, the terminal id that was revived. See `resume-tty'. */); - Vresume_tty_hook = Qnil; + Vresume_tty_functions = Qnil; DEFVAR_BOOL ("visible-cursor", &visible_cursor, doc: /* Non-nil means to make the cursor very visible. -- 2.39.5