;ELC   
;;; compiled by rms@psilocin.gnu.ai.mit.edu on Thu Jun 13 16:45:58 1996
;;; from file /home/fsf/rms/e19/lisp/easymenu.el
;;; emacs version 19.31.2.
;;; bytecomp version FSF 2.10
;;; optimization is on.
;;; this file uses opcodes which do not exist in Emacs 18.

(if (and (boundp 'emacs-version)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`easymenu.el' was compiled for Emacs 19.29 or later"))


#@1986 Define a menu bar submenu in maps MAPS, according to MENU.
The menu keymap is stored in symbol SYMBOL, both as its value
and as its function definition.   DOC is used as the doc string for SYMBOL.

The first element of MENU must be a string.  It is the menu bar item name.
The rest of the elements are menu items.

A menu item is usually a vector of three elements:  [NAME CALLBACK ENABLE]

NAME is a string--the menu item name.

CALLBACK is a command to run when the item is chosen,
or a list to evaluate when the item is chosen.

ENABLE is an expression; the item is enabled for selection
whenever this expression's value is non-nil.

Alternatively, a menu item may have the form: 

   [ NAME CALLBACK [ KEYWORD ARG ] ... ]

Where KEYWORD is one of the symbol defined below.

   :keys KEYS

KEYS is a string; a complex keyboard equivalent to this menu item.
This is normally not needed because keyboard equivalents are usually
computed automatically.

   :active ENABLE

ENABLE is an expression; the item is enabled for selection
whenever this expression's value is non-nil.

   :suffix NAME

NAME is a string; the name of an argument to CALLBACK.

   :style STYLE
   
STYLE is a symbol describing the type of menu item.  The following are
defined:  

toggle: A checkbox.  
        Currently just prepend the name with the string "Toggle ".
radio: A radio button. 
nil: An ordinary menu item.

   :selected SELECTED

SELECTED is an expression; the checkbox or radio button is selected
whenever this expression's value is non-nil.
Currently just disable radio buttons, no effect on checkboxes.

A menu item can be a string.  Then that string appears in the menu as
unselectable text.  A string consisting solely of hyphens is displayed
as a solid horizontal line.

A menu item can be a list.  It is treated as a submenu.
The first element should be the submenu name.  That's used as the
menu item in the top-level menu.  The cdr of the submenu list
is a list of menu items, as above.
(defalias 'easy-menu-define '(macro . #[(symbol maps doc menu) "ÀÁ\nÃ\fFÅÆ\nD\f¯E‡" [progn defvar symbol nil doc easy-menu-do-define quote maps menu] 7 (#$ . 477)]))
(defalias 'easy-menu-do-define #[(symbol maps doc menu) "Á\n@\nA\"LˆÃÄÆÇÈE¯MˆÉÊË\f!ƒ% \fC‚' \f\"‡" [symbol easy-menu-create-keymaps menu lambda (event) doc (interactive "@e") easy-popup-menu event mapcar #[(map) "À	ÂÃÄ@!\"@JB#‡" [define-key map vector menu-bar intern menu symbol] 6] keymapp maps] 8])
(byte-code "ÀÁ!„ ÂÁBÀ‡" [boundp easy-menu-item-count 0 current-load-list] 2)
(defalias 'easy-menu-create-keymaps #[(menu-name menu-items) "À	!Ã\f!‰ƒŸ\f@Æ!… ÇHÉ\nÉÉ\f;ƒ< É\nÍÎ\"ƒ6 Ï‚7 \f‚q:ƒP Ð@A\"\n@\f‚qÆ!ƒqÑÒÓ\"!\nTÕH\fÖH‰9ƒ;Ø!ÕHÙUƒ;ÖÉ‰‰‰‰GVƒõ HTHÖ\\à=ƒ¹ ‚ á=ƒÇ ‚ â=ƒÙ \fãQ\f‚ ä=ƒç ‚ å=ƒ ‚ ƒ\fæçR\fè=ƒé\fP\fƒ ê\në#ˆ‚6ì=ƒ6ƒ6ê\nëíD#ˆ.‚Cê\në#ˆ)î!ƒQ\fïP\f9ƒ`\nMˆ‚j\nðÉñFMˆê\nòó#ˆ\n„ƒ\nÉ\fD\nAB¡ˆ‚—\fƒ—ô\nõö\f!!\f\nB#ˆ-\fA‰„\f \n)‡" [make-sparse-keymap menu-name menu reverse menu-items item vectorp 1 callback nil command enabler name string-match "^-+$" "" easy-menu-create-keymaps make-symbol format "menu-function-%d" easy-menu-item-count 0 2 keyword symbol-name 58 arg keys active selected style count :keys :active :suffix " " :style :selected "  (" ")" toggle "Toggle " put menu-enable radio not keymapp " ..." lambda (interactive) menu-alias t define-key vector intern] 7])
#@326 Change menu found at PATH as item NAME to contain ITEMS.
PATH is a list of strings for locating the menu containing NAME in the
menu bar.  ITEMS is a list of menu items, as in `easy-menu-define'.
These items entirely replace the previous items in that map.

Call this from `activate-menubar-hook' to implement dynamic menus.
(defalias 'easy-menu-change #[(path name items) "ÀÁÂÃÄÅÆC\"\"#!	Ê	!ƒ& 	Ë\f\"A¡‚) ÍÎ!)‡" [key-binding apply vector menu-bar mapcar intern append path name map keymapp easy-menu-create-keymaps items error "Malformed menu in `easy-menu-change'"] 9 (#$ . 4006)])
(defalias 'easy-menu-remove #[(menu) "À‡" [nil] 1])
(defalias 'easy-menu-add #[(menu &optional map) "À‡" [nil] 1])
(provide (quote easymenu))
