diff options
| author | Juri Linkov | 2021-08-22 11:44:55 +0300 |
|---|---|---|
| committer | Juri Linkov | 2021-08-22 11:46:08 +0300 |
| commit | dd7d966eb40b58a221ea29930582b8173ea87ee2 (patch) | |
| tree | 4cbe3d05f0f2d471e2c2d824825935158417b1a1 /src | |
| parent | 654e096b09378b2b0d1cdc9b8c0634bf5f3c9306 (diff) | |
| download | emacs-dd7d966eb40b58a221ea29930582b8173ea87ee2.tar.gz emacs-dd7d966eb40b58a221ea29930582b8173ea87ee2.zip | |
Don't show menu titles with the text property 'hide' (bug#50067)
* lisp/mouse.el (context-menu-map): Add menu title "Context Menu"
propertized with the text property 'hide'.
* src/menu.c (x_popup_menu_1): Don't show the title with the non-nil
text property 'hide' on GTK and NS.
Diffstat (limited to 'src')
| -rw-r--r-- | src/menu.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/menu.c b/src/menu.c index e441d22ea04..4edd4ce33f9 100644 --- a/src/menu.c +++ b/src/menu.c | |||
| @@ -1284,6 +1284,14 @@ x_popup_menu_1 (Lisp_Object position, Lisp_Object menu) | |||
| 1284 | /* Search for a string appearing directly as an element of the keymap. | 1284 | /* Search for a string appearing directly as an element of the keymap. |
| 1285 | That string is the title of the menu. */ | 1285 | That string is the title of the menu. */ |
| 1286 | prompt = Fkeymap_prompt (keymap); | 1286 | prompt = Fkeymap_prompt (keymap); |
| 1287 | |||
| 1288 | #if defined (USE_GTK) || defined (HAVE_NS) | ||
| 1289 | if (STRINGP (prompt) | ||
| 1290 | && SCHARS (prompt) > 0 | ||
| 1291 | && !NILP (Fget_text_property (make_fixnum (0), Qhide, prompt))) | ||
| 1292 | title = Qnil; | ||
| 1293 | else | ||
| 1294 | #endif | ||
| 1287 | if (!NILP (prompt)) | 1295 | if (!NILP (prompt)) |
| 1288 | title = prompt; | 1296 | title = prompt; |
| 1289 | 1297 | ||