/* 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.
GNU Emacs is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
GNU Emacs is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
#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. */
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
{
/* Use the mouse's current position. */
struct frame *new_f = SELECTED_FRAME ();
+
+ XSETFASTINT (x, 0);
+ XSETFASTINT (y, 0);
#ifdef HAVE_X_WINDOWS
if (FRAME_X_P (new_f))
{
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;
}