/* Platform-independent code for terminal communications.
-Copyright (C) 1986, 1988, 1993-1994, 1996, 1999-2015 Free Software
+Copyright (C) 1986, 1988, 1993-1994, 1996, 1999-2016 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
#include <limits.h> /* for INT_MAX */
#include "lisp.h"
+#include "character.h"
+#include "coding.h"
#include "keyboard.h"
#include "keymap.h"
#include "frame.h"
#include "window.h"
#include "termhooks.h"
#include "blockinput.h"
-#include "dispextern.h"
#include "buffer.h"
#ifdef USE_X_TOOLKIT
Lisp_Object prefix, int maxdepth)
{
struct skp skp;
- struct gcpro gcpro1;
skp.pending_maps = Qnil;
skp.maxdepth = maxdepth;
skp.notbuttons = menu_items_used;
}
- GCPRO1 (skp.pending_maps);
map_keymap_canonical (keymap, single_menu_item, Qnil, &skp);
- UNGCPRO;
/* Process now any submenus which want to be panes at this level. */
while (CONSP (skp.pending_maps))
single_menu_item (Lisp_Object key, Lisp_Object item, Lisp_Object dummy, void *skp_v)
{
Lisp_Object map, item_string, enabled;
- struct gcpro gcpro1, gcpro2;
bool res;
struct skp *skp = skp_v;
/* Parse the menu item and leave the result in item_properties. */
- GCPRO2 (key, item);
res = parse_menu_item (item, 0);
- UNGCPRO;
if (!res)
return; /* Not a menu item. */
MENU is a specifier for a menu. For the simplest case, MENU is a keymap.
The menu items come from key bindings that have a menu string as well as
a definition; actually, the "definition" in such a key binding looks like
-\(STRING . REAL-DEFINITION). To give the menu a title, put a string into
+(STRING . REAL-DEFINITION). To give the menu a title, put a string into
the keymap as a top-level element.
If REAL-DEFINITION is nil, that puts a nonselectable string in the menu.
Lisp_Object x, y, window;
int menuflags = 0;
ptrdiff_t specpdl_count = SPECPDL_INDEX ();
- struct gcpro gcpro1;
if (NILP (position))
/* This is an obsolete call, which wants us to precompute the
record_unwind_protect_void (unuse_menu_items);
title = Qnil;
- GCPRO1 (title);
/* Decode the menu items from what was specified. */
{
discard_menu_items ();
FRAME_DISPLAY_INFO (f)->grabbed = 0;
- UNGCPRO;
return Qnil;
}
#endif
FRAME_DISPLAY_INFO (f)->grabbed = 0;
#endif
- UNGCPRO;
-
if (error_name) error ("%s", error_name);
return selection;
}
An ITEM may also be just a string--that makes a nonselectable item.
An ITEM may also be nil--that means to put all preceding items
on the left of the dialog box and all following items on the right.
-\(By default, approximately half appear on each side.)
+(By default, approximately half appear on each side.)
If HEADER is non-nil, the frame title for the box is "Information",
otherwise it is "Question".