diff options
| author | Mattias EngdegÄrd | 2021-08-20 21:21:05 +0200 |
|---|---|---|
| committer | Mattias EngdegÄrd | 2021-08-21 12:41:54 +0200 |
| commit | f4159568a1682fe8a659bf68614a31406ffe1817 (patch) | |
| tree | 47e9120ac0f83212dbb87ba91fb29d08463ae154 | |
| parent | d6ad208b2cea6cb78ea4427ae4715bc5e6c5c85b (diff) | |
| download | emacs-f4159568a1682fe8a659bf68614a31406ffe1817.tar.gz emacs-f4159568a1682fe8a659bf68614a31406ffe1817.zip | |
Remove default "Select" title from NS popup menus (bug#50067)
* src/menu.c (x_popup_menu_1): Remove default "Select" title.
* src/nsmenu.m (ns_menu_show): Allow title to be absent.
| -rw-r--r-- | src/menu.c | 4 | ||||
| -rw-r--r-- | src/nsmenu.m | 2 |
2 files changed, 1 insertions, 5 deletions
diff --git a/src/menu.c b/src/menu.c index 3b1d7402571..e441d22ea04 100644 --- a/src/menu.c +++ b/src/menu.c | |||
| @@ -1286,10 +1286,6 @@ x_popup_menu_1 (Lisp_Object position, Lisp_Object menu) | |||
| 1286 | prompt = Fkeymap_prompt (keymap); | 1286 | prompt = Fkeymap_prompt (keymap); |
| 1287 | if (!NILP (prompt)) | 1287 | if (!NILP (prompt)) |
| 1288 | title = prompt; | 1288 | title = prompt; |
| 1289 | #ifdef HAVE_NS /* Is that needed and NS-specific? --Stef */ | ||
| 1290 | else | ||
| 1291 | title = build_string ("Select"); | ||
| 1292 | #endif | ||
| 1293 | 1289 | ||
| 1294 | /* Make that be the pane title of the first pane. */ | 1290 | /* Make that be the pane title of the first pane. */ |
| 1295 | if (!NILP (prompt) && menu_items_n_panes >= 0) | 1291 | if (!NILP (prompt) && menu_items_n_panes >= 0) |
diff --git a/src/nsmenu.m b/src/nsmenu.m index bb0dd2634d8..fe4f8258322 100644 --- a/src/nsmenu.m +++ b/src/nsmenu.m | |||
| @@ -959,7 +959,7 @@ ns_menu_show (struct frame *f, int x, int y, int menuflags, | |||
| 959 | } | 959 | } |
| 960 | 960 | ||
| 961 | pmenu = [[EmacsMenu alloc] initWithTitle: | 961 | pmenu = [[EmacsMenu alloc] initWithTitle: |
| 962 | [NSString stringWithLispString: title]]; | 962 | NILP (title) ? @"" : [NSString stringWithLispString: title]]; |
| 963 | [pmenu fillWithWidgetValue: first_wv->contents]; | 963 | [pmenu fillWithWidgetValue: first_wv->contents]; |
| 964 | free_menubar_widget_value_tree (first_wv); | 964 | free_menubar_widget_value_tree (first_wv); |
| 965 | unbind_to (specpdl_count, Qnil); | 965 | unbind_to (specpdl_count, Qnil); |