changeset 30053:baccf5e9ab70

* w32menu.c (w32_menu_display_help): * xmenu.c (menu_help_callback): Use show_help_echo.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 05 Jul 2000 14:08:03 +0000
parents 324e0b1b2ac1
children 72640301c1fe
files src/w32menu.c src/xmenu.c
diffstat 2 files changed, 3 insertions(+), 34 deletions(-) [+]
line wrap: on
line diff
--- a/src/w32menu.c	Wed Jul 05 14:05:05 2000 +0000
+++ b/src/w32menu.c	Wed Jul 05 14:08:03 2000 +0000
@@ -2158,9 +2158,6 @@
 
   if (get_menu_item_info)
     {
-      struct gcpro gcpro1;
-      extern Lisp_Object Vshow_help_function;
-      Lisp_Object msg;
       MENUITEMINFO info;
 
       bzero (&info, sizeof (info));
@@ -2168,19 +2165,8 @@
       info.fMask = MIIM_DATA;
       get_menu_item_info (menu, item, FALSE, &info);
 
-      msg = info.dwItemData ? build_string ((char *) info.dwItemData) : Qnil;
-      GCPRO1 (msg);
-
-      if (!NILP (Vshow_help_function))
-        call1 (Vshow_help_function, msg);
-      else if (!MINI_WINDOW_P (XWINDOW (selected_window)))
-        {
-          if (STRINGP(msg))
-            message3_nolog (msg, XSTRING (msg)->size, STRING_MULTIBYTE (msg));
-          else
-            message (0);
-        }
-      UNGCPRO;
+      show_help_echo (info.dwItemData ?
+		      build_string ((char *) info.dwItemData) : Qnil);
     }
 }
 
--- a/src/xmenu.c	Wed Jul 05 14:05:05 2000 +0000
+++ b/src/xmenu.c	Wed Jul 05 14:08:03 2000 +0000
@@ -2488,24 +2488,7 @@
 menu_help_callback (help_string)
      char *help_string;
 {
-  Lisp_Object msg;
-  extern Lisp_Object Vshow_help_function;
-  struct gcpro gcpro1;
-
-  msg = help_string ? build_string (help_string) : Qnil;
-  GCPRO1 (msg);
-  
-  if (!NILP (Vshow_help_function))
-    call1 (Vshow_help_function, msg);
-  else if (!MINI_WINDOW_P (XWINDOW (selected_window)))
-    {
-      if (STRINGP (msg))
-	message3_nolog (msg, XSTRING (msg)->size, STRING_MULTIBYTE (msg));
-      else
-	message (0);
-    }
-
-  UNGCPRO;
+  show_help_echo (help_string ? build_string (help_string) : Qnil);
 }