;ELC   
;;; Compiled by pot@pot.cnuce.cnr.it on Tue Mar 18 15:53:07 2003
;;; from file /home/pot/gnu/emacs-pretest.new/lisp/tmm.el
;;; in Emacs version 21.3
;;; with bytecomp version 2.85.4.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`tmm.el' was compiled for Emacs 19.29 or later"))

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


(byte-code "\302\303!\210\304\305\306\307\310\311\312\313&\210\314B\301B\315\301!\204 \306\316B\317B\320B\321B\322B\306\207" [current-load-list tmm-old-mb-map require electric custom-declare-group tmm nil "Text mode access to menu-bar." :prefix "tmm-" :group menu tmm-short-cuts boundp tmm-old-comp-map tmm-c-prompt tmm-km-list tmm-next-shortcut-digit tmm-table-undef] 8)
#@252 Text-mode emulation of looking and choosing from a menubar.
See the documentation for `tmm-prompt'.
X-POSITION, if non-nil, specifies a horizontal position within the menu bar;
we make that menu bar item (the one at that position) the default choice.
(defalias 'tmm-menubar #[(&optional x-position) "\306\307!\210\310\311!\312\n\211\203( @\211	\236\313\314	\"C\"*A\211\204 )\203x 	\312\315\211\203t W\203t @@:\203k @A:\203k @A@;\203k @A@G\\\316\\A\211\204: @+\317	\312#*\207" [menu-bar-item menu-bar menu-bar-final-items list item this-one run-hooks menu-bar-update-hook tmm-get-keybind [menu-bar] nil append delq 0 1 tmm-prompt x-position column tail] 5 (#$ . 998) nil])
#@225 Text-mode emulation of looking and choosing from a menubar.
This command is used when you click the mouse in the menubar
on a console which has no window system but does have a mouse.
See the documentation for `tmm-prompt'.
(defalias 'tmm-menubar-mouse #[(event) "\302\3038)\304	8)@!\207" [event position tmm-menubar 1 2] 3 (#$ . 1722) "e"])
#@201 *String to insert between shortcut and menu item. 
If nil, there will be no shortcuts. It should not consist only of spaces,
or else the correct item might not be found in the `*Completions*' buffer.
(custom-declare-variable 'tmm-mid-prompt '"==>" '(#$ . -2075) :type 'string :group 'tmm)
#@34 A place to store minibuffer map.
(defvar tmm-mb-map nil (#$ . 2370))
#@160 *Help text to insert on the top of the completion buffer.
To save space, you can set this to nil,
in which case the standard introduction text is deleted too.
(custom-declare-variable 'tmm-completion-prompt '"Press PageUp Key to reach this buffer from the minibuffer.\nAlternatively, you can use Up/Down keys (or your History keys) to change\nthe item in the minibuffer, and press RET when you are done, or press the \nmarked letters to pick up your choice.  Type C-g or ESC ESC ESC to cancel.\n" '(#$ . -2446) :type '(choice string (const nil)) :group 'tmm)
#@152 *What letters to use as menu shortcuts. 
Must be either one of the symbols `downcase' or `upcase', 
or else a list of the two in the order you prefer.
(custom-declare-variable 'tmm-shortcut-style ''(downcase upcase) '(#$ . -3012) :type '(choice (const downcase) (const upcase) (repeat (choice (const downcase) (const upcase)))) :group 'tmm)
#@169 *How many successive words to try for shortcuts, nil means all.
If you use only one of `downcase' or `upcase' for `tmm-shortcut-style', 
specify nil for this variable.
(custom-declare-variable 'tmm-shortcut-words '2 '(#$ . -3360) :type '(choice integer (const nil)) :group 'tmm)
#@546 Text-mode emulation of calling the bindings in keymap.
Creates a text-mode menu of possible choices.  You can access the elements
in the menu in two ways:
   *)  via history mechanism from minibuffer;
   *)  Or via completion-buffer that is automatically shown.
The last alternative is currently a hack, you cannot use mouse reliably.

MENU is like the MENU argument to `x-popup-menu': either a
keymap or an alist of alists.
DEFAULT-ITEM, if non-nil, specifies an initial default choice.
Its value should be an event that has a binding in MENU.
(defalias 'tmm-prompt #[(menu &optional in-popup default-item) "\306\307\211\211\211\211\211\211\211\211\211\211\310!?()*+,-.\311\312!\210\313\314\"\210	\203B -G\315U\203B -@A\202.-\204K \316\317!\210-\203\341 \320/0\203^ \321-!-1\203\235 \2112\203\234 2@\2421=\204\234 2@:\203\223 2@A\242;\204\216 2@A\242\322=\203\223 /T/2A\2112\204j )\323\324\325-\"!\211G+\326\211\211\211$+/Z\315Z8)\327\330\331\"\210\212\332\216\333.\334P-\307\335\307\336+\211\\\320\\/ZB&,+\337,-\"A\211\204,G)GV\203,\320)GO)\230\203,)G\307O,\337,-\"A\n\204.,\203.\340,-\",\337,-\"A\n@\nA3\203=\n\202y	\203H\341\n\335\"\202y\310\n!\203g\n9\203W\342\n!\307\343\344\217\210\307\345\346\217\210\341\n!\202y\n\205y\203x4\347\n!\202y\n.\207" [menu not-menu choice chosen-string tmm-short-cuts tmm-old-comp-map "Menu bar" nil keymapp run-hooks activate-menubar-hook mapc #[(elt) ";\203	 \211\207<\205 \303\n\"\207" [elt gl-str not-menu tmm-get-keymap] 3] 1 error "Empty menu reached" 0 tmm-add-shortcuts menu-item reverse mapcar car append add-hook minibuffer-setup-hook tmm-add-prompt ((byte-code "\212\301\302\303\"\210\304\305!\203 \305q\210\306!\210\307p!\210)\301\207" [tmm-old-comp-map remove-hook minibuffer-setup-hook tmm-add-prompt get-buffer "*Completions*" use-local-map bury-buffer] 3)) completing-read " (up/down to change, PgUp to menu): " t history assoc try-completion tmm-prompt indirect-function (byte-code "\300\301!\207" [require mouse] 2) ((error)) (x-popup-menu nil choice) ((error)) call-interactively tmm-old-mb-map tmm-c-prompt tmm-table-undef history-len out tmm-km-list gl-str index-of-default tmm-mid-prompt default-item tail in-popup last-command-event] 15 (#$ . 3646)])
#@216 Adds shortcuts to cars of elements of the list.
Takes a list of lists with a string as car, returns list with
shortcuts added to these cars.
Stores a list of all the shortcuts in the free variable `tmm-short-cuts'.
(defalias 'tmm-add-shortcuts #[(list) "\302\303\304\305	!\")\207" [tmm-next-shortcut-digit list 48 mapcar tmm-add-one-shortcut reverse] 4 (#$ . 5976)])
(defalias 'tmm-add-one-shortcut #[(elt) "@\306\307	\"\310\310\311\312\313\215\210\203 B\203) \314!P\2020 \315GT\316\"	PA-B\207" [elt str paren pos word char string-match "(" 0 nil done (byte-code "\203\n 	W\203g \306\307\n#\211\203g \f\203 \fV\204g \310U\204- \nSH\311U\204^ <\2036 \2028 C\211\203] @\nH!\211>\204T \312\313\"\210A\211\204> )	T\310\225\202  \314X\203\210 T>\204g \312\313\"\210\202g \315\315\207" [tmm-shortcut-words word str pos paren tmm-shortcut-style string-match "\\w+" 0 46 throw done 57 nil shortcut-style char tmm-short-cuts tmm-next-shortcut-digit] 5) char-to-string make-string 32 tmm-short-cuts tmm-mid-prompt] 3])
(put 'tmm-add-one-shortcut 'byte-optimizer 'byte-compile-inline-expand)
(defalias 'tmm-define-keys #[(minibuffer) "\303 \304\305\"\210\306\307	\"\210\n\203/ \310\311\312#\210\310\313\312#\210\310\314\312#\210\310\315\316#\210\310\317\320#\210\321 \322\323\321 \"!\210)\207" [map tmm-short-cuts minibuffer make-sparse-keymap suppress-keymap t mapc #[(c) "<\203 \303	\304\n!\305#\207\303	\304\n\227!\305#\210\303	\304\n\226!\305#\207" [tmm-shortcut-style map c define-key char-to-string tmm-shortcut] 4] define-key [pageup] tmm-goto-completions [prior] "v" "" next-history-element "" previous-history-element current-local-map use-local-map append] 5])
(defalias 'tmm-completion-delete-prompt #[nil "q\210\301b\210\301\302\303!|\207" [standard-output 1 search-forward "Possible completions are:\n"] 3])
(defalias 'tmm-add-prompt #[nil "\305\306\307\"\210\310\311!\210\312\311\313\314\315$\210\316 \317\315!\320\213\210\316 \321\216\322\323!\210\324\325!\210r\325q\210\317\314!+\fc)\207" [win tmm-old-mb-map save-selected-window-window tmm-old-comp-map tmm-c-prompt remove-hook minibuffer-setup-hook tmm-add-prompt make-local-hook minibuffer-exit-hook add-hook tmm-delete-map nil t selected-window tmm-define-keys ((byte-code "\304\305\"\n\204 \306\307\310\311#\210\312\220\313	!\221\210\314\307\310\"\210)\n\203, \312q\210\315eb\210\nc\210)\315\207" [minibuffer-completion-table completions tmm-completion-prompt buffer-read-only mapcar car add-hook completion-setup-hook tmm-completion-delete-prompt append "*Completions*" display-completion-list remove-hook nil] 4)) ((byte-code "\301!\203\n \302!\210\301\207" [save-selected-window-window window-live-p select-window] 2)) other-window 1 Electric-pop-up-window "*Completions*"] 5])
(defalias 'tmm-delete-map #[nil "\301\302\303\304#\210\205 \305!\207" [tmm-old-mb-map remove-hook minibuffer-exit-hook tmm-delete-map t use-local-map] 4])
#@42 Choose the shortcut that the user typed.
(defalias 'tmm-shortcut #[nil "\3069\203 \n!\n\f>\205; \307 \310\232\203+ \311 \210\312\313\314\n!Q!\210\315 \202; \316 d|\210\317\320\"\210	c\210\321 *\207" [last-command-char s c tmm-shortcut-style tmm-short-cuts tmm-mid-prompt nil buffer-name "*Completions*" beginning-of-buffer re-search-forward "\\(^\\|[ 	]\\)" char-to-string choose-completion minibuffer-prompt-end mapc #[(elt) "@\304	GT@G^O\305\n!	P\230\205 @\211\207" [elt tmm-mid-prompt c s 0 char-to-string] 4] exit-minibuffer tmm-km-list] 4 (#$ . 8972) nil])
(defalias 'tmm-goto-completions #[nil "\302 \211d{d|\210)\303\304!\210\305	!\210\306	!\207" [prompt-end tmm-c-prompt minibuffer-prompt-end switch-to-buffer-other-window "*Completions*" search-forward search-backward] 3 nil nil])
#@383 Prepends (DOCSTRING EVENT BINDING) to free variable `tmm-km-list'.
The values are deduced from the argument ELT, that should be an
element of keymap, an `x-popup-menu' argument, or an element of
`x-popup-menu' argument (when IN-X-MENU is not-nil).
This function adds the element only if it is not already present.
It uses the free variable `tmm-table-undef' to keep undefined keys.
(defalias 'tmm-get-keymap #[(elt &optional in-x-menu) "\306\211\211\211\211\211@A\211\307=\203& 	\306BB\211\202\310	\"\204\266<\203@ \311!\204F @\312=\202C \313!\203L \202\266\243<\203a \311\243!\204h \243@\312=\202e \313\243!\203y A@;\203\266@\202\266\243\243<\203\221 \311\243\243!\204\231 \243\243@\312=\202\226 \313\243\243!\203\313 AA@;\203\250 @\203\266A@A;\203\266A@A\211\203\266\203\266P\202\266\242\314=\2038\243\243\243\211\242:\203\340 \f\243\3158\316A@!\317\f\320\"\211\203\373 !\317\f\321\"\211\203\316\n!\205\f\203\266\3228:\203\266\3228A;\203\266\3228A\211\203\266\203\266P\202\266\243\243\243<\203S\311\243\243\243!\204\\\243\243\243@\312=\202Y\313\243\243\243!\203\221AAA@;\203l@\203\266AA@A;\203\266AA@A\211\203\266\203\266P\202\266	;\203\266\204\241\242;\203\254	\306\202\266	\306\323B\203\305;\203\305\203\3439\203\343\324N\203\343\316\324N!\204\343\306\205\205\310\"\206	BBB\211.\207" [elt event visible filter plist cache nil undefined assoc keymapp lambda fboundp menu-item 2 eval plist-get :filter :visible 3 keymap menu-enable str km tmm-table-undef in-x-menu tmm-km-list] 8 (#$ . 9788)])
#@299 Return the current binding of KEYSEQ, merging prefix definitions.
If KEYSEQ is a prefix key that has local and global bindings,
we merge them into a single keymap which shows the proper order of the menu.
However, for the menu bar itself, the value does not take account
of `menu-bar-final-items'.
(defalias 'tmm-get-keybind #[(keyseq) "\303\211\304\n!\305!\203 \303\206- \306\307\310\n!\"\311\n!	B\312\n!	B\313\314	\"\210*\207" [bind allbind keyseq nil key-binding keymapp mapcar cdr minor-mode-key-binding local-key-binding global-key-binding mapc #[(in) "9\203 \302!\203 K\205, \302!\205, \302	!\203' 	\303A!\244\211\207\303!\211\207" [in bind keymapp copy-sequence] 3]] 4 (#$ . 11501)])
(byte-code "\300\301\302\"\210\303\304!\207" [add-hook calendar-load-hook #[nil "\300\301!\207" [require cal-menu] 2] provide tmm] 3)
