-;; Copyright (C) 1994, 1995, 1996, 2000, 2001
+;; Copyright (C) 1994, 1995, 1996, 2000, 2001, 2002
;; Free Software Foundation, Inc.
;; Author: Ilya Zakharevich <ilya@math.mps.ohio-state.edu>
;; Maintainer: FSF
;; Free Software Foundation, Inc.
;; Author: Ilya Zakharevich <ilya@math.mps.ohio-state.edu>
;; Maintainer: FSF
-;; To use this package add
-
-;; (autoload 'tmm-menubar 'tmm "Text mode substitute for menubar" t)
-;; (global-set-key [f10] 'tmm-menubar)
-;; to your .emacs file. You can also add your own access to different
-;; menus available in Window System Emacs modeling definition after
-;; tmm-menubar.
+;; This package provides text mode access to the menu bar.
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."
:type 'string
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."
:type 'string
marked letters to pick up your choice. Type C-g or ESC ESC ESC to cancel.
"
"*Help text to insert on the top of the completion buffer.
marked letters to pick up your choice. Type C-g or ESC ESC ESC to cancel.
"
"*Help text to insert on the top of the completion buffer.
- "*What letters to use as menu shortcuts.
-Must be either one of the symbols `downcase' or `upcase',
+ "*What letters to use as menu shortcuts.
+Must be either one of the symbols `downcase' or `upcase',
(defcustom tmm-shortcut-words 2
"*How many successive words to try for shortcuts, nil means all.
(defcustom tmm-shortcut-words 2
"*How many successive words to try for shortcuts, nil means all.
;; We just did the inner level of a -popup menu.
choice)
;; We just did the outer level. Do the inner level now.
;; We just did the inner level of a -popup menu.
choice)
;; We just did the outer level. Do the inner level now.
(defsubst tmm-add-one-shortcut (elt)
;; uses the free vars tmm-next-shortcut-digit and tmm-short-cuts
(let* ((str (car elt))
(defsubst tmm-add-one-shortcut (elt)
;; uses the free vars tmm-next-shortcut-digit and tmm-short-cuts
(let* ((str (car elt))
(not (and paren (> pos paren)))) ; don't go past "(binding.."
(if (or (= pos 0)
(/= (aref str (1- pos)) ?.)) ; avoid file extensions
(not (and paren (> pos paren)))) ; don't go past "(binding.."
(if (or (= pos 0)
(/= (aref str (1- pos)) ?.)) ; avoid file extensions
(add-hook 'minibuffer-exit-hook 'tmm-delete-map nil t)
(let ((win (selected-window)))
(setq tmm-old-mb-map (tmm-define-keys t))
;; Get window and hide it for electric mode to get correct size
(add-hook 'minibuffer-exit-hook 'tmm-delete-map nil t)
(let ((win (selected-window)))
(setq tmm-old-mb-map (tmm-define-keys t))
;; Get window and hide it for electric mode to get correct size
"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."
"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."
(progn
;; Otherwise, it is a prefix, so make a list of the subcommands.
;; Make a list of all the bindings in all the keymaps.
(progn
;; Otherwise, it is a prefix, so make a list of the subcommands.
;; Make a list of all the bindings in all the keymaps.
(setq allbind (cons (local-key-binding keyseq) allbind))
(setq allbind (cons (global-key-binding keyseq) allbind))
;; Merge all the elements of ALLBIND into one keymap.
(setq allbind (cons (local-key-binding keyseq) allbind))
(setq allbind (cons (global-key-binding keyseq) allbind))
;; Merge all the elements of ALLBIND into one keymap.