aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2013-11-28 20:22:40 -0500
committerStefan Monnier2013-11-28 20:22:40 -0500
commit7cdf484be3f4408b2bdf58db5bd4ae896cf262e5 (patch)
tree3ee6b7c62a3385518f09e5ade6a879bd1b41f53c
parentef869611180c862f67ef1e004553668523615d37 (diff)
downloademacs-7cdf484be3f4408b2bdf58db5bd4ae896cf262e5.tar.gz
emacs-7cdf484be3f4408b2bdf58db5bd4ae896cf262e5.zip
* configure.ac (HAVE_MENUS): Remove.
* src/xmenu.c (Fmenu_or_popup_active_p): * src/window.c (Fset_window_configuration): * src/menu.c (Fx_popup_menu, Fx_popup_dialog): * src/keyboard.c (record_menu_key, read_char_x_menu_prompt): * src/fns.c (Fyes_or_no_p): * src/editfns.c (Fmessage_box, Fmessage_or_box): * src/alloc.c (make_save_ptr_ptr): * src/xdisp.c, src/w32menu.c, src/term.c, src/xterm.h, src/xterm.c: Remove HAVE_MENUS.
-rw-r--r--ChangeLog4
-rw-r--r--configure.ac11
-rw-r--r--nt/inc/ms-w32.h5
-rw-r--r--src/ChangeLog9
-rw-r--r--src/alloc.c2
-rw-r--r--src/editfns.c6
-rw-r--r--src/fns.c4
-rw-r--r--src/keyboard.c8
-rw-r--r--src/menu.c9
-rw-r--r--src/term.c10
-rw-r--r--src/w32menu.c7
-rw-r--r--src/window.c6
-rw-r--r--src/xdisp.c2
-rw-r--r--src/xmenu.c4
-rw-r--r--src/xterm.c2
-rw-r--r--src/xterm.h4
16 files changed, 26 insertions, 67 deletions
diff --git a/ChangeLog b/ChangeLog
index 184f0e1727a..8c2f85ce2b8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
12013-11-29 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * configure.ac (HAVE_MENUS): Remove.
4
12013-11-28 Glenn Morris <rgm@gnu.org> 52013-11-28 Glenn Morris <rgm@gnu.org>
2 6
3 * configure.ac (PATH_SEP): Replace with pre-existing SEPCHAR. 7 * configure.ac (PATH_SEP): Replace with pre-existing SEPCHAR.
diff --git a/configure.ac b/configure.ac
index fe1a280bf1a..0d07d563946 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1866,9 +1866,6 @@ to configure.])
1866 fi 1866 fi
1867fi 1867fi
1868 1868
1869### We always support menus.
1870HAVE_MENUS=yes
1871
1872# Does the opsystem file prohibit the use of the GNU malloc? 1869# Does the opsystem file prohibit the use of the GNU malloc?
1873# Assume not, until told otherwise. 1870# Assume not, until told otherwise.
1874GNU_MALLOC=yes 1871GNU_MALLOC=yes
@@ -4620,8 +4617,7 @@ else
4620fi 4617fi
4621AC_SUBST(LIBX_OTHER) 4618AC_SUBST(LIBX_OTHER)
4622 4619
4623if test "$HAVE_GTK" = yes || 4620if test "$HAVE_GTK" = yes || test "$HAVE_X11" != yes; then
4624 test "$HAVE_MENUS" != yes || test "$HAVE_X11" != yes; then
4625 LIBXMENU= 4621 LIBXMENU=
4626elif test "$USE_X_TOOLKIT" = none; then 4622elif test "$USE_X_TOOLKIT" = none; then
4627 LIBXMENU='$(oldXMenudir)/libXMenu11.a' 4623 LIBXMENU='$(oldXMenudir)/libXMenu11.a'
@@ -4630,11 +4626,6 @@ else
4630fi 4626fi
4631AC_SUBST(LIBXMENU) 4627AC_SUBST(LIBXMENU)
4632 4628
4633if test "${HAVE_MENUS}" = "yes" ; then
4634 AC_DEFINE(HAVE_MENUS, 1,
4635 [Define to 1 if you have mouse menus. (This is supported in all configurations, but the option to specify it remains.)])
4636fi
4637
4638if test "${GNU_MALLOC}" = "yes" ; then 4629if test "${GNU_MALLOC}" = "yes" ; then
4639 AC_DEFINE(GNU_MALLOC, 1, 4630 AC_DEFINE(GNU_MALLOC, 1,
4640 [Define to 1 if you want to use the GNU memory allocator.]) 4631 [Define to 1 if you want to use the GNU memory allocator.])
diff --git a/nt/inc/ms-w32.h b/nt/inc/ms-w32.h
index e27ae4daf4f..cd6ec1725d6 100644
--- a/nt/inc/ms-w32.h
+++ b/nt/inc/ms-w32.h
@@ -156,9 +156,6 @@ extern char *getenv ();
156# ifndef HAVE_WINDOW_SYSTEM 156# ifndef HAVE_WINDOW_SYSTEM
157# define HAVE_WINDOW_SYSTEM 1 157# define HAVE_WINDOW_SYSTEM 1
158# endif 158# endif
159# ifndef HAVE_MENUS
160# define HAVE_MENUS 1
161# endif
162#endif 159#endif
163 160
164/* Get some redefinitions in place. */ 161/* Get some redefinitions in place. */
@@ -176,7 +173,7 @@ extern char *getenv ();
176extern struct tm * sys_localtime (const time_t *); 173extern struct tm * sys_localtime (const time_t *);
177/* MinGW64 uses a 2-argument _setjmp, and setjmp is a macro defined to 174/* MinGW64 uses a 2-argument _setjmp, and setjmp is a macro defined to
178 supply the 2nd arg correctly, so don't use _setjmp directly in that 175 supply the 2nd arg correctly, so don't use _setjmp directly in that
179 case. */ 176 case. */
180#undef HAVE__SETJMP 177#undef HAVE__SETJMP
181#endif 178#endif
182 179
diff --git a/src/ChangeLog b/src/ChangeLog
index 3231f5b3f54..134e082a1c9 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,14 @@
12013-11-29 Stefan Monnier <monnier@iro.umontreal.ca> 12013-11-29 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * xmenu.c (Fmenu_or_popup_active_p):
4 * window.c (Fset_window_configuration):
5 * menu.c (Fx_popup_menu, Fx_popup_dialog):
6 * keyboard.c (record_menu_key, read_char_x_menu_prompt):
7 * fns.c (Fyes_or_no_p):
8 * editfns.c (Fmessage_box, Fmessage_or_box):
9 * alloc.c (make_save_ptr_ptr):
10 * xdisp.c, w32menu.c, term.c, xterm.h, xterm.c: Remove HAVE_MENUS.
11
3 * window.c (Fset_window_configuration): Move select_window later. 12 * window.c (Fset_window_configuration): Move select_window later.
4 13
52013-11-28 Stefan Monnier <monnier@iro.umontreal.ca> 142013-11-28 Stefan Monnier <monnier@iro.umontreal.ca>
diff --git a/src/alloc.c b/src/alloc.c
index 2f49de3f28b..7024b47fc7d 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -3477,7 +3477,7 @@ make_save_ptr_int (void *a, ptrdiff_t b)
3477 return val; 3477 return val;
3478} 3478}
3479 3479
3480#if defined HAVE_MENUS && ! (defined USE_X_TOOLKIT || defined USE_GTK) 3480#if ! (defined USE_X_TOOLKIT || defined USE_GTK)
3481Lisp_Object 3481Lisp_Object
3482make_save_ptr_ptr (void *a, void *b) 3482make_save_ptr_ptr (void *a, void *b)
3483{ 3483{
diff --git a/src/editfns.c b/src/editfns.c
index c5267d1e038..8e47d1f82e4 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -3473,7 +3473,6 @@ usage: (message-box FORMAT-STRING &rest ARGS) */)
3473 else 3473 else
3474 { 3474 {
3475 Lisp_Object val = Fformat (nargs, args); 3475 Lisp_Object val = Fformat (nargs, args);
3476#ifdef HAVE_MENUS
3477 Lisp_Object pane, menu; 3476 Lisp_Object pane, menu;
3478 struct gcpro gcpro1; 3477 struct gcpro gcpro1;
3479 3478
@@ -3482,9 +3481,6 @@ usage: (message-box FORMAT-STRING &rest ARGS) */)
3482 menu = Fcons (val, pane); 3481 menu = Fcons (val, pane);
3483 Fx_popup_dialog (Qt, menu, Qt); 3482 Fx_popup_dialog (Qt, menu, Qt);
3484 UNGCPRO; 3483 UNGCPRO;
3485#else /* !HAVE_MENUS */
3486 message3 (val);
3487#endif
3488 return val; 3484 return val;
3489 } 3485 }
3490} 3486}
@@ -3503,11 +3499,9 @@ message; let the minibuffer contents show.
3503usage: (message-or-box FORMAT-STRING &rest ARGS) */) 3499usage: (message-or-box FORMAT-STRING &rest ARGS) */)
3504 (ptrdiff_t nargs, Lisp_Object *args) 3500 (ptrdiff_t nargs, Lisp_Object *args)
3505{ 3501{
3506#ifdef HAVE_MENUS
3507 if ((NILP (last_nonmenu_event) || CONSP (last_nonmenu_event)) 3502 if ((NILP (last_nonmenu_event) || CONSP (last_nonmenu_event))
3508 && use_dialog_box) 3503 && use_dialog_box)
3509 return Fmessage_box (nargs, args); 3504 return Fmessage_box (nargs, args);
3510#endif
3511 return Fmessage (nargs, args); 3505 return Fmessage (nargs, args);
3512} 3506}
3513 3507
diff --git a/src/fns.c b/src/fns.c
index 93829fb1d62..4c3bde1add9 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -35,11 +35,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
35#include "frame.h" 35#include "frame.h"
36#include "window.h" 36#include "window.h"
37#include "blockinput.h" 37#include "blockinput.h"
38#ifdef HAVE_MENUS
39#if defined (HAVE_X_WINDOWS) 38#if defined (HAVE_X_WINDOWS)
40#include "xterm.h" 39#include "xterm.h"
41#endif 40#endif
42#endif /* HAVE_MENUS */
43 41
44Lisp_Object Qstring_lessp; 42Lisp_Object Qstring_lessp;
45static Lisp_Object Qprovide, Qrequire; 43static Lisp_Object Qprovide, Qrequire;
@@ -2416,7 +2414,6 @@ if `last-nonmenu-event' is nil, and `use-dialog-box' is non-nil. */)
2416 2414
2417 CHECK_STRING (prompt); 2415 CHECK_STRING (prompt);
2418 2416
2419#ifdef HAVE_MENUS
2420 if ((NILP (last_nonmenu_event) || CONSP (last_nonmenu_event)) 2417 if ((NILP (last_nonmenu_event) || CONSP (last_nonmenu_event))
2421 && use_dialog_box) 2418 && use_dialog_box)
2422 { 2419 {
@@ -2430,7 +2427,6 @@ if `last-nonmenu-event' is nil, and `use-dialog-box' is non-nil. */)
2430 UNGCPRO; 2427 UNGCPRO;
2431 return obj; 2428 return obj;
2432 } 2429 }
2433#endif /* HAVE_MENUS */
2434 2430
2435 args[0] = prompt; 2431 args[0] = prompt;
2436 args[1] = build_string ("(yes or no) "); 2432 args[1] = build_string ("(yes or no) ");
diff --git a/src/keyboard.c b/src/keyboard.c
index be863adcb96..2e16a872190 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -3222,8 +3222,6 @@ read_char (int commandflag, Lisp_Object map,
3222 RETURN_UNGCPRO (c); 3222 RETURN_UNGCPRO (c);
3223} 3223}
3224 3224
3225#ifdef HAVE_MENUS
3226
3227/* Record a key that came from a mouse menu. 3225/* Record a key that came from a mouse menu.
3228 Record it for echoing, for this-command-keys, and so on. */ 3226 Record it for echoing, for this-command-keys, and so on. */
3229 3227
@@ -3254,13 +3252,11 @@ record_menu_key (Lisp_Object c)
3254 /* Record this character as part of the current key. */ 3252 /* Record this character as part of the current key. */
3255 add_command_key (c); 3253 add_command_key (c);
3256 3254
3257 /* Re-reading in the middle of a command */ 3255 /* Re-reading in the middle of a command. */
3258 last_input_event = c; 3256 last_input_event = c;
3259 num_input_events++; 3257 num_input_events++;
3260} 3258}
3261 3259
3262#endif /* HAVE_MENUS */
3263
3264/* Return true if should recognize C as "the help character". */ 3260/* Return true if should recognize C as "the help character". */
3265 3261
3266static bool 3262static bool
@@ -8359,7 +8355,6 @@ read_char_x_menu_prompt (Lisp_Object map,
8359 if (! menu_prompting) 8355 if (! menu_prompting)
8360 return Qnil; 8356 return Qnil;
8361 8357
8362#ifdef HAVE_MENUS
8363 /* If we got to this point via a mouse click, 8358 /* If we got to this point via a mouse click,
8364 use a real menu for mouse selection. */ 8359 use a real menu for mouse selection. */
8365 if (EVENT_HAS_PARAMETERS (prev_event) 8360 if (EVENT_HAS_PARAMETERS (prev_event)
@@ -8405,7 +8400,6 @@ read_char_x_menu_prompt (Lisp_Object map,
8405 *used_mouse_menu = 1; 8400 *used_mouse_menu = 1;
8406 return value; 8401 return value;
8407 } 8402 }
8408#endif /* HAVE_MENUS */
8409 return Qnil ; 8403 return Qnil ;
8410} 8404}
8411 8405
diff --git a/src/menu.c b/src/menu.c
index 96b8f73824a..9ef3b88fe86 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -1178,7 +1178,6 @@ no quit occurs and `x-popup-menu' returns nil. */)
1178 keybinding equivalents, but we don't do that any more anyway. */ 1178 keybinding equivalents, but we don't do that any more anyway. */
1179 return Qnil; 1179 return Qnil;
1180 1180
1181#ifdef HAVE_MENUS
1182 { 1181 {
1183 bool get_current_pos_p = 0; 1182 bool get_current_pos_p = 0;
1184 1183
@@ -1315,7 +1314,6 @@ no quit occurs and `x-popup-menu' returns nil. */)
1315 1314
1316 XSETFRAME (Vmenu_updating_frame, f); 1315 XSETFRAME (Vmenu_updating_frame, f);
1317 } 1316 }
1318#endif /* HAVE_MENUS */
1319 1317
1320 /* Now parse the lisp menus. */ 1318 /* Now parse the lisp menus. */
1321 record_unwind_protect_void (unuse_menu_items); 1319 record_unwind_protect_void (unuse_menu_items);
@@ -1398,7 +1396,6 @@ no quit occurs and `x-popup-menu' returns nil. */)
1398 1396
1399 unbind_to (specpdl_count, Qnil); 1397 unbind_to (specpdl_count, Qnil);
1400 1398
1401#ifdef HAVE_MENUS
1402#ifdef HAVE_WINDOW_SYSTEM 1399#ifdef HAVE_WINDOW_SYSTEM
1403 /* Hide a previous tip, if any. */ 1400 /* Hide a previous tip, if any. */
1404 if (!FRAME_TERMCAP_P (f)) 1401 if (!FRAME_TERMCAP_P (f))
@@ -1460,16 +1457,12 @@ no quit occurs and `x-popup-menu' returns nil. */)
1460 FRAME_DISPLAY_INFO (f)->grabbed = 0; 1457 FRAME_DISPLAY_INFO (f)->grabbed = 0;
1461#endif 1458#endif
1462 1459
1463#endif /* HAVE_MENUS */
1464
1465 UNGCPRO; 1460 UNGCPRO;
1466 1461
1467 if (error_name) error ("%s", error_name); 1462 if (error_name) error ("%s", error_name);
1468 return selection; 1463 return selection;
1469} 1464}
1470 1465
1471#ifdef HAVE_MENUS
1472
1473DEFUN ("x-popup-dialog", Fx_popup_dialog, Sx_popup_dialog, 2, 3, 0, 1466DEFUN ("x-popup-dialog", Fx_popup_dialog, Sx_popup_dialog, 2, 3, 0,
1474 doc: /* Pop up a dialog box and return user's selection. 1467 doc: /* Pop up a dialog box and return user's selection.
1475POSITION specifies which frame to use. 1468POSITION specifies which frame to use.
@@ -1605,8 +1598,6 @@ for instance using the window manager, then this produces a quit and
1605 } 1598 }
1606} 1599}
1607 1600
1608#endif /* HAVE_MENUS */
1609
1610void 1601void
1611syms_of_menu (void) 1602syms_of_menu (void)
1612{ 1603{
diff --git a/src/term.c b/src/term.c
index f86d71ac2f4..877d43b89d9 100644
--- a/src/term.c
+++ b/src/term.c
@@ -2739,7 +2739,7 @@ DEFUN ("gpm-mouse-stop", Fgpm_mouse_stop, Sgpm_mouse_stop,
2739 Menus 2739 Menus
2740 ***********************************************************************/ 2740 ***********************************************************************/
2741 2741
2742#if defined (HAVE_MENUS) && !defined (MSDOS) 2742#if !defined (MSDOS)
2743 2743
2744/* TTY menu implementation and main ideas are borrowed from msdos.c. 2744/* TTY menu implementation and main ideas are borrowed from msdos.c.
2745 2745
@@ -3816,7 +3816,7 @@ tty_menu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
3816 return entry; 3816 return entry;
3817} 3817}
3818 3818
3819#endif /* HAVE_MENUS && !MSDOS */ 3819#endif /* !MSDOS */
3820 3820
3821 3821
3822#ifndef MSDOS 3822#ifndef MSDOS
@@ -3825,7 +3825,7 @@ tty_menu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
3825 ***********************************************************************/ 3825 ***********************************************************************/
3826 3826
3827/* Initialize the tty-dependent part of frame F. The frame must 3827/* Initialize the tty-dependent part of frame F. The frame must
3828 already have its device initialized. */ 3828 already have its device initialized. */
3829 3829
3830void 3830void
3831create_tty_output (struct frame *f) 3831create_tty_output (struct frame *f)
@@ -3839,7 +3839,7 @@ create_tty_output (struct frame *f)
3839 f->output_data.tty = t; 3839 f->output_data.tty = t;
3840} 3840}
3841 3841
3842/* Delete frame F's face cache, and its tty-dependent part. */ 3842/* Delete frame F's face cache, and its tty-dependent part. */
3843 3843
3844static void 3844static void
3845tty_free_frame_resources (struct frame *f) 3845tty_free_frame_resources (struct frame *f)
@@ -3854,7 +3854,7 @@ tty_free_frame_resources (struct frame *f)
3854 3854
3855#else /* MSDOS */ 3855#else /* MSDOS */
3856 3856
3857/* Delete frame F's face cache. */ 3857/* Delete frame F's face cache. */
3858 3858
3859static void 3859static void
3860tty_free_frame_resources (struct frame *f) 3860tty_free_frame_resources (struct frame *f)
diff --git a/src/w32menu.c b/src/w32menu.c
index b25652017cd..b846a3f999c 100644
--- a/src/w32menu.c
+++ b/src/w32menu.c
@@ -114,7 +114,6 @@ static int fill_in_menu (HMENU, widget_value *);
114 114
115void w32_free_menu_strings (HWND); 115void w32_free_menu_strings (HWND);
116 116
117#ifdef HAVE_MENUS
118#ifdef HAVE_DIALOGS 117#ifdef HAVE_DIALOGS
119Lisp_Object 118Lisp_Object
120w32_popup_dialog (struct frame *f, Lisp_Object header, Lisp_Object contents) 119w32_popup_dialog (struct frame *f, Lisp_Object header, Lisp_Object contents)
@@ -1602,21 +1601,15 @@ w32_free_menu_strings (HWND hwnd)
1602 current_popup_menu = NULL; 1601 current_popup_menu = NULL;
1603} 1602}
1604 1603
1605#endif /* HAVE_MENUS */
1606
1607/* The following is used by delayed window autoselection. */ 1604/* The following is used by delayed window autoselection. */
1608 1605
1609DEFUN ("menu-or-popup-active-p", Fmenu_or_popup_active_p, Smenu_or_popup_active_p, 0, 0, 0, 1606DEFUN ("menu-or-popup-active-p", Fmenu_or_popup_active_p, Smenu_or_popup_active_p, 0, 0, 0,
1610 doc: /* Return t if a menu or popup dialog is active on selected frame. */) 1607 doc: /* Return t if a menu or popup dialog is active on selected frame. */)
1611 (void) 1608 (void)
1612{ 1609{
1613#ifdef HAVE_MENUS
1614 struct frame *f; 1610 struct frame *f;
1615 f = SELECTED_FRAME (); 1611 f = SELECTED_FRAME ();
1616 return (f->output_data.w32->menubar_active > 0) ? Qt : Qnil; 1612 return (f->output_data.w32->menubar_active > 0) ? Qt : Qnil;
1617#else
1618 return Qnil;
1619#endif /* HAVE_MENUS */
1620} 1613}
1621 1614
1622void 1615void
diff --git a/src/window.c b/src/window.c
index ea2618fe94d..89fcb490412 100644
--- a/src/window.c
+++ b/src/window.c
@@ -5554,7 +5554,6 @@ the return value is nil. Otherwise the value is t. */)
5554 || data->frame_cols != previous_frame_cols) 5554 || data->frame_cols != previous_frame_cols)
5555 change_frame_size (f, data->frame_lines, 5555 change_frame_size (f, data->frame_lines,
5556 data->frame_cols, 0, 0, 0); 5556 data->frame_cols, 0, 0, 0);
5557#ifdef HAVE_MENUS
5558 if (data->frame_menu_bar_lines 5557 if (data->frame_menu_bar_lines
5559 != previous_frame_menu_bar_lines) 5558 != previous_frame_menu_bar_lines)
5560 { 5559 {
@@ -5567,7 +5566,6 @@ the return value is nil. Otherwise the value is t. */)
5567 set_menu_bar_lines (f, make_number (data->frame_menu_bar_lines), 5566 set_menu_bar_lines (f, make_number (data->frame_menu_bar_lines),
5568 make_number (0)); 5567 make_number (0));
5569 } 5568 }
5570#endif
5571#ifdef HAVE_WINDOW_SYSTEM 5569#ifdef HAVE_WINDOW_SYSTEM
5572 if (data->frame_tool_bar_lines 5570 if (data->frame_tool_bar_lines
5573 != previous_frame_tool_bar_lines) 5571 != previous_frame_tool_bar_lines)
@@ -5752,7 +5750,6 @@ the return value is nil. Otherwise the value is t. */)
5752 || previous_frame_cols != FRAME_COLS (f)) 5750 || previous_frame_cols != FRAME_COLS (f))
5753 change_frame_size (f, previous_frame_lines, previous_frame_cols, 5751 change_frame_size (f, previous_frame_lines, previous_frame_cols,
5754 0, 0, 0); 5752 0, 0, 0);
5755#ifdef HAVE_MENUS
5756 if (previous_frame_menu_bar_lines != FRAME_MENU_BAR_LINES (f)) 5753 if (previous_frame_menu_bar_lines != FRAME_MENU_BAR_LINES (f))
5757 { 5754 {
5758#ifdef HAVE_WINDOW_SYSTEM 5755#ifdef HAVE_WINDOW_SYSTEM
@@ -5765,7 +5762,6 @@ the return value is nil. Otherwise the value is t. */)
5765 set_menu_bar_lines (f, make_number (previous_frame_menu_bar_lines), 5762 set_menu_bar_lines (f, make_number (previous_frame_menu_bar_lines),
5766 make_number (0)); 5763 make_number (0));
5767 } 5764 }
5768#endif
5769#ifdef HAVE_WINDOW_SYSTEM 5765#ifdef HAVE_WINDOW_SYSTEM
5770 if (previous_frame_tool_bar_lines != FRAME_TOOL_BAR_LINES (f)) 5766 if (previous_frame_tool_bar_lines != FRAME_TOOL_BAR_LINES (f))
5771 x_set_tool_bar_lines (f, make_number (previous_frame_tool_bar_lines), 5767 x_set_tool_bar_lines (f, make_number (previous_frame_tool_bar_lines),
@@ -5799,7 +5795,7 @@ the return value is nil. Otherwise the value is t. */)
5799 /* This `select_window' calls record_buffer which calls Fdelq which 5795 /* This `select_window' calls record_buffer which calls Fdelq which
5800 invokes QUIT, so we do it here at the end rather than earlier, 5796 invokes QUIT, so we do it here at the end rather than earlier,
5801 to minimize the risk of interrupting the Fset_window_configuration 5797 to minimize the risk of interrupting the Fset_window_configuration
5802 in an inconsistent state (e.g. before frame-focus redirection is 5798 in an inconsistent state (e.g. before frame-focus redirection is
5803 canceled). */ 5799 canceled). */
5804 select_window (data->current_window, Qnil, 1); 5800 select_window (data->current_window, Qnil, 1);
5805 BVAR (XBUFFER (XWINDOW (selected_window)->contents), 5801 BVAR (XBUFFER (XWINDOW (selected_window)->contents),
diff --git a/src/xdisp.c b/src/xdisp.c
index 319481573c7..16e6341748d 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -20603,7 +20603,6 @@ display_menu_bar (struct window *w)
20603 compute_line_metrics (&it); 20603 compute_line_metrics (&it);
20604} 20604}
20605 20605
20606#ifdef HAVE_MENUS
20607/* Deep copy of a glyph row, including the glyphs. */ 20606/* Deep copy of a glyph row, including the glyphs. */
20608static void 20607static void
20609deep_copy_glyph_row (struct glyph_row *to, struct glyph_row *from) 20608deep_copy_glyph_row (struct glyph_row *to, struct glyph_row *from)
@@ -20725,7 +20724,6 @@ display_tty_menu_item (const char *item_text, int width, int face_id,
20725 row->full_width_p = saved_width; 20724 row->full_width_p = saved_width;
20726 row->reversed_p = saved_reversed; 20725 row->reversed_p = saved_reversed;
20727} 20726}
20728#endif /* HAVE_MENUS */
20729 20727
20730/*********************************************************************** 20728/***********************************************************************
20731 Mode Line 20729 Mode Line
diff --git a/src/xmenu.c b/src/xmenu.c
index b2c7fb5f073..cdc63cbaa96 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -2440,11 +2440,7 @@ DEFUN ("menu-or-popup-active-p", Fmenu_or_popup_active_p, Smenu_or_popup_active_
2440 doc: /* Return t if a menu or popup dialog is active. */) 2440 doc: /* Return t if a menu or popup dialog is active. */)
2441 (void) 2441 (void)
2442{ 2442{
2443#ifdef HAVE_MENUS
2444 return (popup_activated ()) ? Qt : Qnil; 2443 return (popup_activated ()) ? Qt : Qnil;
2445#else
2446 return Qnil;
2447#endif /* HAVE_MENUS */
2448} 2444}
2449 2445
2450void 2446void
diff --git a/src/xterm.c b/src/xterm.c
index c0fd9549f17..b4c2b6aabf6 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -3528,7 +3528,7 @@ x_detect_focus_change (struct x_display_info *dpyinfo, struct frame *frame,
3528} 3528}
3529 3529
3530 3530
3531#if defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK 3531#if !defined USE_X_TOOLKIT && !defined USE_GTK
3532/* Handle an event saying the mouse has moved out of an Emacs frame. */ 3532/* Handle an event saying the mouse has moved out of an Emacs frame. */
3533 3533
3534void 3534void
diff --git a/src/xterm.h b/src/xterm.h
index 753debff1bb..89676e873ae 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -949,7 +949,7 @@ extern bool x_alloc_lighter_color_for_widget (Widget, Display *, Colormap,
949extern bool x_alloc_nearest_color (struct frame *, Colormap, XColor *); 949extern bool x_alloc_nearest_color (struct frame *, Colormap, XColor *);
950extern void x_query_color (struct frame *f, XColor *); 950extern void x_query_color (struct frame *f, XColor *);
951extern void x_clear_area (Display *, Window, int, int, int, int); 951extern void x_clear_area (Display *, Window, int, int, int, int);
952#if defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK 952#if !defined USE_X_TOOLKIT && !defined USE_GTK
953extern void x_mouse_leave (struct x_display_info *); 953extern void x_mouse_leave (struct x_display_info *);
954#endif 954#endif
955 955
@@ -963,7 +963,7 @@ extern int x_display_pixel_width (struct x_display_info *);
963extern void x_set_sticky (struct frame *, Lisp_Object, Lisp_Object); 963extern void x_set_sticky (struct frame *, Lisp_Object, Lisp_Object);
964extern void x_wait_for_event (struct frame *, int); 964extern void x_wait_for_event (struct frame *, int);
965 965
966/* Defined in xselect.c */ 966/* Defined in xselect.c. */
967 967
968extern void x_handle_property_notify (const XPropertyEvent *); 968extern void x_handle_property_notify (const XPropertyEvent *);
969extern void x_handle_selection_notify (const XSelectionEvent *); 969extern void x_handle_selection_notify (const XSelectionEvent *);