+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.
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
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'
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.])
# ifndef HAVE_WINDOW_SYSTEM
# define HAVE_WINDOW_SYSTEM 1
# endif
-# ifndef HAVE_MENUS
-# define HAVE_MENUS 1
-# endif
#endif
/* Get some redefinitions in place. */
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
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>
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)
{
else
{
Lisp_Object val = Fformat (nargs, args);
-#ifdef HAVE_MENUS
Lisp_Object pane, menu;
struct gcpro gcpro1;
menu = Fcons (val, pane);
Fx_popup_dialog (Qt, menu, Qt);
UNGCPRO;
-#else /* !HAVE_MENUS */
- message3 (val);
-#endif
return val;
}
}
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);
}
#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;
CHECK_STRING (prompt);
-#ifdef HAVE_MENUS
if ((NILP (last_nonmenu_event) || CONSP (last_nonmenu_event))
&& use_dialog_box)
{
UNGCPRO;
return obj;
}
-#endif /* HAVE_MENUS */
args[0] = prompt;
args[1] = build_string ("(yes or no) ");
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. */
/* 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
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)
*used_mouse_menu = 1;
return value;
}
-#endif /* HAVE_MENUS */
return Qnil ;
}
keybinding equivalents, but we don't do that any more anyway. */
return Qnil;
-#ifdef HAVE_MENUS
{
bool get_current_pos_p = 0;
XSETFRAME (Vmenu_updating_frame, f);
}
-#endif /* HAVE_MENUS */
/* Now parse the lisp menus. */
record_unwind_protect_void (unuse_menu_items);
unbind_to (specpdl_count, Qnil);
-#ifdef HAVE_MENUS
#ifdef HAVE_WINDOW_SYSTEM
/* Hide a previous tip, if any. */
if (!FRAME_TERMCAP_P (f))
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.
}
}
-#endif /* HAVE_MENUS */
-
void
syms_of_menu (void)
{
Menus
***********************************************************************/
-#if defined (HAVE_MENUS) && !defined (MSDOS)
+#if !defined (MSDOS)
/* TTY menu implementation and main ideas are borrowed from msdos.c.
return entry;
}
-#endif /* HAVE_MENUS && !MSDOS */
+#endif /* !MSDOS */
\f
#ifndef MSDOS
***********************************************************************/
/* 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)
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)
#else /* MSDOS */
-/* Delete frame F's face cache. */
+/* Delete frame F's face cache. */
static void
tty_free_frame_resources (struct frame *f)
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)
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
|| 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)
{
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)
|| 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
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),
/* 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),
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)
row->full_width_p = saved_width;
row->reversed_p = saved_reversed;
}
-#endif /* HAVE_MENUS */
\f
/***********************************************************************
Mode Line
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 */
}
\f
void
}
-#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
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
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 *);