diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | configure.ac | 11 | ||||
-rw-r--r-- | nt/inc/ms-w32.h | 5 | ||||
-rw-r--r-- | src/ChangeLog | 9 | ||||
-rw-r--r-- | src/alloc.c | 2 | ||||
-rw-r--r-- | src/editfns.c | 6 | ||||
-rw-r--r-- | src/fns.c | 4 | ||||
-rw-r--r-- | src/keyboard.c | 8 | ||||
-rw-r--r-- | src/menu.c | 9 | ||||
-rw-r--r-- | src/term.c | 10 | ||||
-rw-r--r-- | src/w32menu.c | 7 | ||||
-rw-r--r-- | src/window.c | 6 | ||||
-rw-r--r-- | src/xdisp.c | 2 | ||||
-rw-r--r-- | src/xmenu.c | 4 | ||||
-rw-r--r-- | src/xterm.c | 2 | ||||
-rw-r--r-- | src/xterm.h | 4 |
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 @@ +2013-11-29 Stefan Monnier <monnier@iro.umontreal.ca> + + * configure.ac (HAVE_MENUS): Remove. + 2013-11-28 Glenn Morris <rgm@gnu.org> * 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.]) fi fi -### We always support menus. -HAVE_MENUS=yes - # Does the opsystem file prohibit the use of the GNU malloc? # Assume not, until told otherwise. GNU_MALLOC=yes @@ -4620,8 +4617,7 @@ else fi AC_SUBST(LIBX_OTHER) -if test "$HAVE_GTK" = yes || - test "$HAVE_MENUS" != yes || test "$HAVE_X11" != yes; then +if test "$HAVE_GTK" = yes || test "$HAVE_X11" != yes; then LIBXMENU= elif test "$USE_X_TOOLKIT" = none; then LIBXMENU='$(oldXMenudir)/libXMenu11.a' @@ -4630,11 +4626,6 @@ else fi AC_SUBST(LIBXMENU) -if test "${HAVE_MENUS}" = "yes" ; then - AC_DEFINE(HAVE_MENUS, 1, - [Define to 1 if you have mouse menus. (This is supported in all configurations, but the option to specify it remains.)]) -fi - if test "${GNU_MALLOC}" = "yes" ; then AC_DEFINE(GNU_MALLOC, 1, [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 (); # ifndef HAVE_WINDOW_SYSTEM # define HAVE_WINDOW_SYSTEM 1 # endif -# ifndef HAVE_MENUS -# define HAVE_MENUS 1 -# endif #endif /* Get some redefinitions in place. */ @@ -176,7 +173,7 @@ extern char *getenv (); extern struct tm * sys_localtime (const time_t *); /* MinGW64 uses a 2-argument _setjmp, and setjmp is a macro defined to supply the 2nd arg correctly, so don't use _setjmp directly in that - case. */ + case. */ #undef HAVE__SETJMP #endif diff --git a/src/ChangeLog b/src/ChangeLog index 3231f5b3f54..134e082a1c9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,14 @@ 2013-11-29 Stefan Monnier <monnier@iro.umontreal.ca> + * xmenu.c (Fmenu_or_popup_active_p): + * window.c (Fset_window_configuration): + * menu.c (Fx_popup_menu, Fx_popup_dialog): + * keyboard.c (record_menu_key, read_char_x_menu_prompt): + * fns.c (Fyes_or_no_p): + * editfns.c (Fmessage_box, Fmessage_or_box): + * alloc.c (make_save_ptr_ptr): + * xdisp.c, w32menu.c, term.c, xterm.h, xterm.c: Remove HAVE_MENUS. + * window.c (Fset_window_configuration): Move select_window later. 2013-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) return val; } -#if defined HAVE_MENUS && ! (defined USE_X_TOOLKIT || defined USE_GTK) +#if ! (defined USE_X_TOOLKIT || defined USE_GTK) Lisp_Object make_save_ptr_ptr (void *a, void *b) { 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) */) else { Lisp_Object val = Fformat (nargs, args); -#ifdef HAVE_MENUS Lisp_Object pane, menu; struct gcpro gcpro1; @@ -3482,9 +3481,6 @@ usage: (message-box FORMAT-STRING &rest ARGS) */) menu = Fcons (val, pane); Fx_popup_dialog (Qt, menu, Qt); UNGCPRO; -#else /* !HAVE_MENUS */ - message3 (val); -#endif return val; } } @@ -3503,11 +3499,9 @@ message; let the minibuffer contents show. usage: (message-or-box FORMAT-STRING &rest ARGS) */) (ptrdiff_t nargs, Lisp_Object *args) { -#ifdef HAVE_MENUS if ((NILP (last_nonmenu_event) || CONSP (last_nonmenu_event)) && use_dialog_box) return Fmessage_box (nargs, args); -#endif return Fmessage (nargs, args); } 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/>. */ #include "frame.h" #include "window.h" #include "blockinput.h" -#ifdef HAVE_MENUS #if defined (HAVE_X_WINDOWS) #include "xterm.h" #endif -#endif /* HAVE_MENUS */ Lisp_Object Qstring_lessp; static Lisp_Object Qprovide, Qrequire; @@ -2416,7 +2414,6 @@ if `last-nonmenu-event' is nil, and `use-dialog-box' is non-nil. */) CHECK_STRING (prompt); -#ifdef HAVE_MENUS if ((NILP (last_nonmenu_event) || CONSP (last_nonmenu_event)) && use_dialog_box) { @@ -2430,7 +2427,6 @@ if `last-nonmenu-event' is nil, and `use-dialog-box' is non-nil. */) UNGCPRO; return obj; } -#endif /* HAVE_MENUS */ args[0] = prompt; 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, RETURN_UNGCPRO (c); } -#ifdef HAVE_MENUS - /* Record a key that came from a mouse menu. Record it for echoing, for this-command-keys, and so on. */ @@ -3254,13 +3252,11 @@ record_menu_key (Lisp_Object c) /* Record this character as part of the current key. */ add_command_key (c); - /* Re-reading in the middle of a command */ + /* Re-reading in the middle of a command. */ last_input_event = c; num_input_events++; } -#endif /* HAVE_MENUS */ - /* Return true if should recognize C as "the help character". */ static bool @@ -8359,7 +8355,6 @@ read_char_x_menu_prompt (Lisp_Object map, if (! menu_prompting) return Qnil; -#ifdef HAVE_MENUS /* If we got to this point via a mouse click, use a real menu for mouse selection. */ if (EVENT_HAS_PARAMETERS (prev_event) @@ -8405,7 +8400,6 @@ read_char_x_menu_prompt (Lisp_Object map, *used_mouse_menu = 1; return value; } -#endif /* HAVE_MENUS */ return Qnil ; } 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. */) keybinding equivalents, but we don't do that any more anyway. */ return Qnil; -#ifdef HAVE_MENUS { bool get_current_pos_p = 0; @@ -1315,7 +1314,6 @@ no quit occurs and `x-popup-menu' returns nil. */) XSETFRAME (Vmenu_updating_frame, f); } -#endif /* HAVE_MENUS */ /* Now parse the lisp menus. */ record_unwind_protect_void (unuse_menu_items); @@ -1398,7 +1396,6 @@ no quit occurs and `x-popup-menu' returns nil. */) unbind_to (specpdl_count, Qnil); -#ifdef HAVE_MENUS #ifdef HAVE_WINDOW_SYSTEM /* Hide a previous tip, if any. */ if (!FRAME_TERMCAP_P (f)) @@ -1460,16 +1457,12 @@ no quit occurs and `x-popup-menu' returns nil. */) FRAME_DISPLAY_INFO (f)->grabbed = 0; #endif -#endif /* HAVE_MENUS */ - UNGCPRO; if (error_name) error ("%s", error_name); return selection; } -#ifdef HAVE_MENUS - DEFUN ("x-popup-dialog", Fx_popup_dialog, Sx_popup_dialog, 2, 3, 0, doc: /* Pop up a dialog box and return user's selection. POSITION specifies which frame to use. @@ -1605,8 +1598,6 @@ for instance using the window manager, then this produces a quit and } } -#endif /* HAVE_MENUS */ - void syms_of_menu (void) { 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, Menus ***********************************************************************/ -#if defined (HAVE_MENUS) && !defined (MSDOS) +#if !defined (MSDOS) /* TTY menu implementation and main ideas are borrowed from msdos.c. @@ -3816,7 +3816,7 @@ tty_menu_show (struct frame *f, int x, int y, bool for_click, bool keymaps, return entry; } -#endif /* HAVE_MENUS && !MSDOS */ +#endif /* !MSDOS */ #ifndef MSDOS @@ -3825,7 +3825,7 @@ tty_menu_show (struct frame *f, int x, int y, bool for_click, bool keymaps, ***********************************************************************/ /* Initialize the tty-dependent part of frame F. The frame must - already have its device initialized. */ + already have its device initialized. */ void create_tty_output (struct frame *f) @@ -3839,7 +3839,7 @@ create_tty_output (struct frame *f) f->output_data.tty = t; } -/* Delete frame F's face cache, and its tty-dependent part. */ +/* Delete frame F's face cache, and its tty-dependent part. */ static void tty_free_frame_resources (struct frame *f) @@ -3854,7 +3854,7 @@ tty_free_frame_resources (struct frame *f) #else /* MSDOS */ -/* Delete frame F's face cache. */ +/* Delete frame F's face cache. */ static void tty_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 *); void w32_free_menu_strings (HWND); -#ifdef HAVE_MENUS #ifdef HAVE_DIALOGS Lisp_Object w32_popup_dialog (struct frame *f, Lisp_Object header, Lisp_Object contents) @@ -1602,21 +1601,15 @@ w32_free_menu_strings (HWND hwnd) current_popup_menu = NULL; } -#endif /* HAVE_MENUS */ - /* The following is used by delayed window autoselection. */ DEFUN ("menu-or-popup-active-p", Fmenu_or_popup_active_p, Smenu_or_popup_active_p, 0, 0, 0, doc: /* Return t if a menu or popup dialog is active on selected frame. */) (void) { -#ifdef HAVE_MENUS struct frame *f; f = SELECTED_FRAME (); return (f->output_data.w32->menubar_active > 0) ? Qt : Qnil; -#else - return Qnil; -#endif /* HAVE_MENUS */ } void 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. */) || data->frame_cols != previous_frame_cols) change_frame_size (f, data->frame_lines, data->frame_cols, 0, 0, 0); -#ifdef HAVE_MENUS if (data->frame_menu_bar_lines != previous_frame_menu_bar_lines) { @@ -5567,7 +5566,6 @@ the return value is nil. Otherwise the value is t. */) set_menu_bar_lines (f, make_number (data->frame_menu_bar_lines), make_number (0)); } -#endif #ifdef HAVE_WINDOW_SYSTEM if (data->frame_tool_bar_lines != previous_frame_tool_bar_lines) @@ -5752,7 +5750,6 @@ the return value is nil. Otherwise the value is t. */) || previous_frame_cols != FRAME_COLS (f)) change_frame_size (f, previous_frame_lines, previous_frame_cols, 0, 0, 0); -#ifdef HAVE_MENUS if (previous_frame_menu_bar_lines != FRAME_MENU_BAR_LINES (f)) { #ifdef HAVE_WINDOW_SYSTEM @@ -5765,7 +5762,6 @@ the return value is nil. Otherwise the value is t. */) set_menu_bar_lines (f, make_number (previous_frame_menu_bar_lines), make_number (0)); } -#endif #ifdef HAVE_WINDOW_SYSTEM if (previous_frame_tool_bar_lines != FRAME_TOOL_BAR_LINES (f)) 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. */) /* This `select_window' calls record_buffer which calls Fdelq which invokes QUIT, so we do it here at the end rather than earlier, to minimize the risk of interrupting the Fset_window_configuration - in an inconsistent state (e.g. before frame-focus redirection is + in an inconsistent state (e.g. before frame-focus redirection is canceled). */ select_window (data->current_window, Qnil, 1); 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) compute_line_metrics (&it); } -#ifdef HAVE_MENUS /* Deep copy of a glyph row, including the glyphs. */ static void deep_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, row->full_width_p = saved_width; row->reversed_p = saved_reversed; } -#endif /* HAVE_MENUS */ /*********************************************************************** 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_ doc: /* Return t if a menu or popup dialog is active. */) (void) { -#ifdef HAVE_MENUS return (popup_activated ()) ? Qt : Qnil; -#else - return Qnil; -#endif /* HAVE_MENUS */ } void 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, } -#if defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK +#if !defined USE_X_TOOLKIT && !defined USE_GTK /* Handle an event saying the mouse has moved out of an Emacs frame. */ void 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, extern bool x_alloc_nearest_color (struct frame *, Colormap, XColor *); extern void x_query_color (struct frame *f, XColor *); extern void x_clear_area (Display *, Window, int, int, int, int); -#if defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK +#if !defined USE_X_TOOLKIT && !defined USE_GTK extern void x_mouse_leave (struct x_display_info *); #endif @@ -963,7 +963,7 @@ extern int x_display_pixel_width (struct x_display_info *); extern void x_set_sticky (struct frame *, Lisp_Object, Lisp_Object); extern void x_wait_for_event (struct frame *, int); -/* Defined in xselect.c */ +/* Defined in xselect.c. */ extern void x_handle_property_notify (const XPropertyEvent *); extern void x_handle_selection_notify (const XSelectionEvent *); |