]> code.delx.au - gnu-emacs/blobdiff - src/menu.c
Merge from origin/emacs-25
[gnu-emacs] / src / menu.c
index e36fe260f24b658cad1fd5113807bf14bcbb042e..737f2b55e8b9525050b48ff0e0faf9fda6ae941d 100644 (file)
@@ -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
@@ -23,13 +23,14 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #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
@@ -407,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);
        }
   }
@@ -1235,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))
          {