;ELC ;;; compiled by kwzh@hal.gnu.ai.mit.edu on Fri Jun 24 21:43:08 1994 ;;; from file /gd/gnu/emacs/19.0/lisp/lmenu.el ;;; emacs version 19.25.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/lmenu.el' was compiled for Emacs 19")) (byte-code "\"! \fBB\"!-\n\"" [recompute-lucid-menubar defalias #[nil " ŏ#É" [define-key lucid-menubar-map [menu-bar] nil (make-lucid-menu-keymap "menu-bar" current-menubar) ((error (byte-code "!!\fƉ" [message "Invalid data in current-menubar moved to lucid-failing-menubar" sit-for 1 current-menubar lucid-failing-menubar nil] 2))) lucid-menu-bar-dirty-flag] 6] boundp lucid-menubar-map make-sparse-keymap current-menubar minor-mode-map-alist set-menubar-dirty-flag #[nil " " [force-mode-line-update t lucid-menu-bar-dirty-flag] 2] add-menu-item-count 0 make-lucid-menu-keymap #[(menu-name menu-items) " !\f!\f@ ! H\n ;9\n \"3΂4  :M @ A\"\n @ !\"!\nT\n H# H 9~\nM\nFM\n\n D\nAB \n !! \nB#,\fA\f\n)" [make-sparse-keymap menu-name menu reverse menu-items item vectorp 1 callback nil command name string-match "^-+$" "" make-lucid-menu-keymap make-symbol format "menu-function-%d" add-menu-item-count put menu-enable 2 0 lambda (interactive) define-key vector intern] 6]] 3) (defalias 'popup-menu #[(menu-desc) " @ A\" ÉOA@AAD@D\"O \"\"\f\f!H\f\f!," [make-lucid-menu-keymap menu-desc mouse-pixel-position nil cmd answer pos menu x-popup-menu lookup-key apply vector keymapp call-interactively] 6 "\ Pop up the given menu. A menu is a list of menu items, strings, and submenus. The first element of a menu must be a string, which is the name of the menu. This is the string that will be displayed in the parent menu, if any. For toplevel menus, it is ignored. This string is not displayed in the menu itself. A menu item is a vector of three or four elements: - the name of the menu item (a string); - the `callback' of that item; - whether this item is active (selectable); - and an optional string to append to the name. If the `callback' of a menu item is a symbol, then it must name a command. It will be invoked with `call-interactively'. If it is a list, then it is evaluated with `eval'. The fourth element of a menu item is a convenient way of adding the name of a command's ``argument'' to the menu, like ``Kill Buffer NAME''. If an element of a menu is a string, then that string will be presented in the menu as unselectable text. If an element of a menu is a string consisting solely of hyphens, then that item will be presented as a solid horizontal line. If an element of a menu is a list, it is treated as a submenu. The name of that submenu (the first element in the list) will be used as the name of the item representing this menu on the parent. The syntax, more precisely: form := command := callback := command | form active-p := text := name := argument := menu-item := '[' name callback active-p [ argument ] ']' menu := '(' name [ menu-item | menu | text ]+ ')' "]) (defalias 'popup-dialog-box #[(data) "@A I @\fBB @H @H @H\n \f\n<\f B>\f\fB+ A\fB\"\fk\nA9g\nA!k\nA!-" [data nil meaning choice converted tail name 0 1 2 enable callback item x-popup-dialog t call-interactively eval] 6 "\ Pop up a dialog box. A dialog box description is a list. - The first element of the list is a string to display in the dialog box. - The rest of the elements are descriptions of the dialog box's buttons. Each one is a vector of three elements: - The first element is the text of the button. - The second element is the `callback'. - The third element is t or nil, whether this button is selectable. If the `callback' of a button is a symbol, then it must name a command. It will be invoked with `call-interactively'. If it is a list, then it is evaluated with `eval'. One (and only one) of the buttons may be `nil'. This marker means that all following buttons should be flushright instead of flushleft. The syntax, more precisely: form := command := callback := command | form active-p := name := partition := 'nil' button := '[' name callback active-p ']' dialog := '(' name [ button ]+ [ partition [ button ]+ ] ')'"]) (byte-code "" [nil default-menubar] 1) (defalias 'set-menubar #[(menubar) " !\" " [set-default current-menubar copy-sequence menubar set-menubar-dirty-flag] 4 "\ Set the default menubar to be menubar."]) (defalias 'set-buffer-menubar #[(menubar) "! ! " [make-local-variable current-menubar copy-sequence menubar set-menubar-dirty-flag] 2 "\ Set the buffer-local menubar to be menubar."]) (defalias 'find-menu-item #[(menubar item-path-list &optional parent) " \"\f:??\f]@T @@!2@HC@;?@C@@T@ʼnA A:tA A#D\" @D\"B*" [parent mapcar downcase item-path-list menubar nil result rest vectorp 0 find-menu-item signal error "not a submenu" "no such submenu"] 5 "\ Searches MENUBAR for item given by ITEM-PATH-LIST. Returns (ITEM . PARENT), where PARENT is the immediate parent of the item found. Signals an error if the item is not found."]) (defalias 'disable-menu-item #[(path) " \"@\fA \"ɂ D\" :+! I ," [current-menubar menubar find-menu-item path pair item menu signal error "No such menu item" "No such menu" "can't disable menus, only menu items" 2 nil set-menubar-dirty-flag] 5 "\ Make the named menu item be unselectable. PATH is a list of strings which identify the position of the menu item in the menu hierarchy. (\"File\" \"Save\") means the menu item called \"Save\" under the toplevel \"File\" menu. (\"Menu\" \"Foo\" \"Item\") means the menu item called \"Item\" under the \"Foo\" submenu of \"Menu\"."]) (defalias 'enable-menu-item #[(path) " \"@\fA \"ɂ D\" :, \" I ," [current-menubar menubar find-menu-item path pair item menu signal error "No such menu item" "No such menu" "%S is a menu, not a menu item" 2 t set-menubar-dirty-flag] 5 "\ Make the named menu item be selectable. PATH is a list of strings which identify the position of the menu item in the menu hierarchy. (\"File\" \"Save\") means the menu item called \"Save\" under the toplevel \"File\" menu. (\"Menu\" \"Foo\" \"Item\") means the menu item called \"Item\" under the \"Foo\" submenu of \"Menu\"."]) (defalias (quote add-menu-item-1) #[(item-p menu-path item-name item-data enabled-p before) " ŏ< AC\"@'\fD\" \f\n\n=L@C\"@VA@C\"@AuA@uAa@CCA)A9*\n # B C\"@A@= ABA\n=@= B C*7 I ??IC    +" [before current-menubar menubar nil (byte-code " \n\"@" [find-menu-item menubar menu-path] 3) ((error)) menu find-menu-item item-name signal error "not a submenu" menu-path item so-far rest rest2 item-p vector item-data enabled-p added-before t 1 2 set-menubar-dirty-flag] 5]) (defalias 'add-menu-item #[(menu-path item-name function enabled-p &optional before) "! !  &" [menu-path error "must specify a menu path" item-name "must specify an item name" add-menu-item-1 t function enabled-p before] 7 "\ Add a menu item to some menu, creating the menu first if necessary. If the named item exists already, it is changed. MENU-PATH identifies the menu under which the new menu item should be inserted. It is a list of strings; for example, (\"File\") names the top-level \"File\" menu. (\"File\" \"Foo\") names a hypothetical submenu of \"File\". ITEM-NAME is the string naming the menu item to be added. FUNCTION is the command to invoke when this menu item is selected. If it is a symbol, then it is invoked with `call-interactively', in the same way that functions bound to keys are invoked. If it is a list, then the list is simply evaluated. ENABLED-P controls whether the item is selectable or not. BEFORE, if provided, is the name of a menu item before which this item should be added, if this item is not on the menu already. If the item is already present, it will not be moved."]) (defalias 'delete-menu-item #[(path) " \"@\fA  ??2=( \". \" ," [current-menubar menubar find-menu-item path pair item menu delq set-menubar-dirty-flag] 4 "\ Remove the named menu item from the menu hierarchy. PATH is a list of strings which identify the position of the menu item in the menu hierarchy. (\"File\" \"Save\") means the menu item called \"Save\" under the toplevel \"File\" menu. (\"Menu\" \"Foo\" \"Item\") means the menu item called \"Item\" under the \"Foo\" submenu of \"Menu\"."]) (defalias 'relabel-menu-item #[(path new-name) ";\fD\"\f \"@ A\n 4\n.̂/D\" :I @;I O I  ," [new-name signal wrong-type-argument stringp current-menubar menubar find-menu-item path pair item menu error "No such menu item" "No such menu" 0 set-menubar-dirty-flag] 5 "\ Change the string of the specified menu item. PATH is a list of strings which identify the position of the menu item in the menu hierarchy. (\"File\" \"Save\") means the menu item called \"Save\" under the toplevel \"File\" menu. (\"Menu\" \"Foo\" \"Item\") means the menu item called \"Item\" under the \"Foo\" submenu of \"Menu\". NEW-NAME is the string that the menu item will be printed as from now on."]) (defalias 'add-menu #[(menu-path menu-name menu-items &optional before) "! !  &" [menu-name error "must specify a menu name" menu-items "must specify some menu items" add-menu-item-1 nil menu-path t before] 7 "\ Add a menu to the menubar or one of its submenus. If the named menu exists already, it is changed. MENU-PATH identifies the menu under which the new menu should be inserted. It is a list of strings; for example, (\"File\") names the top-level \"File\" menu. (\"File\" \"Foo\") names a hypothetical submenu of \"File\". If MENU-PATH is nil, then the menu will be added to the menubar itself. MENU-NAME is the string naming the menu to be added. MENU-ITEMS is a list of menu item descriptions. Each menu item should be a vector of three elements: - a string, the name of the menu item; - a symbol naming a command, or a form to evaluate; - and a form whose value determines whether this item is selectable. BEFORE, if provided, is the name of a menu before which this menu should be added, if this menu is not on its parent already. If the menu is already present, it will not be moved."]) (byte-code "!\f!!" [boundp put-buffer-names-in-file-menu t set-menubar default-menubar provide lmenu] 2)