changeset 30050:ed1979c6dfb9

* 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.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 05 Jul 2000 13:41:00 +0000
parents be64b32cd2a2
children 70d9d51a864c
files src/msdos.c src/w32term.c src/xterm.c
diffstat 3 files changed, 19 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/src/msdos.c	Wed Jul 05 13:14:36 2000 +0000
+++ b/src/msdos.c	Wed Jul 05 13:41:00 2000 +0000
@@ -1375,7 +1375,7 @@
 	     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 @@
 
 	  /* 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 @@
 	    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 @@
 				   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);
--- a/src/w32term.c	Wed Jul 05 13:14:36 2000 +0000
+++ b/src/w32term.c	Wed Jul 05 13:41:00 2000 +0000
@@ -5801,7 +5801,7 @@
 	     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 @@
 
 	  /* 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 @@
 	    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 @@
      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 @@
 
           /* 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;
 
--- a/src/xterm.c	Wed Jul 05 13:14:36 2000 +0000
+++ b/src/xterm.c	Wed Jul 05 13:41:00 2000 +0000
@@ -6314,7 +6314,7 @@
 	     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 @@
 
 	  /* 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 @@
 	    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 @@
      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 @@
 
 		/* 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;