/[emacs]/emacs/src/macmenu.c
ViewVC logotype

Diff of /emacs/src/macmenu.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.26 by nickrob, Tue May 24 08:45:35 2005 UTC revision 1.27 by jhd, Sat Jun 4 08:06:57 2005 UTC
# Line 602  list_of_items (pane) Line 602  list_of_items (pane)
602      }      }
603  }  }
604    
605    static Lisp_Object
606    cleanup_popup_menu (arg)
607         Lisp_Object arg;
608    {
609      discard_menu_items ();
610    }
611    
612  DEFUN ("x-popup-menu", Fx_popup_menu, Sx_popup_menu, 2, 2, 0,  DEFUN ("x-popup-menu", Fx_popup_menu, Sx_popup_menu, 2, 2, 0,
613         doc: /* Pop up a deck-of-cards menu and return user's selection.         doc: /* Pop up a deck-of-cards menu and return user's selection.
614  POSITION is a position specification.  This is either a mouse button  POSITION is a position specification.  This is either a mouse button
# Line 647  cached information about equivalent key Line 654  cached information about equivalent key
654    int keymaps = 0;    int keymaps = 0;
655    int for_click = 0;    int for_click = 0;
656    struct gcpro gcpro1;    struct gcpro gcpro1;
657      int specpdl_count = SPECPDL_INDEX ();
658    
659    
660  #ifdef HAVE_MENUS  #ifdef HAVE_MENUS
661    if (! NILP (position))    if (! NILP (position))
# Line 806  cached information about equivalent key Line 815  cached information about equivalent key
815    
816  #ifdef HAVE_MENUS  #ifdef HAVE_MENUS
817    /* Display them in a menu.  */    /* Display them in a menu.  */
818      record_unwind_protect (cleanup_popup_menu, Qnil);
819    BLOCK_INPUT;    BLOCK_INPUT;
820    
821    selection = mac_menu_show (f, xpos, ypos, for_click,    selection = mac_menu_show (f, xpos, ypos, for_click,
822                               keymaps, title, &error_name);                               keymaps, title, &error_name);
823    UNBLOCK_INPUT;    UNBLOCK_INPUT;
824      unbind_to (specpdl_count, Qnil);
   discard_menu_items ();  
825    
826    UNGCPRO;    UNGCPRO;
827  #endif /* HAVE_MENUS */  #endif /* HAVE_MENUS */
# Line 1931  mac_menu_show (f, x, y, for_click, keyma Line 1940  mac_menu_show (f, x, y, for_click, keyma
1940              }              }
1941          }          }
1942      }      }
1943      else if (!for_click)
1944        /* Make "Cancel" equivalent to C-g.  */
1945        Fsignal (Qquit, Qnil);
1946    
1947    return Qnil;    return Qnil;
1948  }  }

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26