
(provide (quote menu))

(defvar menu-choice nil "\
Item selected from menu.")

(make-variable-buffer-local (quote menu-choice))

(defvar menu-last-input "" "\
String used for searching through menu.")

(make-variable-buffer-local (quote menu-last-input))

(setq-default menu-last-input "")

(defvar menu-mode-map nil "\
Key-map for Menu Mode.")

(defun menu-mode nil "\
Major mode for selecting an item from a menu.
     Like View Mode, but with only the following commands:
     Space, C-n   menu-next-item
     Del, C-p     menu-previous-item
     a,b,...,z    menu-next-match
     Return, Linefeed, ESC C-c   exit.
   Returns the line selected." (interactive) (byte-code "Çˆ† È ˆÉ!ˆÊ‰ˆË‰ˆÄ‰ˆÌ‰ˆÍÎ!ˆÇ‰ˆÏŽÐ )ˆ(‡" [menu-mode-map major-mode mode-name case-fold-search t menu-last-input menu-choice nil menu-set-local-keys use-local-map menu-mode "Menu" "" message "Position on selection and exit with Return (or ESC-^c)." ((byte-code "À‡" [nil] 1)) recursive-edit] 5))

(defun menu-abort-recursive-edit nil "\
Abort recursive edit in menu-mode gracefully." (interactive) (byte-code "ÁˆÁ‰ˆÂ (‡" [menu-choice nil exit-recursive-edit] 2))

(defun menu-exit-recursive-edit nil "\
Pick up selection and exit Menu-mode." (interactive) (byte-code "ÃˆÃÃÄ ˆ`‰ˆÅ ˆ`‰ˆÆ	\"‰ˆÇ *‡" [start stop menu-choice nil beginning-of-line end-of-line buffer-substring exit-recursive-edit] 5))

(defun menu-next-item nil "\
Go to the next item in the menu (wrap around at end)." (interactive) (byte-code "ÁˆÂ ˆmƒ Ã ‚ ÄÅ!ˆÆ‰(‡" [menu-last-input nil end-of-line beginning-of-buffer beginning-of-line 2 ""] 5))

(defun menu-next-match nil "\
Find the next item with last-input-char leading character." (interactive) (byte-code "ÃˆÃ	Å
!P‰ˆÆ ˆÇÈ	PÃÄ#?…6 `‰ˆÉ ˆÇÈ	P#?…6 ÊË!ˆÌ ˆÍ‰)‡" [stop menu-last-input last-input-char nil t char-to-string beginning-of-line re-search-forward "^" beginning-of-buffer message "No match for that character!" ding ""] 9))

(defun menu-previous-item nil "\
Go to the previous item in the menu (wrap around at beginning)." (interactive) (byte-code "ÁˆÂ ˆoƒ Ã ˆÂ ‚ ÂÄ!ˆÅ‰(‡" [menu-last-input nil beginning-of-line end-of-buffer 0 ""] 6))

(defun menu-set-local-keys nil "\
Create key-map for Menu Mode." (byte-code "Á ‰ˆÂ!ˆÃÄÅ#ˆÃÆÇ#ˆÃÈÇ#ˆÃÉÇ#ˆÃÊË#ˆÃÌË#ˆÃÍÎ#ˆÃÏÎ#ˆÃÐÑ#ˆÃÒÑ#ˆÃÓÑ#ˆÃÔÑ#ˆÃÕÑ#ˆÃÖÑ#ˆÃ×Ñ#ˆÃØÑ#ˆÃÙÑ#ˆÃÚÑ#ˆÃÛÑ#ˆÃÜÑ#ˆÃÝÑ#ˆÃÞÑ#ˆÃßÑ#ˆÃàÑ#ˆÃáÑ#ˆÃâÑ#ˆÃãÑ#ˆÃäÑ#ˆÃåÑ#ˆÃæÑ#ˆÃçÑ#ˆÃèÑ#ˆÃéÑ#ˆÃêÑ#(‡" [menu-mode-map make-keymap suppress-keymap define-key "" menu-abort-recursive-edit "
" menu-exit-recursive-edit "" "" " " menu-next-item "" "" menu-previous-item "" "a" menu-next-match "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o" "p" "q" "r" "s" "t" "u" "v" "w" "x" "y" "z"] 39))

(defun menu-undefined nil "\
Catch all undefined keys for Menu Mode." (interactive) (byte-code "ÁˆÂ ˆÃÄ!ˆÅ‰(‡" [menu-last-input nil ding message "C-n for next, C-p for previous, Return (or ESC-^c) to quit." ""] 4))
