From: Gerd Moellmann Date: Fri, 14 Jul 2000 14:01:16 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: emacs-pretest-21.0.90~2827 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9662da0b92b3f853c623b5e5349ca71f89508fa6;p=emacs.git *** empty log message *** --- diff --git a/etc/NEWS b/etc/NEWS index fea1e0574e3..c6094f7071e 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1259,8 +1259,8 @@ functionality with aliases for the mldrag functions. * Lisp changes made after edition 2.6 of the Emacs Lisp Manual, (Display-related features are described in a page of their own below.) -** The value of the `help-echo' text property is evaluated, if it -is not a string already, to obtain a help string. +** The value of the `help-echo' text property is called as a function +or evaluated, if it is not a string already, to obtain a help string. ** Function `make-obsolete' now has an optional arg to say when the function was declared obsolete. @@ -2826,13 +2826,20 @@ moves over a tool-bar item or a piece of text that has a text property `help-echo'. This feature also applies to strings in the mode line that have a `help-echo' property. -If the value of the `help-echo' property is not a string. it is -evaluated to obtain a help string. +If the value of the `help-echo' property is a function, that function +is called with two arguments OBJECT and POSITION. OBJECT is the +buffer or string which had the `help-echo' property. POSITION is +the position within OBJECT under the mouse pointer. The function +should return a help string or nil for none. -For tool-bar items, their key definition is used to determine the help -to display. If their definition contains a property `:help FORM', -FORM is evaluated to determine the help string. Otherwise, the -caption of the tool-bar item is used. +If the value of the `help-echo' property is neither a function nor a +string, it is evaluated to obtain a help string. + +For tool-bar and menu-bar items, their key definition is used to +determine the help to display. If their definition contains a +property `:help FORM', FORM is evaluated to determine the help string. +For tool-bar items without a help form, the caption of the item is +used as help string. The hook `show-help-function' can be set to a function that displays help differently. For example, enabling a tooltip window causes the diff --git a/src/ChangeLog b/src/ChangeLog index 99038d06c38..aadc6d24e83 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -10,6 +10,43 @@ 2000-07-14 Gerd Moellmann + * keyboard.c (show_help_echo): Add parameters OBJECT and POS. + if HELP is a function, call it with OBJECT and POS as parameters + to get the help to display. + (gen_help_event, kbd_buffer_store_help_event): New functions. + (kbd_buffer_get_event): Construct the Lisp help-event differently. + (read_char): Call show_help_echo with new parameters. + + * keyboard.h (gen_help_event, kbd_buffer_store_help_event): + Add prototypes. + + * xterm.c (help_echo_object, help_echo_pos): New variables. + (note_mode_line_highlight): Store additional information about the + help-echo in help_echo_object and help_echo_pos. Check both + `local-map' and `keymap' properties for changing the cursor + (note_mouse_highlight): Store additional information about the + help-echo in help_echo_object and help_echo_pos. + (note_tool_bar_highlight): Set help_echo_object to nil and + help_echo_pos to -1. + (XTread_socket): Use gen_help_event instead of filling + input_events manually. + (syms_of_xterm): Staticpro help_echo_object. + + * xmenu.c (menu_highlight_callback): Use + kbd_buffer_store_help_event instead of setting up and input_event + structure manually. + + * xdisp.c (eval_form): GCPRO argument sexpr. + (call_function): New function. + (handle_single_display_prop): Use call_function and FUNCTIONP + instead of checking whether if font_height is a symbol and + using eval_form. + + * eval.c (internal_condition_case_2): New function. + + * lisp.h (FUNCTIONP): New macro. + (internal_condition_case_2, call_function): Add prototypes. + * xterm.c (construct_mouse_click, x_scroll_bar_to_input_event) (x_scroll_bar_handle_click, SET_SAVED_MENU_EVENT, XTread_socket): Always set `arg' member of input_events.