diff options
| author | Chong Yidong | 2011-04-08 11:51:28 -0400 |
|---|---|---|
| committer | Chong Yidong | 2011-04-08 11:51:28 -0400 |
| commit | e0d38eebb37dfa2e9ab51e0106122dc10f9c75b2 (patch) | |
| tree | 725931c286606493ce117965a8c5cd713194f5d7 /src | |
| parent | cbb59342310c395a04b5dc85454938167793dd96 (diff) | |
| download | emacs-e0d38eebb37dfa2e9ab51e0106122dc10f9c75b2.tar.gz emacs-e0d38eebb37dfa2e9ab51e0106122dc10f9c75b2.zip | |
* keyboard.c (syms_of_keyboard): Use DEFSYM macro.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 1 | ||||
| -rw-r--r-- | src/keyboard.c | 219 |
2 files changed, 72 insertions, 148 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index e74643be30a..7f0dc9a8e26 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | * keyboard.c (read_char): Call Lisp function help-form-show, | 3 | * keyboard.c (read_char): Call Lisp function help-form-show, |
| 4 | instead of using internal_with_output_to_temp_buffer. | 4 | instead of using internal_with_output_to_temp_buffer. |
| 5 | (Qhelp_form_show): New var. | 5 | (Qhelp_form_show): New var. |
| 6 | (syms_of_keyboard): Use DEFSYM macro. | ||
| 6 | 7 | ||
| 7 | * print.c (internal_with_output_to_temp_buffer): Function deleted. | 8 | * print.c (internal_with_output_to_temp_buffer): Function deleted. |
| 8 | 9 | ||
diff --git a/src/keyboard.c b/src/keyboard.c index 70bd47181b1..5a3031259d9 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -11439,14 +11439,9 @@ syms_of_keyboard (void) | |||
| 11439 | staticpro (&Vlispy_mouse_stem); | 11439 | staticpro (&Vlispy_mouse_stem); |
| 11440 | 11440 | ||
| 11441 | /* Tool-bars. */ | 11441 | /* Tool-bars. */ |
| 11442 | QCimage = intern_c_string (":image"); | 11442 | DEFSYM (QCimage, ":image"); |
| 11443 | staticpro (&QCimage); | 11443 | DEFSYM (Qhelp_echo, "help-echo"); |
| 11444 | 11444 | DEFSYM (Qrtl, ":rtl"); | |
| 11445 | staticpro (&Qhelp_echo); | ||
| 11446 | Qhelp_echo = intern_c_string ("help-echo"); | ||
| 11447 | |||
| 11448 | staticpro (&Qrtl); | ||
| 11449 | Qrtl = intern_c_string (":rtl"); | ||
| 11450 | 11445 | ||
| 11451 | staticpro (&item_properties); | 11446 | staticpro (&item_properties); |
| 11452 | item_properties = Qnil; | 11447 | item_properties = Qnil; |
| @@ -11459,150 +11454,81 @@ syms_of_keyboard (void) | |||
| 11459 | staticpro (&real_this_command); | 11454 | staticpro (&real_this_command); |
| 11460 | real_this_command = Qnil; | 11455 | real_this_command = Qnil; |
| 11461 | 11456 | ||
| 11462 | Qtimer_event_handler = intern_c_string ("timer-event-handler"); | 11457 | DEFSYM (Qtimer_event_handler, "timer-event-handler"); |
| 11463 | staticpro (&Qtimer_event_handler); | 11458 | DEFSYM (Qdisabled_command_function, "disabled-command-function"); |
| 11464 | 11459 | DEFSYM (Qself_insert_command, "self-insert-command"); | |
| 11465 | Qdisabled_command_function = intern_c_string ("disabled-command-function"); | 11460 | DEFSYM (Qforward_char, "forward-char"); |
| 11466 | staticpro (&Qdisabled_command_function); | 11461 | DEFSYM (Qbackward_char, "backward-char"); |
| 11467 | 11462 | DEFSYM (Qdisabled, "disabled"); | |
| 11468 | Qself_insert_command = intern_c_string ("self-insert-command"); | 11463 | DEFSYM (Qundefined, "undefined"); |
| 11469 | staticpro (&Qself_insert_command); | 11464 | DEFSYM (Qpre_command_hook, "pre-command-hook"); |
| 11465 | DEFSYM (Qpost_command_hook, "post-command-hook"); | ||
| 11466 | DEFSYM (Qdeferred_action_function, "deferred-action-function"); | ||
| 11467 | DEFSYM (Qfunction_key, "function-key"); | ||
| 11468 | DEFSYM (Qmouse_click, "mouse-click"); | ||
| 11469 | DEFSYM (Qdrag_n_drop, "drag-n-drop"); | ||
| 11470 | DEFSYM (Qsave_session, "save-session"); | ||
| 11471 | DEFSYM (Qconfig_changed_event, "config-changed-event"); | ||
| 11472 | DEFSYM (Qmenu_enable, "menu-enable"); | ||
| 11470 | 11473 | ||
| 11471 | Qforward_char = intern_c_string ("forward-char"); | 11474 | #if defined (WINDOWSNT) |
| 11472 | staticpro (&Qforward_char); | 11475 | DEFSYM (Qlanguage_change, "language-change"); |
| 11473 | 11476 | #endif | |
| 11474 | Qbackward_char = intern_c_string ("backward-char"); | ||
| 11475 | staticpro (&Qbackward_char); | ||
| 11476 | 11477 | ||
| 11477 | Qdisabled = intern_c_string ("disabled"); | 11478 | #ifdef HAVE_DBUS |
| 11478 | staticpro (&Qdisabled); | 11479 | DEFSYM (Qdbus_event, "dbus-event"); |
| 11480 | #endif | ||
| 11481 | |||
| 11482 | DEFSYM (QCenable, ":enable"); | ||
| 11483 | DEFSYM (QCvisible, ":visible"); | ||
| 11484 | DEFSYM (QChelp, ":help"); | ||
| 11485 | DEFSYM (QCfilter, ":filter"); | ||
| 11486 | DEFSYM (QCbutton, ":button"); | ||
| 11487 | DEFSYM (QCkeys, ":keys"); | ||
| 11488 | DEFSYM (QCkey_sequence, ":key-sequence"); | ||
| 11489 | DEFSYM (QCtoggle, ":toggle"); | ||
| 11490 | DEFSYM (QCradio, ":radio"); | ||
| 11491 | DEFSYM (QClabel, ":label"); | ||
| 11492 | DEFSYM (QCvert_only, ":vert-only"); | ||
| 11493 | |||
| 11494 | DEFSYM (Qmode_line, "mode-line"); | ||
| 11495 | DEFSYM (Qvertical_line, "vertical-line"); | ||
| 11496 | DEFSYM (Qvertical_scroll_bar, "vertical-scroll-bar"); | ||
| 11497 | DEFSYM (Qmenu_bar, "menu-bar"); | ||
| 11479 | 11498 | ||
| 11480 | Qundefined = intern_c_string ("undefined"); | 11499 | #if defined (HAVE_MOUSE) || defined (HAVE_GPM) |
| 11481 | staticpro (&Qundefined); | 11500 | DEFSYM (Qmouse_fixup_help_message, "mouse-fixup-help-message"); |
| 11501 | #endif | ||
| 11482 | 11502 | ||
| 11483 | Qpre_command_hook = intern_c_string ("pre-command-hook"); | 11503 | DEFSYM (Qabove_handle, "above-handle"); |
| 11484 | staticpro (&Qpre_command_hook); | 11504 | DEFSYM (Qhandle, "handle"); |
| 11505 | DEFSYM (Qbelow_handle, "below-handle"); | ||
| 11506 | DEFSYM (Qup, "up"); | ||
| 11507 | DEFSYM (Qdown, "down"); | ||
| 11508 | DEFSYM (Qtop, "top"); | ||
| 11509 | DEFSYM (Qbottom, "bottom"); | ||
| 11510 | DEFSYM (Qend_scroll, "end-scroll"); | ||
| 11511 | DEFSYM (Qratio, "ratio"); | ||
| 11485 | 11512 | ||
| 11486 | Qpost_command_hook = intern_c_string ("post-command-hook"); | 11513 | DEFSYM (Qevent_kind, "event-kind"); |
| 11487 | staticpro (&Qpost_command_hook); | 11514 | DEFSYM (Qevent_symbol_elements, "event-symbol-elements"); |
| 11515 | DEFSYM (Qevent_symbol_element_mask, "event-symbol-element-mask"); | ||
| 11516 | DEFSYM (Qmodifier_cache, "modifier-cache"); | ||
| 11488 | 11517 | ||
| 11489 | Qdeferred_action_function = intern_c_string ("deferred-action-function"); | 11518 | DEFSYM (Qrecompute_lucid_menubar, "recompute-lucid-menubar"); |
| 11490 | staticpro (&Qdeferred_action_function); | 11519 | DEFSYM (Qactivate_menubar_hook, "activate-menubar-hook"); |
| 11491 | 11520 | ||
| 11492 | Qfunction_key = intern_c_string ("function-key"); | 11521 | DEFSYM (Qpolling_period, "polling-period"); |
| 11493 | staticpro (&Qfunction_key); | ||
| 11494 | Qmouse_click = intern_c_string ("mouse-click"); | ||
| 11495 | staticpro (&Qmouse_click); | ||
| 11496 | #if defined (WINDOWSNT) | ||
| 11497 | Qlanguage_change = intern_c_string ("language-change"); | ||
| 11498 | staticpro (&Qlanguage_change); | ||
| 11499 | #endif | ||
| 11500 | Qdrag_n_drop = intern_c_string ("drag-n-drop"); | ||
| 11501 | staticpro (&Qdrag_n_drop); | ||
| 11502 | 11522 | ||
| 11503 | Qsave_session = intern_c_string ("save-session"); | 11523 | DEFSYM (Qx_set_selection, "x-set-selection"); |
| 11504 | staticpro (&Qsave_session); | 11524 | DEFSYM (QPRIMARY, "PRIMARY"); |
| 11525 | DEFSYM (Qhandle_switch_frame, "handle-switch-frame"); | ||
| 11505 | 11526 | ||
| 11506 | #ifdef HAVE_DBUS | 11527 | DEFSYM (Qinput_method_function, "input-method-function"); |
| 11507 | Qdbus_event = intern_c_string ("dbus-event"); | 11528 | DEFSYM (Qinput_method_exit_on_first_char, "input-method-exit-on-first-char"); |
| 11508 | staticpro (&Qdbus_event); | 11529 | DEFSYM (Qinput_method_use_echo_area, "input-method-use-echo-area"); |
| 11509 | #endif | ||
| 11510 | |||
| 11511 | Qconfig_changed_event = intern_c_string ("config-changed-event"); | ||
| 11512 | staticpro (&Qconfig_changed_event); | ||
| 11513 | |||
| 11514 | Qmenu_enable = intern_c_string ("menu-enable"); | ||
| 11515 | staticpro (&Qmenu_enable); | ||
| 11516 | QCenable = intern_c_string (":enable"); | ||
| 11517 | staticpro (&QCenable); | ||
| 11518 | QCvisible = intern_c_string (":visible"); | ||
| 11519 | staticpro (&QCvisible); | ||
| 11520 | QChelp = intern_c_string (":help"); | ||
| 11521 | staticpro (&QChelp); | ||
| 11522 | QCfilter = intern_c_string (":filter"); | ||
| 11523 | staticpro (&QCfilter); | ||
| 11524 | QCbutton = intern_c_string (":button"); | ||
| 11525 | staticpro (&QCbutton); | ||
| 11526 | QCkeys = intern_c_string (":keys"); | ||
| 11527 | staticpro (&QCkeys); | ||
| 11528 | QCkey_sequence = intern_c_string (":key-sequence"); | ||
| 11529 | staticpro (&QCkey_sequence); | ||
| 11530 | QCtoggle = intern_c_string (":toggle"); | ||
| 11531 | staticpro (&QCtoggle); | ||
| 11532 | QCradio = intern_c_string (":radio"); | ||
| 11533 | staticpro (&QCradio); | ||
| 11534 | QClabel = intern_c_string (":label"); | ||
| 11535 | staticpro (&QClabel); | ||
| 11536 | QCvert_only = intern_c_string (":vert-only"); | ||
| 11537 | staticpro (&QCvert_only); | ||
| 11538 | |||
| 11539 | Qmode_line = intern_c_string ("mode-line"); | ||
| 11540 | staticpro (&Qmode_line); | ||
| 11541 | Qvertical_line = intern_c_string ("vertical-line"); | ||
| 11542 | staticpro (&Qvertical_line); | ||
| 11543 | Qvertical_scroll_bar = intern_c_string ("vertical-scroll-bar"); | ||
| 11544 | staticpro (&Qvertical_scroll_bar); | ||
| 11545 | Qmenu_bar = intern_c_string ("menu-bar"); | ||
| 11546 | staticpro (&Qmenu_bar); | ||
| 11547 | 11530 | ||
| 11548 | #if defined (HAVE_MOUSE) || defined (HAVE_GPM) | 11531 | DEFSYM (Qhelp_form_show, "help-form-show"); |
| 11549 | Qmouse_fixup_help_message = intern_c_string ("mouse-fixup-help-message"); | ||
| 11550 | staticpro (&Qmouse_fixup_help_message); | ||
| 11551 | #endif | ||
| 11552 | |||
| 11553 | Qabove_handle = intern_c_string ("above-handle"); | ||
| 11554 | staticpro (&Qabove_handle); | ||
| 11555 | Qhandle = intern_c_string ("handle"); | ||
| 11556 | staticpro (&Qhandle); | ||
| 11557 | Qbelow_handle = intern_c_string ("below-handle"); | ||
| 11558 | staticpro (&Qbelow_handle); | ||
| 11559 | Qup = intern_c_string ("up"); | ||
| 11560 | staticpro (&Qup); | ||
| 11561 | Qdown = intern_c_string ("down"); | ||
| 11562 | staticpro (&Qdown); | ||
| 11563 | Qtop = intern_c_string ("top"); | ||
| 11564 | staticpro (&Qtop); | ||
| 11565 | Qbottom = intern_c_string ("bottom"); | ||
| 11566 | staticpro (&Qbottom); | ||
| 11567 | Qend_scroll = intern_c_string ("end-scroll"); | ||
| 11568 | staticpro (&Qend_scroll); | ||
| 11569 | Qratio = intern_c_string ("ratio"); | ||
| 11570 | staticpro (&Qratio); | ||
| 11571 | |||
| 11572 | Qevent_kind = intern_c_string ("event-kind"); | ||
| 11573 | staticpro (&Qevent_kind); | ||
| 11574 | Qevent_symbol_elements = intern_c_string ("event-symbol-elements"); | ||
| 11575 | staticpro (&Qevent_symbol_elements); | ||
| 11576 | Qevent_symbol_element_mask = intern_c_string ("event-symbol-element-mask"); | ||
| 11577 | staticpro (&Qevent_symbol_element_mask); | ||
| 11578 | Qmodifier_cache = intern_c_string ("modifier-cache"); | ||
| 11579 | staticpro (&Qmodifier_cache); | ||
| 11580 | |||
| 11581 | Qrecompute_lucid_menubar = intern_c_string ("recompute-lucid-menubar"); | ||
| 11582 | staticpro (&Qrecompute_lucid_menubar); | ||
| 11583 | Qactivate_menubar_hook = intern_c_string ("activate-menubar-hook"); | ||
| 11584 | staticpro (&Qactivate_menubar_hook); | ||
| 11585 | |||
| 11586 | Qpolling_period = intern_c_string ("polling-period"); | ||
| 11587 | staticpro (&Qpolling_period); | ||
| 11588 | |||
| 11589 | Qinput_method_function = intern_c_string ("input-method-function"); | ||
| 11590 | staticpro (&Qinput_method_function); | ||
| 11591 | |||
| 11592 | Qx_set_selection = intern_c_string ("x-set-selection"); | ||
| 11593 | staticpro (&Qx_set_selection); | ||
| 11594 | QPRIMARY = intern_c_string ("PRIMARY"); | ||
| 11595 | staticpro (&QPRIMARY); | ||
| 11596 | Qhandle_switch_frame = intern_c_string ("handle-switch-frame"); | ||
| 11597 | staticpro (&Qhandle_switch_frame); | ||
| 11598 | |||
| 11599 | Qinput_method_exit_on_first_char = intern_c_string ("input-method-exit-on-first-char"); | ||
| 11600 | staticpro (&Qinput_method_exit_on_first_char); | ||
| 11601 | Qinput_method_use_echo_area = intern_c_string ("input-method-use-echo-area"); | ||
| 11602 | staticpro (&Qinput_method_use_echo_area); | ||
| 11603 | |||
| 11604 | Qhelp_form_show = intern_c_string ("help-form-show"); | ||
| 11605 | staticpro (&Qhelp_form_show); | ||
| 11606 | 11532 | ||
| 11607 | Fset (Qinput_method_exit_on_first_char, Qnil); | 11533 | Fset (Qinput_method_exit_on_first_char, Qnil); |
| 11608 | Fset (Qinput_method_use_echo_area, Qnil); | 11534 | Fset (Qinput_method_use_echo_area, Qnil); |
| @@ -11653,9 +11579,8 @@ syms_of_keyboard (void) | |||
| 11653 | raw_keybuf = Fmake_vector (make_number (30), Qnil); | 11579 | raw_keybuf = Fmake_vector (make_number (30), Qnil); |
| 11654 | staticpro (&raw_keybuf); | 11580 | staticpro (&raw_keybuf); |
| 11655 | 11581 | ||
| 11656 | Qextended_command_history = intern_c_string ("extended-command-history"); | 11582 | DEFSYM (Qextended_command_history, "extended-command-history"); |
| 11657 | Fset (Qextended_command_history, Qnil); | 11583 | Fset (Qextended_command_history, Qnil); |
| 11658 | staticpro (&Qextended_command_history); | ||
| 11659 | 11584 | ||
| 11660 | accent_key_syms = Qnil; | 11585 | accent_key_syms = Qnil; |
| 11661 | staticpro (&accent_key_syms); | 11586 | staticpro (&accent_key_syms); |
| @@ -11956,8 +11881,7 @@ The command loop sets this to nil before each command, | |||
| 11956 | and tests the value when the command returns. | 11881 | and tests the value when the command returns. |
| 11957 | Buffer modification stores t in this variable. */); | 11882 | Buffer modification stores t in this variable. */); |
| 11958 | Vdeactivate_mark = Qnil; | 11883 | Vdeactivate_mark = Qnil; |
| 11959 | Qdeactivate_mark = intern_c_string ("deactivate-mark"); | 11884 | DEFSYM (Qdeactivate_mark, "deactivate-mark"); |
| 11960 | staticpro (&Qdeactivate_mark); | ||
| 11961 | 11885 | ||
| 11962 | DEFVAR_LISP ("pre-command-hook", Vpre_command_hook, | 11886 | DEFVAR_LISP ("pre-command-hook", Vpre_command_hook, |
| 11963 | doc: /* Normal hook run before each command is executed. | 11887 | doc: /* Normal hook run before each command is executed. |
| @@ -11977,8 +11901,7 @@ otherwise the error might happen repeatedly and make Emacs nonfunctional. */); | |||
| 11977 | DEFVAR_LISP ("echo-area-clear-hook", ..., | 11901 | DEFVAR_LISP ("echo-area-clear-hook", ..., |
| 11978 | doc: /* Normal hook run when clearing the echo area. */); | 11902 | doc: /* Normal hook run when clearing the echo area. */); |
| 11979 | #endif | 11903 | #endif |
| 11980 | Qecho_area_clear_hook = intern_c_string ("echo-area-clear-hook"); | 11904 | DEFSYM (Qecho_area_clear_hook, "echo-area-clear-hook"); |
| 11981 | staticpro (&Qecho_area_clear_hook); | ||
| 11982 | Fset (Qecho_area_clear_hook, Qnil); | 11905 | Fset (Qecho_area_clear_hook, Qnil); |
| 11983 | 11906 | ||
| 11984 | DEFVAR_LISP ("lucid-menu-bar-dirty-flag", Vlucid_menu_bar_dirty_flag, | 11907 | DEFVAR_LISP ("lucid-menu-bar-dirty-flag", Vlucid_menu_bar_dirty_flag, |