From: Miles Bader Date: Sun, 15 Jul 2007 02:05:20 +0000 (+0000) Subject: Merge from emacs--devo--0 X-Git-Tag: emacs-pretest-23.0.90~11236^2~66 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7eb1e4534e88a32fe5e549e630fdabf3e062be2b;p=emacs.git Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 803-813) - Update from CVS - Merge from emacs--rel--22 * emacs--rel--22 (patch 51-58) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 233-236) - Merge from emacs--devo--0 - Update from CVS Revision: emacs@sv.gnu.org/emacs--multi-tty--0--patch-25 --- 7eb1e4534e88a32fe5e549e630fdabf3e062be2b diff --cc lisp/term/w32-win.el index 2bb9cde0ce7,fca3f9ce4d2..cd98e490c52 --- a/lisp/term/w32-win.el +++ b/lisp/term/w32-win.el @@@ -1036,21 -1039,58 +1036,30 @@@ XConsortium: rgb.txt,v 10.41 94/02/20 1 ;;;; Function keys -;;; make f10 activate the real menubar rather than the mini-buffer menu -;;; navigation feature. -(defun menu-bar-open (&optional frame) - "Start key navigation of the menu bar in FRAME. - -This initially activates the first menu-bar item, and you can then navigate -with the arrow keys, select a menu entry with the Return key or cancel with -the Escape key. If FRAME has no menu bar, this function does nothing. - -If FRAME is nil or not given, use the selected frame." - (interactive "i") - (w32-send-sys-command ?\xf100 frame)) -; -(global-set-key [f10] 'menu-bar-open) - -(substitute-key-definition 'suspend-emacs 'iconify-or-deiconify-frame - global-map) - -(define-key function-key-map [S-tab] [backtab]) - ++ ;;; make f10 activate the real menubar rather than the mini-buffer menu ++ ;;; navigation feature. ++ (defun menu-bar-open (&optional frame) ++ "Start key navigation of the menu bar in FRAME. ++ ++ This initially activates the first menu-bar item, and you can then navigate ++ with the arrow keys, select a menu entry with the Return key or cancel with ++ the Escape key. If FRAME has no menu bar, this function does nothing. ++ ++ If FRAME is nil or not given, use the selected frame." ++ (interactive "i") ++ (w32-send-sys-command ?\xf100 frame)) ++ +(defun x-setup-function-keys (frame) + "Setup Function Keys for w32." - ;; make f10 activate the real menubar rather than the mini-buffer menu - ;; navigation feature. + (with-selected-frame frame - (define-key local-function-key-map [f10] - (lambda () - (interactive) (w32-send-sys-command ?\xf100))) ++ (define-key local-function-key-map [f10] 'menu-bar-open) + + (substitute-key-definition 'suspend-emacs 'iconify-or-deiconify-frame + local-function-key-map global-map) + + (define-key local-function-key-map [S-tab] [backtab])) + (set-terminal-parameter frame 'x-setup-function-keys t)) -;;; Do the actual Windows setup here; the above code just defines -;;; functions and variables that we use now. - -(setq command-line-args (x-handle-args command-line-args)) - -;;; Make sure we have a valid resource name. -(or (stringp x-resource-name) - (setq x-resource-name - ;; Change any . or * characters in x-resource-name to hyphens, - ;; so as not to choke when we use it in X resource queries. - (replace-regexp-in-string "[.*]" "-" (invocation-name)))) - -;; For the benefit of older Emacses (19.27 and earlier) that are sharing -;; the same lisp directory, don't pass the third argument unless we seem -;; to have the multi-display support. -(if (fboundp 'x-close-connection) - (x-open-connection "" - x-command-line-resources - ;; Exit Emacs with fatal error if this fails. - t) - (x-open-connection "" - x-command-line-resources)) - -(setq frame-creation-function 'x-create-frame-with-faces) - -(setq x-cut-buffer-max (min (- (/ (x-server-max-request-size) 2) 100) - x-cut-buffer-max)) - -;; W32 expects the menu bar cut and paste commands to use the clipboard. -;; This has ,? to match both on Sunos and on Solaris. -(menu-bar-enable-clipboard) ;; W32 systems have different fonts than commonly found on X, so ;; we define our own standard fontset here. diff --cc src/term.c index 122eab91bdb,b88448fc446..813fc29655c --- a/src/term.c +++ b/src/term.c @@@ -25,19 -25,13 +25,22 @@@ Boston, MA 02110-1301, USA. * #include #include #include +#include +#include - #include /* For isatty. */ ++ + #ifdef HAVE_UNISTD_H + #include + #endif +#if HAVE_TERMIOS_H +#include /* For TIOCNOTTY. */ +#endif + +#include + +#include "lisp.h" #include "termchar.h" #include "termopts.h" -#include "lisp.h" #include "charset.h" #include "coding.h" #include "keyboard.h" @@@ -2359,11 -2400,8 +2362,11 @@@ term_show_mouse_face (enum draw_glyphs_ { struct window *w = XWINDOW (Qmouse_face_window); int save_x, save_y; - int i, j; + int i; + struct frame *f = XFRAME (w->frame); + struct tty_display_info *tty = FRAME_TTY (f); + if (/* If window is in the process of being destroyed, don't bother to do anything. */ w->current_matrix != NULL @@@ -2879,10 -2917,10 +2882,10 @@@ term_mouse_click (struct input_event *r } int -handle_one_term_event (Gpm_Event *event, struct input_event* hold_quit) +handle_one_term_event (struct tty_display_info *tty, Gpm_Event *event, struct input_event* hold_quit) { - struct frame *f = SELECTED_FRAME (); + struct frame *f = XFRAME (tty->top_frame); - int i, j, fd; + int fd; struct input_event ie; int do_help = 0; int count = 0;