Commit b7e80413 authored by Stefan Monnier's avatar Stefan Monnier

* 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.
parent 969f7e79
......@@ -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);
......
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment