;ELC ;;; compiled by kwzh@hal.gnu.ai.mit.edu on Mon Apr 17 19:53:45 1995 ;;; from file /gd/gnu/emacs/19.0/lisp/tmm.el ;;; emacs version 19.28.90.26. ;;; 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/tmm.el' was compiled for Emacs 19")) (byte-code "! # # #\n#\n#BBBBBB" [require electric define-key completion-list-mode-map "" abort-recursive-edit [left] backward-word [right] forward-word minibuffer-local-must-match-map [up] previous-history-element [down] next-history-element tmm-short-cuts current-load-list tmm-old-mb-map tmm-old-comp-map tmm-c-prompt tmm-km-list tmm-table-undef] 4) #@101 Text-mode emulation of looking and choosing from a menubar. See the documentation for `tmm-prompt'. (defalias 'tmm-menubar #[nil "!!!" [run-hooks menu-bar-update-hook tmm-prompt tmm-get-keybind [menu-bar]] 3 (#$ . 888) nil]) #@57 String to insert between shortcut and menu item or nil. (defvar tmm-mid-prompt "==>" (#$ . 1126)) #@34 A place to store minibuffer map. (defvar tmm-mb-map nil (#$ . 1230)) #@42 What insert on top of completion buffer. (defvar 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. ESC ESC to cancel.\n" (#$ . 1305)) #@479 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: *) Either 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. If the optional argument IN-POPUP is set, is argument-compatible with `x-popup-menu', otherwise the argument BIND should be a cdr of sparse keymap. (defalias 'tmm-prompt #[(bind &optional in-popup) " \"É \n \f ! \"\fM\f!!\fNՃ\f\"\n\nG \n$\n S\n8\"ێ P\f \\B& ) \f\"A GGV GO GO  \f\"A @ A \" ! <䏈揈 ! J!  !  .\n" [in-popup bind x-popup-menu nil tmm-short-cuts tmm-old-comp-map tmm-old-mb-map tmm-c-prompt tmm-table-undef compl-list-l compl-list out tmm-km-list gl-str run-hooks activate-menubar-hook mapcar #[(elt) "; < \"" [elt gl-str tmm-get-keymap in-popup] 3] tmm-mid-prompt reverse tmm-add-shortcuts t car append add-hook minibuffer-setup-hook tmm-add-prompt ((byte-code "q\n!p!)" ["*Completions*" use-local-map tmm-old-comp-map bury-buffer] 2)) completing-read " (up/down to change, PgUp to menu): " assoc 0 last-command-event tmm-prompt keymapp (byte-code "!" [require mouse] 2) ((error)) (x-popup-menu nil bind) ((error)) call-interactively] 11 (#$ . 1668)]) (defalias 'tmm-remove-shortcuts #[nil " !" [use-local-map tmm-mb-map] 2]) #@198 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. Adds the shortcuts to a free variable `tmm-short-cuts'. (defalias 'tmm-add-shortcuts #[(list) " !\"" [mapcar #[(elt) "@O%\f\"%\fƔTO 0> B \n\fQAB+" [elt nil b f str 0 1 tmm-short-cuts string-match " \\([^ ]\\)" tmm-mid-prompt] 4] reverse list] 4 (#$ . 3269)]) (defalias 'tmm-add-prompt #[nil "\"\"  \f\" # # # #  A\"!؋!!!q  A\"!!) c*" [remove-hook minibuffer-setup-hook tmm-add-prompt add-hook minibuffer-exit-hook tmm-delete-map make-sparse-keymap selected-window win map mapcar #[(str) " \n# \n#" [define-key map str tmm-shortcut] 4] tmm-short-cuts define-key [pageup] tmm-goto-completions [prior] "v" "" abort-recursive-edit current-local-map tmm-old-mb-map use-local-map append ((byte-code " qb c" [minibuffer-completion-help "*Completions*" 1 tmm-completion-prompt] 1)) other-window 1 window-buffer Electric-pop-up-window "*Completions*" tmm-old-comp-map select-window tmm-c-prompt] 4]) (defalias 'tmm-delete-map #[nil "\"\f!" [remove-hook minibuffer-exit-hook tmm-delete-map use-local-map tmm-old-mb-map] 3]) (defalias 'tmm-shortcut #[nil " ! 2 ǚ$ \f Q! 2 \" c *" [char-to-string last-command-char nil s c tmm-short-cuts buffer-name "*Completions*" beginning-of-buffer re-search-forward "\\(^\\|[ ]\\)" tmm-mid-prompt choose-completion erase-buffer mapcar #[(elt) "@\nGT@G^O \nP@" [elt 0 tmm-mid-prompt c s] 4] tmm-km-list exit-minibuffer] 5 nil nil]) (defalias 'tmm-goto-completions #[nil "  ! ! !" [buffer-string tmm-c-prompt erase-buffer switch-to-buffer-other-window "*Completions*" search-forward search-backward] 2 nil nil]) #@352 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, on `x-popup-menu' argument, or an element of `x-popup-menu' argument (when IN-X-MENU is not-nil). Does it only if it is not already there. Uses free variable `tmm-table-undef' to keep undefined keys. (defalias 'tmm-get-keymap #[(elt &optional in-x-menu) " @ A=\nBBT\n\". <1 !4 != .