Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
742f715d
Commit
742f715d
authored
May 05, 1994
by
Karl Heuer
Browse files
(xmenu_show): Disallow empty menus.
parent
b137c582
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
src/xmenu.c
src/xmenu.c
+11
-0
No files found.
src/xmenu.c
View file @
742f715d
...
...
@@ -1399,6 +1399,11 @@ xmenu_show (f, x, y, menubarp, keymaps, title, error)
*
error
=
NULL
;
if
(
menu_items_used
<=
MENU_ITEMS_PANE_LENGTH
)
{
*
error
=
"Empty menu"
;
return
Qnil
;
}
this_menu_bar_item_beg
=
-
1
;
this_menu_bar_item_end
=
-
1
;
last_menu_bar_item_end
=
-
1
;
...
...
@@ -2010,6 +2015,12 @@ xmenu_show (f, x, y, menubarp, keymaps, title, error)
if
(
menu_items_n_panes
==
0
)
return
Qnil
;
if
(
menu_items_used
<=
MENU_ITEMS_PANE_LENGTH
)
{
*
error
=
"Empty menu"
;
return
Qnil
;
}
/* Figure out which root window F is on. */
XGetGeometry
(
x_current_display
,
FRAME_X_WINDOW
(
f
),
&
root
,
&
dummy_int
,
&
dummy_int
,
&
dummy_uint
,
&
dummy_uint
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment