From b7e804134a3e947c3decbb0a6b02c092be3427f7 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 5 Jul 2000 13:41:00 +0000 Subject: [PATCH] * xterm.c (note_mode_line_highlight, note_mouse_highlight) (note_tool_bar_highlight, XTread_socket): * msdos.c (IT_note_mode_line_highlight, IT_note_mouse_highlight) (dos_rawgetc): * w32term.c (note_mode_line_highlight, note_mouse_highlight) (note_tool_bar_highlight, w32_read_socket): Do not gratuitously ignore non-string `help-echo' properties. --- src/msdos.c | 10 +++++----- src/w32term.c | 14 +++++++------- src/xterm.c | 14 +++++++------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/msdos.c b/src/msdos.c index 7545cd8bc6c..c34edf62009 100644 --- a/src/msdos.c +++ b/src/msdos.c @@ -1375,7 +1375,7 @@ IT_note_mode_line_highlight (struct window *w, int x, int mode_line_p) setting the global variable help_echo to the help string. */ help = Fget_text_property (make_number (glyph->charpos), Qhelp_echo, glyph->object); - if (STRINGP (help)) + if (!NILP (help)) help_echo = help; } } @@ -1623,11 +1623,11 @@ IT_note_mouse_highlight (struct frame *f, int x, int y) /* Check overlays first. */ help = Qnil; - for (i = 0; i < noverlays && !STRINGP (help); ++i) + for (i = 0; i < noverlays && NILP (help); ++i) help = Foverlay_get (overlay_vec[i], Qhelp_echo); /* Try text properties. */ - if (!STRINGP (help) + if (NILP (help) && ((STRINGP (glyph->object) && glyph->charpos >= 0 && glyph->charpos < XSTRING (glyph->object)->size) @@ -1637,7 +1637,7 @@ IT_note_mouse_highlight (struct frame *f, int x, int y) help = Fget_text_property (make_number (glyph->charpos), Qhelp_echo, glyph->object); - if (STRINGP (help)) + if (!NILP (help)) help_echo = help; } @@ -3239,7 +3239,7 @@ dos_rawgetc () mouse_last_x, mouse_last_y); /* If the contents of the global variable help_echo has changed, generate a HELP_EVENT. */ - if (STRINGP (help_echo) || STRINGP (previous_help_echo)) + if (!NILP (help_echo) || !NILP (previous_help_echo)) { event.kind = HELP_EVENT; event.frame_or_window = Fcons (selected_frame, help_echo); diff --git a/src/w32term.c b/src/w32term.c index 46025c6cd1f..3a8cfb8bba6 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -5801,7 +5801,7 @@ note_mode_line_highlight (w, x, mode_line_p) setting the global variable help_echo to the help string. */ help = Fget_text_property (make_number (glyph->charpos), Qhelp_echo, glyph->object); - if (STRINGP (help)) + if (!NILP (help)) help_echo = help; /* Change the mouse pointer according to what is under X/Y. */ @@ -6060,11 +6060,11 @@ note_mouse_highlight (f, x, y) /* Check overlays first. */ help = Qnil; - for (i = 0; i < noverlays && !STRINGP (help); ++i) + for (i = 0; i < noverlays && NILP (help); ++i) help = Foverlay_get (overlay_vec[i], Qhelp_echo); /* Try text properties. */ - if (!STRINGP (help) + if (NILP (help) && ((STRINGP (glyph->object) && glyph->charpos >= 0 && glyph->charpos < XSTRING (glyph->object)->size) @@ -6074,7 +6074,7 @@ note_mouse_highlight (f, x, y) help = Fget_text_property (make_number (glyph->charpos), Qhelp_echo, glyph->object); - if (STRINGP (help)) + if (!NILP (help)) help_echo = help; } @@ -6306,7 +6306,7 @@ note_tool_bar_highlight (f, x, y) w32_read_socket does the rest. */ help_echo = (XVECTOR (f->current_tool_bar_items) ->contents[prop_idx + TOOL_BAR_ITEM_HELP]); - if (!STRINGP (help_echo)) + if (NILP (help_echo)) help_echo = (XVECTOR (f->current_tool_bar_items) ->contents[prop_idx + TOOL_BAR_ITEM_CAPTION]); } @@ -7610,8 +7610,8 @@ w32_read_socket (sd, bufp, numchars, expected) /* If the contents of the global variable help_echo has changed, generate a HELP_EVENT. */ - if (STRINGP (help_echo) - || STRINGP (previous_help_echo)) + if (!NILP (help_echo) + || !NILP (previous_help_echo)) { Lisp_Object frame; diff --git a/src/xterm.c b/src/xterm.c index 743c7f8934d..bc13fb98ba2 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -6314,7 +6314,7 @@ note_mode_line_highlight (w, x, mode_line_p) setting the global variable help_echo to the help string. */ help = Fget_text_property (make_number (glyph->charpos), Qhelp_echo, glyph->object); - if (STRINGP (help)) + if (!NILP (help)) help_echo = help; /* Change the mouse pointer according to what is under X/Y. */ @@ -6571,11 +6571,11 @@ note_mouse_highlight (f, x, y) /* Check overlays first. */ help = Qnil; - for (i = 0; i < noverlays && !STRINGP (help); ++i) + for (i = 0; i < noverlays && NILP (help); ++i) help = Foverlay_get (overlay_vec[i], Qhelp_echo); /* Try text properties. */ - if (!STRINGP (help) + if (NILP (help) && ((STRINGP (glyph->object) && glyph->charpos >= 0 && glyph->charpos < XSTRING (glyph->object)->size) @@ -6585,7 +6585,7 @@ note_mouse_highlight (f, x, y) help = Fget_text_property (make_number (glyph->charpos), Qhelp_echo, glyph->object); - if (STRINGP (help)) + if (!NILP (help)) help_echo = help; } @@ -6818,7 +6818,7 @@ note_tool_bar_highlight (f, x, y) XTread_socket does the rest. */ help_echo = (XVECTOR (f->current_tool_bar_items) ->contents[prop_idx + TOOL_BAR_ITEM_HELP]); - if (!STRINGP (help_echo)) + if (NILP (help_echo)) help_echo = (XVECTOR (f->current_tool_bar_items) ->contents[prop_idx + TOOL_BAR_ITEM_CAPTION]); } @@ -9773,8 +9773,8 @@ XTread_socket (sd, bufp, numchars, expected) /* If the contents of the global variable help_echo has changed, generate a HELP_EVENT. */ - if (STRINGP (help_echo) - || STRINGP (previous_help_echo)) + if (!NILP (help_echo) + || !NILP (previous_help_echo)) { Lisp_Object frame; -- 2.11.4.GIT