X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/20aa42e8204f8f0139ba3880cb32ddf88acc9bf4..d1e2b10afa2df313e029b3faeeb0d694fd6e0fbc:/src/menu.c diff --git a/src/menu.c b/src/menu.c index 74df43f6ce..737f2b55e8 100644 --- a/src/menu.c +++ b/src/menu.c @@ -1,14 +1,14 @@ /* 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 @@ -408,7 +408,7 @@ single_menu_item (Lisp_Object key, Lisp_Object item, Lisp_Object dummy, void *sk if (prefix) { - AUTO_STRING (prefix_obj, prefix); + AUTO_STRING_WITH_LEN (prefix_obj, prefix, 4); item_string = concat2 (prefix_obj, item_string); } } @@ -1130,7 +1130,7 @@ If POSITION is t, it means to use the current mouse position. 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. @@ -1236,6 +1236,9 @@ no quit occurs and `x-popup-menu' returns nil. */) { /* 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)) { @@ -1492,7 +1495,7 @@ The return value is VALUE from the chosen item. 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".