comparison src/keyboard.c @ 83353:532e0a9335a9

Merged in changes from CVS trunk. Plus added lisp/term tweaks. Patches applied: * lorentey@elte.hu--2004/emacs--cvs-trunk--0--base-0 tag of miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-474 * lorentey@elte.hu--2004/emacs--cvs-trunk--0--patch-1 Add CVS metadata files. * lorentey@elte.hu--2004/emacs--cvs-trunk--0--patch-2 Update from CVS. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-393
author Karoly Lorentey <lorentey@elte.hu>
date Sun, 04 Sep 2005 03:48:17 +0000
parents 7372c2f9daac 2aed3dcccd0d
children 0b75ace4f7ad
comparison
equal deleted inserted replaced
83352:b258b3492423 83353:532e0a9335a9
1 /* Keyboard and mouse input; editor command loop. 1 /* Keyboard and mouse input; editor command loop.
2 Copyright (C) 1985, 1986, 1987, 1988, 1989, 1993, 1994, 1995, 1996, 1997, 2 Copyright (C) 1985, 1986, 1987, 1988, 1989, 1993, 1994, 1995,
3 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. 3 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004,
4 2005 Free Software Foundation, Inc.
4 5
5 This file is part of GNU Emacs. 6 This file is part of GNU Emacs.
6 7
7 GNU Emacs is free software; you can redistribute it and/or modify 8 GNU Emacs is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by 9 it under the terms of the GNU General Public License as published by
4008 obj = Fcons (event->frame_or_window, Qnil); 4009 obj = Fcons (event->frame_or_window, Qnil);
4009 obj = Fcons (Qdelete_frame, Fcons (obj, Qnil)); 4010 obj = Fcons (Qdelete_frame, Fcons (obj, Qnil));
4010 kbd_fetch_ptr = event + 1; 4011 kbd_fetch_ptr = event + 1;
4011 } 4012 }
4012 #endif 4013 #endif
4013 #if defined (HAVE_X11) || defined (HAVE_NTGUI) 4014 #if defined (HAVE_X11) || defined (HAVE_NTGUI) || defined (MAC_OS)
4014 else if (event->kind == ICONIFY_EVENT) 4015 else if (event->kind == ICONIFY_EVENT)
4015 { 4016 {
4016 /* Make an event (iconify-frame (FRAME)). */ 4017 /* Make an event (iconify-frame (FRAME)). */
4017 obj = Fcons (event->frame_or_window, Qnil); 4018 obj = Fcons (event->frame_or_window, Qnil);
4018 obj = Fcons (Qiconify_frame, Fcons (obj, Qnil)); 4019 obj = Fcons (Qiconify_frame, Fcons (obj, Qnil));
6999 int mapno; 7000 int mapno;
7000 Lisp_Object oquit; 7001 Lisp_Object oquit;
7001 7002
7002 int i; 7003 int i;
7003 7004
7004 struct gcpro gcpro1;
7005
7006 /* In order to build the menus, we need to call the keymap 7005 /* In order to build the menus, we need to call the keymap
7007 accessors. They all call QUIT. But this function is called 7006 accessors. They all call QUIT. But this function is called
7008 during redisplay, during which a quit is fatal. So inhibit 7007 during redisplay, during which a quit is fatal. So inhibit
7009 quitting while building the menus. 7008 quitting while building the menus.
7010 We do this instead of specbind because (1) errors will clear it anyway 7009 We do this instead of specbind because (1) errors will clear it anyway
7015 if (!NILP (old)) 7014 if (!NILP (old))
7016 menu_bar_items_vector = old; 7015 menu_bar_items_vector = old;
7017 else 7016 else
7018 menu_bar_items_vector = Fmake_vector (make_number (24), Qnil); 7017 menu_bar_items_vector = Fmake_vector (make_number (24), Qnil);
7019 menu_bar_items_index = 0; 7018 menu_bar_items_index = 0;
7020
7021 GCPRO1 (menu_bar_items_vector);
7022 7019
7023 /* Build our list of keymaps. 7020 /* Build our list of keymaps.
7024 If we recognize a function key and replace its escape sequence in 7021 If we recognize a function key and replace its escape sequence in
7025 keybuf with its symbol, or if the sequence starts with a mouse 7022 keybuf with its symbol, or if the sequence starts with a mouse
7026 click and we need to switch buffers, we jump back here to rebuild 7023 click and we need to switch buffers, we jump back here to rebuild
7121 XVECTOR (menu_bar_items_vector)->contents[i++] = Qnil; 7118 XVECTOR (menu_bar_items_vector)->contents[i++] = Qnil;
7122 XVECTOR (menu_bar_items_vector)->contents[i++] = Qnil; 7119 XVECTOR (menu_bar_items_vector)->contents[i++] = Qnil;
7123 menu_bar_items_index = i; 7120 menu_bar_items_index = i;
7124 7121
7125 Vinhibit_quit = oquit; 7122 Vinhibit_quit = oquit;
7126 UNGCPRO;
7127 return menu_bar_items_vector; 7123 return menu_bar_items_vector;
7128 } 7124 }
7129 7125
7130 /* Add one item to menu_bar_items_vector, for KEY, ITEM_STRING and DEF. 7126 /* Add one item to menu_bar_items_vector, for KEY, ITEM_STRING and DEF.
7131 If there's already an item for KEY, add this DEF to it. */ 7127 If there's already an item for KEY, add this DEF to it. */
11165 staticpro (&read_key_sequence_cmd); 11161 staticpro (&read_key_sequence_cmd);
11166 11162
11167 menu_bar_one_keymap_changed_items = Qnil; 11163 menu_bar_one_keymap_changed_items = Qnil;
11168 staticpro (&menu_bar_one_keymap_changed_items); 11164 staticpro (&menu_bar_one_keymap_changed_items);
11169 11165
11166 menu_bar_items_vector = Qnil;
11167 staticpro (&menu_bar_items_vector);
11168
11170 defsubr (&Sevent_convert_list); 11169 defsubr (&Sevent_convert_list);
11171 defsubr (&Sread_key_sequence); 11170 defsubr (&Sread_key_sequence);
11172 defsubr (&Sread_key_sequence_vector); 11171 defsubr (&Sread_key_sequence_vector);
11173 defsubr (&Srecursive_edit); 11172 defsubr (&Srecursive_edit);
11174 #ifdef HAVE_MOUSE 11173 #ifdef HAVE_MOUSE
11441 #if 0 11440 #if 0
11442 DEFVAR_LISP ("echo-area-clear-hook", ..., 11441 DEFVAR_LISP ("echo-area-clear-hook", ...,
11443 doc: /* Normal hook run when clearing the echo area. */); 11442 doc: /* Normal hook run when clearing the echo area. */);
11444 #endif 11443 #endif
11445 Qecho_area_clear_hook = intern ("echo-area-clear-hook"); 11444 Qecho_area_clear_hook = intern ("echo-area-clear-hook");
11445 staticpro (&Qecho_area_clear_hook);
11446 SET_SYMBOL_VALUE (Qecho_area_clear_hook, Qnil); 11446 SET_SYMBOL_VALUE (Qecho_area_clear_hook, Qnil);
11447 11447
11448 DEFVAR_LISP ("lucid-menu-bar-dirty-flag", &Vlucid_menu_bar_dirty_flag, 11448 DEFVAR_LISP ("lucid-menu-bar-dirty-flag", &Vlucid_menu_bar_dirty_flag,
11449 doc: /* Non-nil means menu bar, specified Lucid style, needs to be recomputed. */); 11449 doc: /* Non-nil means menu bar, specified Lucid style, needs to be recomputed. */);
11450 Vlucid_menu_bar_dirty_flag = Qnil; 11450 Vlucid_menu_bar_dirty_flag = Qnil;