]> git.eshelyaron.com Git - emacs.git/commitdiff
Remove default "Select" title from NS popup menus (bug#50067)
authorMattias Engdegård <mattiase@acm.org>
Fri, 20 Aug 2021 19:21:05 +0000 (21:21 +0200)
committerMattias Engdegård <mattiase@acm.org>
Sat, 21 Aug 2021 10:41:54 +0000 (12:41 +0200)
* src/menu.c (x_popup_menu_1): Remove default "Select" title.
* src/nsmenu.m (ns_menu_show): Allow title to be absent.

src/menu.c
src/nsmenu.m

index 3b1d740257191a567b97c2005b89c80eaf1a7ac3..e441d22ea0462c3c1011989227dbbbfc5d766c5a 100644 (file)
@@ -1286,10 +1286,6 @@ x_popup_menu_1 (Lisp_Object position, Lisp_Object menu)
       prompt = Fkeymap_prompt (keymap);
       if (!NILP (prompt))
        title = prompt;
-#ifdef HAVE_NS         /* Is that needed and NS-specific?  --Stef  */
-      else
-       title = build_string ("Select");
-#endif
 
       /* Make that be the pane title of the first pane.  */
       if (!NILP (prompt) && menu_items_n_panes >= 0)
index bb0dd2634d8eba781cbf71d3da7045b24a37756b..fe4f825832296506ef2d28872648695ae03a5bbd 100644 (file)
@@ -959,7 +959,7 @@ ns_menu_show (struct frame *f, int x, int y, int menuflags,
     }
 
   pmenu = [[EmacsMenu alloc] initWithTitle:
-                               [NSString stringWithLispString: title]];
+                   NILP (title) ? @"" : [NSString stringWithLispString: title]];
   [pmenu fillWithWidgetValue: first_wv->contents];
   free_menubar_widget_value_tree (first_wv);
   unbind_to (specpdl_count, Qnil);