;ELC ;;; compiled by kwzh@hal.gnu.ai.mit.edu on Sat May 20 00:27:49 1995 ;;; from file /gd/gnu/emacs/19.0/lisp/easymenu.el ;;; emacs version 19.28.92.1. ;;; 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"))) (error "`/gd/gnu/emacs/19.0/lisp/easymenu.el' was compiled for Emacs 19")) #@1981 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 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 (#$ . 486)])) (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‚j :ƒPÐ @ A\"\n @\f‚jÆ !ƒjÑÒÓ\"!\nT ÕH\f ÖH‰9ƒ;Ø!ÕHÙUƒ;Öɉ‰‰‰ GVƒõ H THÖ\\à=ƒ¹‚á=ƒÇ‚â=ƒÙ\fãQ\f‚ä=ƒç‚å=ƒ‚ƒ\fæçR\fè=ƒé\fP\fƒ ê\në#ˆ‚6ì=ƒ6ƒ6ê\nëíD#ˆ.‚Cê\në#ˆ)î!ƒQ\fïP\f9ƒ`\nMˆ‚j\nðÉñFMˆ\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) 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 (#$ . 3989)]) (defalias 'easy-menu-remove #[(menu) "À‡" [nil] 1]) (defalias 'easy-menu-add #[(menu &optional map) "À‡" [nil] 1]) (provide (quote easymenu))