;ELC   
;;; Compiled by nelhage@mit.edu on Thu May 24 21:08:20 2007
;;; from file /home/nelhage/.elisp/site/nethack_el-0.9.5/nethack-api.el
;;; in Emacs version 23.0.0.2
;;; 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 "`nethack-api.el' was compiled for Emacs 19.29 or later"))

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


(byte-code "\301\302!\210\301\303!\210\301\304!\210\305B\306\305!\204 \307\305\310\"\210\311B\306\311!\204* \307\311\310\"\210\312B\306\312!\2049 \307\312\310\"\210\310\207" [current-load-list require nethack-compat gamegrid nethack-keys nh-map-buffer default-boundp set-default nil nh-status-buffer nh-message-buffer] 3)
#@39 An alist of (DIGIT-ID . BUFFER) pairs
(defvar nh-menu-buffer-table nil (#$ . 930))
#@51 Return the buffer that corresponds to the MENUID.
(defalias 'nh-menu-buffer #[(menuid) "	\236A\303\n!\203 \n\202 \304)\207" [menuid nh-menu-buffer-table buffer buffer-live-p nobuffer] 2 (#$ . 1019)])
#@59 Overlay used to highlight new text in the message window.
(defvar nh-message-highlight-overlay nil (#$ . 1229))
#@45 Buffer name for Nethack raw-print messages.
(defvar nh-raw-print-buffer-name "*nhw raw-print*" (#$ . 1347))
(defalias 'nhapi-raw-print #[(str) "r\303!\304	!\210\305 \210\n\306\261*\207" [nh-raw-print-buffer-name buffer str get-buffer-create pop-to-buffer delete-other-windows "\n"] 2])
(defalias 'nhapi-raw-print-bold #[(str) "\301\302\303\304\305!#!\207" [str nhapi-raw-print nh-propertize face nh-attr-face atr-bold] 6])
#@44 Set the cursor in `nh-map-buffer' to X, Y.
(defalias 'nhapi-curs #[(x y) "rq\210\303	S\n\"b)\207" [nh-map-buffer x y gamegrid-cell-offset] 3 (#$ . 1780)])
(defalias 'nh-propertize-attribute #[(attribute &optional how) "@\211A@)\211AA)@\306\307	\206 \310\"\fX\205Z 	\247\203Q \311=\203< 	V\2038 \312\202Z \313\202Z \314=\205Z 	V\203M \313\202Z \312\202Z 	\204Y \311\202Z \315\211\203i \316\317#\202j -\207" [attribute new-value x old-value age string format "%s" "" nil nethack-status-good-face nethack-status-bad-face lower-is-better nethack-status-neutral-face nh-propertize face nethack-status-highlight-delay how] 5])
(byte-code "\301B\302\301!\204 \303\301\304\211\305E\"\210\306B\302\306!\204$ \303\306\304\211\305E\"\210\307B\302\307!\2046 \303\307\304\211\305E\"\210\310B\302\310!\204H \303\310\305\211\211E\"\210\311B\302\311!\204Z \303\311\305\211\211E\"\210\312B\302\312!\204l \303\312\305\211\211E\"\210\313B\302\313!\204~ \303\313\305\211\211E\"\210\314B\302\314!\204\220 \303\314\305\211\211E\"\210\315B\302\315!\204\242 \303\315\305\211\211E\"\210\316B\302\316!\204\264 \303\316\304\211\305E\"\210\317B\302\317!\204\306 \303\317\304\211\305E\"\210\320B\302\320!\204\330 \303\320\305\211\211E\"\210\321B\302\321!\204\352 \303\321\305\211\211E\"\210\322B\302\322!\204\374 \303\322\305\211\211E\"\210\323B\302\323!\204\303\323\305\211\211E\"\210\324B\302\324!\204 \303\324\305\211\211E\"\210\325B\302\325!\2042\303\325\305\211\211E\"\210\326B\302\326!\204D\303\326\305\211\211E\"\210\327B\302\327!\204V\303\327\305\211\211E\"\210\330B\302\330!\204h\303\330\305\211\211E\"\210\331B\302\331!\204z\303\331\305\211\211E\"\210\332B\302\332!\204\214\303\332\305\211\211E\"\210\333B\302\333!\204\236\303\333\305\211\211E\"\210\334B\302\334!\204\260\303\334\304\211\305E\"\210\335B\302\335!\204\302\303\335\304\211\305E\"\210\336B\302\336!\204\324\303\336\304\211\305E\"\210\337B\302\337!\204\346\303\337\304\211\305E\"\210\340B\302\340!\204\370\303\340\304\211\305E\"\210\341B\302\341!\204\n\303\341\304\211\305E\"\210\342B\302\342!\204\303\342\304\211\305E\"\210\343B\302\343!\204.\303\343\304\211\305E\"\210\304\207" [current-load-list nh-status-attribute-name default-boundp set-default nil 0 nh-status-attribute-monster nh-status-attribute-rank nh-status-attribute-St nh-status-attribute-Dx nh-status-attribute-Co nh-status-attribute-In nh-status-attribute-Wi nh-status-attribute-Ch nh-status-attribute-Align nh-status-attribute-Dungeon nh-status-attribute-Dlvl nh-status-attribute-$ nh-status-attribute-HP nh-status-attribute-HPmax nh-status-attribute-PW nh-status-attribute-PWmax nh-status-attribute-AC nh-status-attribute-Level nh-status-attribute-XP nh-status-attribute-HD nh-status-attribute-T nh-status-attribute-Score nh-status-attribute-confusion nh-status-attribute-hunger nh-status-attribute-sick nh-status-attribute-blind nh-status-attribute-stunned nh-status-attribute-hallucination nh-status-attribute-slimed nh-status-attribute-encumbrance] 5)
(defalias 'nh-reset-status-variables #[nil "\306\211\307E\306\211\307E\306\211\307E\307\211\211E\307\211\211E\307\211\211E\307\211\211E\307\211\211E	\307\211\211E\n\306\211\307E\306\211\307E\f\307\211\211E\307\211\211E\307\211\211E\307\211\211E\307\211\211E\307\211\211E\307\211\211E\307\211\211E\307\211\211E\307\211\211E\307\211\211E\307\211\211E\306\211\307E\306\211\307E\306\211\307E\306\211\307E\306\211\307E\306\211\307E\306\211\307E\306\211\307E\211 \207" [nh-status-attribute-name nh-status-attribute-monster nh-status-attribute-rank nh-status-attribute-St nh-status-attribute-Dx nh-status-attribute-Co nil 0 nh-status-attribute-In nh-status-attribute-Wi nh-status-attribute-Ch nh-status-attribute-Align nh-status-attribute-Dungeon nh-status-attribute-Dlvl nh-status-attribute-$ nh-status-attribute-HP nh-status-attribute-HPmax nh-status-attribute-PW nh-status-attribute-PWmax nh-status-attribute-AC nh-status-attribute-Level nh-status-attribute-XP nh-status-attribute-HD nh-status-attribute-T nh-status-attribute-Score nh-status-attribute-confusion nh-status-attribute-hunger nh-status-attribute-sick nh-status-attribute-blind nh-status-attribute-stunned nh-status-attribute-hallucination nh-status-attribute-slimed nh-status-attribute-encumbrance] 3])
(defalias 'nhapi-update-status #[(status) "\306\211\203b \n@\307\310	@P!\211J@	\211A@)J\211AA)@\f\232\203B J\211A@)TEL\210\202Z \f\311EL\210	@\312\230\204Z \313\314	@\f$\210,\nA\211\204 *\306\207" [status i #1=#:--cl-dolist-temp-- variable old-value x nil intern "nh-status-attribute-" 0 "T" run-hook-with-args nethack-status-attribute-change-functions new-value age] 6])
(defalias 'nh-status-string #[(format) "\301\302\303#\207" [format mapconcat #[(ch) "\302\303\304!P!\211\203 	 \202 \304!)\207" [ch fn intern-soft "nh-status-" char-to-string] 5] nil] 4])
(defalias 'nh-print-status #[nil "rq\210\302 \210\303	!c)\207" [nh-status-buffer nethack-status-buffer-format erase-buffer nh-status-string] 2])
(defalias 'nh-status-n #[nil "\301!\207" [nh-status-attribute-name nh-propertize-attribute] 2])
(defalias 'nh-status-w #[nil "\302\303@\203 \202\f 	!P\207" [nh-status-attribute-monster nh-status-attribute-rank "the " nh-propertize-attribute] 3])
(defalias 'nh-status-s #[nil "\301\302!P\207" [nh-status-attribute-St "St:" nh-propertize-attribute] 3])
(defalias 'nh-status-d #[nil "\301\302!P\207" [nh-status-attribute-Dx "Dx:" nh-propertize-attribute] 3])
(defalias 'nh-status-c #[nil "\301\302!P\207" [nh-status-attribute-Co "Co:" nh-propertize-attribute] 3])
(defalias 'nh-status-i #[nil "\301\302!P\207" [nh-status-attribute-In "In:" nh-propertize-attribute] 3])
(defalias 'nh-status-W #[nil "\301\302!P\207" [nh-status-attribute-Wi "Wi:" nh-propertize-attribute] 3])
(defalias 'nh-status-C #[nil "\301\302!P\207" [nh-status-attribute-Ch "Ch:" nh-propertize-attribute] 3])
(defalias 'nh-status-A #[nil "\301!\207" [nh-status-attribute-Align nh-propertize-attribute] 2])
(defalias 'nh-status-L #[nil "\301!\207" [nh-status-attribute-Dungeon nh-propertize-attribute] 2])
(defalias 'nh-status-l #[nil "\301\302!P\207" [nh-status-attribute-Dlvl "Dlvl:" nh-propertize-attribute] 3])
(defalias 'nh-status-g #[nil "\301\302!P\207" [nh-status-attribute-$ "$:" nh-propertize-attribute] 3])
(defalias 'nh-status-h #[nil "\302\303\304!\304	!#\207" [nh-status-attribute-HP nh-status-attribute-HPmax format "HP:%s(%s)" nh-propertize-attribute] 5])
(defalias 'nh-status-p #[nil "\302\303\304!\304	!#\207" [nh-status-attribute-PW nh-status-attribute-PWmax format "Pw:%s(%s)" nh-propertize-attribute] 5])
(defalias 'nh-status-a #[nil "\301\302\303\"P\207" [nh-status-attribute-AC "AC:" nh-propertize-attribute lower-is-better] 4])
(defalias 'nh-status-e #[nil "\302\303\304!\304	!#\207" [nh-status-attribute-Level nh-status-attribute-XP format "Xp:%s/%s" nh-propertize-attribute] 5])
(defalias 'nh-status-t #[nil "\301\302@\"\207" [nh-status-attribute-T format "T:%d"] 3])
(defalias 'nh-status-f #[nil "\306\307\310!\310	!\310\n!\310!\310\f!\310!\310\n!\310!\257\311#\207" [nh-status-attribute-confusion nh-status-attribute-hunger nh-status-attribute-sick nh-status-attribute-blind nh-status-attribute-stunned nh-status-attribute-hallucination mapconcat #[(x) "\301\230?\205\n \302P\207" [x "" " "] 2] nh-propertize-attribute "" nh-status-attribute-slimed nh-status-attribute-encumbrance] 11])
#@61 On buffer associated with MENUID, insert with ATTR the STR.
(defalias 'nhapi-menu-putstr #[(menuid attr str) "r\304!q\210\305db\210\306\n\307\310!#\311\261*\207" [menuid inhibit-read-only str attr nh-menu-buffer t nh-propertize face nh-attr-face "\n"] 5 (#$ . 9323)])
#@86 Insert STR to `nh-message-buffer' using ATTR face. 
FIXME: doesnt actually use ATTR!
(defalias 'nhapi-message #[(attr str) "rq\210db\210\306\307!\210	\310\261\210\311\n!\312\nd#\210)\313p!\314 \315\316\317 \"r\320\216\321\322\f\".\207" [nh-message-buffer str nh-message-highlight-overlay start l save-selected-window-alist run-hooks nethack-before-print-message-hook "\n" overlay-start move-overlay get-buffer-window-list selected-window mapcar #[(frame) "\301!D\207" [frame frame-selected-window] 3] frame-list ((byte-code "\305\211\203/ \n@\306	@!\203( \307	\211A@)!\203( \310	@	\211A@)\"\210\nA\211\204 *\307\f!\203: \311\f!\210\305\207" [save-selected-window-alist elt #1=#:--cl-dolist-temp-- x save-selected-window-window nil frame-live-p window-live-p set-frame-selected-window select-window] 4)) mapc #[(w) "\301!\210\302dS\"\210\303\304!\207" [w select-window set-window-point recenter -1] 3] save-selected-window-window] 4 (#$ . 9601)])
#@42 Return the face corresponding with ATTR.
(defalias 'nh-attr-face #[(attr) "\301\302\303!\304Q!\207" [attr intern-soft "nethack-" symbol-name "-face"] 4 (#$ . 10574)])
#@43 Vector indexed by Nethack's color number.
(defconst nh-colors [nethack-black-face nethack-red-face nethack-green-face nethack-brown-face nethack-blue-face nethack-magenta-face nethack-cyan-face nethack-gray-face nethack-dark-gray-face nethack-orange-face nethack-bright-green-face nethack-yellow-face nethack-bright-blue-face nethack-bright-magenta-face nethack-bright-cyan-face nethack-white-face] (#$ . 10748))
#@36 Insert glyph into `nh-map-buffer'.
(defalias 'nhapi-print-glyph #[(x y color glyph tile ch &optional special) "q\210	S\306\203$ \212\307\310	\"b\210\311\312!\210\313\234!*\202L \314	#\210\315=\2036 \316\202; H\317\310	\"\310	\"T\320$))\207" [nh-map-buffer x inhibit-read-only nethack-use-tiles buffer-read-only y t nil gamegrid-cell-offset delete-char 1 insert-image gamegrid-set-cell pet nethack-pet-face put-text-property face nh-tile-vector tile ch special nh-colors color] 5 (#$ . 11167)])
#@2 
(defalias 'nhapi-yn-function #[(ques choices default) "\306\307\310\311\n\312\307\")\"\f\313U\204 \f\nB\314\nB\315\316P!\nG\317V\203> \n\235\204> \315\320\321\"\316Q!\211\202+ \322\314U\204Q \323U\204Q \324U\203U \f\202V !*\207" [key cursor-in-echo-area choices string default ques t nil mapcar nh-char-to-int append 0 13 nh-read-char " " 1 format "(bad %d) " nh-send 27 7] 6 (#$ . 11691)])
#@33 Prompt the user for a direction
(defalias 'nhapi-ask-direction #[(prompt) "\304\305	\306\n\307P!\"\310\311=\203 \312\202\205 \313=\203  \314\202\205 \315=\203* \316\202\205 \317=\2034 \320\202\205 \321=\203> \322\202\205 \323=\203H \324\202\205 \325=\203R \326\202\205 \327=\203\\ \330\202\205 \331=\203f \332\202\205 \333=\203p \334\202\205 \335=\203z \336\202\205 \337=\203\204 \336\202\205 \340!*\207" [cursor-in-echo-area nh-map-mode-map prompt cmd t lookup-key read-key-sequence-vector " " nh-send nethack-command-north "n" nethack-command-south "s" nethack-command-west "w" nethack-command-east "e" nethack-command-northwest "nw" nethack-command-northeast "ne" nethack-command-southwest "sw" nethack-command-southeast "se" nethack-command-up "up" nethack-command-down "down" nethack-command-rest-one-move "self" nethack-command-search "nowhere"] 5 (#$ . 12107)])
#@2 
(defalias 'nhapi-getlin #[(ques) "\300\301\302\303\217!\207" [nh-send nil (byte-code "\301\302P!\207" [ques read-from-minibuffer " "] 3) ((quit ""))] 4 (#$ . 12996)])
#@139 Does nothing right now, perhaps simply indicates that the
nhapi-choose-X calls are to follow for actual
role/race/gender/align selection.
(defalias 'nhapi-player-selection #[nil "\300\207" ["Does nothing right now, perhaps simply indicates that the\nnhapi-choose-X calls are to follow for actual\nrole/race/gender/align selection."] 1 (#$ . 13172)])
#@87 Prompts user for an element from the cars of ALIST and returns the
corresponding cdr.
(defalias 'nhapi-choose-attribute #[(prompt alist abort) "\303G\304V\203 \305\306\307\310\217)\202 \211@A)!\207" [alist completion-ignore-case x nh-send 1 t nil (byte-code "\302\303	\304\305$	\"A\207" [prompt alist assoc completing-read nil t] 6) ((quit abort))] 5 (#$ . 13528)])
#@189 Location of the nethack directory.

This is set when the process starts by `nhapi-init-nhwindows'.
Do not edit the value of this variable.  Instead, change the value of
`nethack-program'.
(defvar nh-directory nil (#$ . 13908))
(defalias 'nhapi-display-file #[(str complain) "	P\304\n!\203 \305\n!\202 \205 \306\307\n\")\207" [nh-directory str file complain file-exists-p view-file message "Cannot find file %s"] 3])
#@58 If non-nil, at the next command prompt, update the menu.
(defvar nh-inventory-need-update nil (#$ . 14336))
(defalias 'nhapi-update-inventory #[nil "\301\211\207" [nh-inventory-need-update t] 2])
#@2 
(defalias 'nhapi-doprev-message #[nil "\302 \303\304\305 \"r\306\216r\307\310!-\207" [save-selected-window-alist save-selected-window-window selected-window mapcar #[(frame) "\301!D\207" [frame frame-selected-window] 3] frame-list ((byte-code "\305\211\203/ \n@\306	@!\203( \307	\211A@)!\203( \310	@	\211A@)\"\210\nA\211\204 *\307\f!\203: \311\f!\210\305\207" [save-selected-window-alist elt #1=#:--cl-dolist-temp-- x save-selected-window-window nil frame-live-p window-live-p set-frame-selected-window select-window] 4)) walk-windows #[(w) "\302!\210\303 q\210p	=\205 \304 \207" [w nh-message-buffer select-window window-buffer scroll-down] 2]] 4 (#$ . 14538)])
#@2 
(defalias 'nhapi-update-positionbar #[(features) "\300\207" [""] 1 (#$ . 15221)])
#@93 This is the first function sent by the nethack process.  Does
all of the appropriate setup.
(defalias 'nhapi-init-nhwindows #[(executable &rest args) "\304!\305\306\n\"\210\307\310!\205 \311!\207" [executable nh-directory nh-menu-buffer-table nh-raw-print-buffer-name file-name-directory mapc #[(b) "\301A!\207" [b kill-buffer] 2] nil get-buffer kill-buffer] 3 (#$ . 15310)])
#@2 
(defalias 'nhapi-exit-nhwindows #[(str) "\301!\207" [str nhapi-raw-print] 2 (#$ . 15698)])
#@28 Create the message buffer.
(defalias 'nhapi-create-message-window #[nil "r\302\303!q\210\304 \210\305dd\"\306\307\310#\210p\211)\207" [nh-message-highlight-overlay nh-message-buffer get-buffer-create "*nethack message*" erase-buffer make-overlay overlay-put face nethack-message-highlight-face] 4 (#$ . 15797)])
#@27 Create the status buffer.
(defalias 'nhapi-create-status-window #[nil "r\301\302!q\210\303 \210p\211)\207" [nh-status-buffer get-buffer-create "*nethack status*" erase-buffer] 2 (#$ . 16118)])
#@25 Created the map buffer.
(defalias 'nhapi-create-map-window #[nil "r\301\302!q\210\303 \210p\211)\207" [nh-map-buffer get-buffer-create "*nethack map*" nh-map-mode] 2 (#$ . 16318)])
#@30 Create the inventory window.
(defalias 'nhapi-create-inventory-window #[(menuid) "\301!\207" [menuid nhapi-create-menu-window] 2 (#$ . 16506)])
#@23 Create a menu window.
(defalias 'nhapi-create-menu-window #[(menuid) "r\302\303\"q\210\304\211)\207" [menuid buffer-read-only nhapi-create-menu menu t] 3 (#$ . 16657)])
#@23 Create a text window.
(defalias 'nhapi-create-text-window #[(menuid) "\301\302\"\207" [menuid nhapi-create-menu text] 3 (#$ . 16834)])
#@120 Return a newly created buffer and add it to the menu table.  

The TYPE argument is legacy and serves no real purpose.
(defalias 'nhapi-create-menu #[(type menuid) "\306\307\310!	#\311\n!rq\210\312\313 \210\314 \210)	BB*\207" [type menuid name buf buffer-read-only nh-menu-buffer-table format "*%s* %d" symbol-name get-buffer-create nil erase-buffer kill-all-local-variables] 4 (#$ . 16977)])
#@59 Move overlay off the last message in `nh-message-buffer'.
(defalias 'nhapi-clear-message #[nil "rq\210\302	dd#)\207" [nh-message-buffer nh-message-highlight-overlay move-overlay] 4 (#$ . 17385)])
#@23 Max width of the map.
(defconst nh-map-width 79 (#$ . 17588))
#@24 Max height of the map.
(defconst nh-map-height 22 (#$ . 17656))
#@16 Clear the map.
(defalias 'nhapi-clear-map #[nil "rq\210\306\307 \210\n\203L \310\311!\210\312\fW\203G \312W\2038 \313!\210T\211\202$ *\314\315\316\317#c\210\fT\211\202 *\320\202` \320\211\321\322\323\320\"!\210)\324\325#*\207" [nh-map-buffer inhibit-read-only nethack-use-tiles nh-map-height i #1=#:--cl-dotimes-temp-- t erase-buffer require nethack-tiles 0 insert-image propertize "\n" face nethack-map-tile-face nil gamegrid-init make-vector 256 gamegrid-init-buffer 32 nh-map-width j #2=#:--cl-dotimes-temp-- nh-empty-tile gamegrid-use-glyphs cursor-type] 6 (#$ . 17726)])
(defalias 'nhapi-block #[nil "\300\301!\210\302 \210\303\304!\207" [read-from-minibuffer "--more--" nhapi-clear-message nh-send block-dummy] 2])
(byte-code "\301B\302\301!\204 \303\301\304\"\210\304\207" [current-load-list nh-active-menu-buffer default-boundp set-default nil] 3)
#@39 One of pick-one, pick-none, pick-any.
(defvar nh-menu-how nil (#$ . 18622))
(defalias 'nhapi-display-menu #[(menuid) "r\304!q\210\305	!\306ed\"\211\203 \n\307!Y\203\" \310\311\"\202- \312\313edS{\"\210\314\315!+\207" [menuid nh-message-buffer size window nh-menu-buffer get-buffer-window count-lines window-height nhapi-select-menu pick-none nhapi-message atr-none nh-send dummy] 5])
(defalias 'nhapi-destroy-menu #[(menuid) "r\303!\304	\305\"\210\306	!\210\307\n\"\211*\207" [menuid buffer nh-menu-buffer-table nh-menu-buffer delete-windows-on nil kill-buffer nh-assq-delete-all] 3])
#@52 Major mode for Nethack menus.

\{nh-menu-mode-map}
(defalias 'nh-menu-mode #[(how) "\305\306!P\307\310!\210\311\312!\207" [how mode-name major-mode nh-menu-mode-map nh-menu-how "NETHACK MENU " symbol-name nh-menu-mode use-local-map run-hooks nethack-menu-mode-hook] 3 (#$ . 19223)])
#@254 Toggle the menu item that is associated with the key event that
triggered this function call, if it is a valid option.

Does nothing if this is a pick-none menu.

Automatically submits menu if this is a pick-one menu and an option
was actually toggled.
(defalias 'nh-menu-toggle-item #[(&optional count) "\306=?\205q \307`eb\210\310\311\312\"\307\313#\203i \314\315!\315\224\315\225\313|\210b\210\203J \316:\203B @\202D !c\210\202Z \317\230\203W \320c\210\202Z \317c\210\321 \210\322=\205e \323 ,\202p \324\325\"\210	b*\207" [nh-menu-how old-point case-fold-search last-command-char inhibit-read-only end pick-none nil re-search-forward format "^[%c] \\([-+]\\|[0-9]+\\) .+$" t match-string 1 number-to-string "-" "+" beginning-of-line pick-one nh-menu-submit message "No such menu option: %c" start value count] 4 (#$ . 19519) "P"])
#@49 Toggle all menu items, only for pick-any menus.
(defalias 'nh-menu-toggle-all-items #[nil "\304=\2056 \212\305eb\210\306\n\307\305#\2055 \310\311!\211\312\230\203) \313\314\307\211\211\311%\210\2021 \313\312\307\211\211\311%\210)\202\f *\207" [nh-menu-how inhibit-read-only nh-menu-item-regexp value pick-any t re-search-forward nil match-string 2 "-" replace-match "+"] 7 (#$ . 20386) nil])
#@40 Move to the next selectable menu item.
(defalias 'nh-menu-goto-next #[nil "`\302 b\210\303	\304\305#\203 \306 \202 b)\207" [old-point nh-menu-item-regexp line-end-position re-search-forward nil t line-beginning-position] 4 (#$ . 20787) nil])
#@44 Move to the previous selectable menu item.
(defalias 'nh-menu-goto-prev #[nil "`\302 b\210\303	\304\305#\203 \302 \202 b)\207" [old-point nh-menu-item-regexp line-beginning-position re-search-backward nil t] 4 (#$ . 21039) nil])
(byte-code "\301B\302\301!\204 \303\301\304\"\210\304\207" [current-load-list nh-window-configuration default-boundp set-default nil] 3)
#@136 Submit the selected menu options to the nethack process.

Restores the window configuration what it was before the menu was
displayed.
(defalias 'nh-menu-submit #[nil "eb\210\306\307	\306\310#\203C \311\312\313!!\312\314!\n\315\230\203\" \316\2021 \n\317\230\203- \320\2021 \321\n!\n\320U\204? \322!\nDB*\202 \323!\210\324\f!\203Q \325\f!\210\306\211)\207" [menu-data nh-menu-item-regexp value accelerator nh-window-configuration nh-active-menu-buffer nil re-search-forward t string-to-char match-string 1 2 "+" -1 "-" 0 string-to-number nh-char-to-int nh-send window-configuration-p set-window-configuration] 4 (#$ . 21419) nil])
#@45 Dismiss a menu with out making any choices.
(defalias 'nh-menu-cancel #[nil "\302eb\210\303	\304\302#\203 \305\306\304\211\211\307%\210\202 )\310 \207" [inhibit-read-only nh-menu-item-regexp t re-search-forward nil replace-match "-" 1 nh-menu-submit] 6 (#$ . 22068) nil])
#@106 Index into `nh-accelerator-chars' indicating the next
accelerator that will be used in unassigned menus.
(defvar nh-unassigned-accelerator-index 0 (#$ . 22350))
#@2 
(defalias 'nhapi-start-menu #[(menuid) "r\303!q\210\304\305 \210\306\211*\207" [menuid inhibit-read-only nh-unassigned-accelerator-index nh-menu-buffer t erase-buffer 0] 2 (#$ . 22516)])
#@105 Return the next accelerator from `nh-accelerator-chars' specified
by `nh-unassigned-accelerator-index'.
(defalias 'nh-specify-accelerator #[nil "	H	T\207" [nh-accelerator-chars nh-unassigned-accelerator-index] 2 (#$ . 22714)])
#@69 Create a menu item out of arguments and draw it in the menu
buffer.
(defalias 'nhapi-add-menu #[(menuid glyph tile accelerator groupacc attr str preselected) "r\306!q\210db\210\307`\310U\203 \fc\210\2024 \311\312\313=\203& \314 \202' \203/ \315\2020 \316\f$c\210\317	`\320\321!$\210\322\323\324\325#\210\326\327!+\207" [menuid start inhibit-read-only accelerator str preselected nh-menu-buffer t -1 format "%c %c %s" 0 nh-specify-accelerator 43 45 put-text-property face nh-attr-face insert-char 10 1 nil run-hooks nethack-add-menu-hook attr] 6 (#$ . 22949)])
#@2 
(defalias 'nhapi-end-menu #[(window prompt) "r\303!q\210\304eb\210\nc\210\305 *\207" [window inhibit-read-only prompt nh-menu-buffer t newline] 2 (#$ . 23524)])
#@167 Display the menu given by MENUID and put the buffer in
`nh-menu-mode'.

Saves the current window configuration so that it can be restored when
the menu is dismissed.
(defalias 'nhapi-select-menu #[(menuid how) "\306!\211\203U \307 \310!\211\204 \311\306!\312\313#\210\202) \314\f!\210\315\306!\313\"\210)\316\317 !\320 S\211V\203A \321Z!\210*\322!\210eb\210\323\324!\210	\211\202Y \325\326\")\207" [menuid buffer nh-window-configuration nh-message-buffer message-window wh nh-menu-buffer current-window-configuration get-buffer-window pop-to-buffer nil t select-window switch-to-buffer nh-window-buffer-height selected-window window-height enlarge-window nh-menu-mode message "Displaying menu" error "No such menuid: %d" bh how nh-active-menu-buffer] 5 (#$ . 23695)])
#@120 Layout the nethack windows according to the values
`nethack-status-window-height' and `nethack-message-window-height'.
(defalias 'nhapi-restore-window-configuration #[nil "	^\306 \210\307!\210\310[!\210\307\f!\210\310	!\210\311!\210\312\f!\205' \313\f!)\207" [nethack-status-window-height nethack-message-window-height window-min-height nh-status-buffer nh-message-buffer nh-map-buffer delete-other-windows switch-to-buffer split-window-vertically switch-to-buffer-other-window buffer-live-p pop-to-buffer nh-active-menu-buffer] 2 (#$ . 24490)])
#@15 Beep at user.
(defalias 'nhapi-bell #[nil "\300 \207" [ding] 1 (#$ . 25049)])
#@15 Does nothing.
(defalias 'nhapi-wait-synch #[nil "\300\207" ["Does nothing."] 1 (#$ . 25133)])
#@17 Sleep for 50ms.
(defalias 'nhapi-delay-output #[nil "\300\301\302\"\210\303\304!\207" [sit-for 0 50 nh-send dummy] 3 (#$ . 25233)])
#@2 
(defalias 'nhapi-outrip #[(window who gold message) "r\303!q\210	\304\nQ\305\261)\207" [window who message nh-menu-buffer " -- " "\n"] 3 (#$ . 25370)])
(defalias 'nhapi-end #[nil "\300\301!\210\302\303!\207" [message "Goodbye." run-hooks nethack-end-hook] 2])
(byte-code "\301B\302\301!\204 \303\301\304\"\210\305B\302\305!\204 \303\305\304\"\210\306B\302\306!\204- \303\306\304\"\210\307B\302\307!\204< \303\307\304\"\210\310B\302\310!\204K \303\310\304\"\210\311B\302\311!\204Z \303\311\304\"\210\312B\302\312!\204i \303\312\304\"\210\313B\302\313!\204x \303\313\304\"\210\314B\302\314!\204\207 \303\314\304\"\210\315B\302\315!\204\226 \303\315\304\"\210\316B\302\316!\204\245 \303\316\304\"\210\317B\302\317!\204\264 \303\317\304\"\210\320B\302\320!\204\303 \303\320\304\"\210\321B\302\321!\204\322 \303\321\304\"\210\322B\302\322!\204\341 \303\322\304\"\210\323B\302\323!\204\360 \303\323\304\"\210\324B\302\324!\204\377 \303\324\304\"\210\304\207" [current-load-list nh-options-cbreak default-boundp set-default nil nh-options-dec-graphics nh-options-echo nh-options-ibm-graphics nh-options-msg-history nh-options-num-pad nh-options-news nh-options-window-inited nh-options-vision-inited nh-options-menu-tab-sep nh-options-menu-requested nh-options-num-pad-mode nh-options-purge-monsters nh-options-bouldersym nh-options-travelcc nh-options-sanity-check nh-options-mon-polycontrol] 3)
(defalias 'nhapi-options #[(cbreak dec-graphics echo ibm-graphics msg-history num-pad news window-inited vision-inited menu-tab-sep menu-requested num-pad-mode purge-monsters bouldersym travelcc sanity-check mon-polycontrol &rest ignore) "\n\f	\n\f \211!\207" [cbreak nh-options-cbreak dec-graphics nh-options-dec-graphics echo nh-options-echo ibm-graphics nh-options-ibm-graphics msg-history nh-options-msg-history num-pad nh-options-num-pad news nh-options-news window-inited nh-options-window-inited vision-inited nh-options-vision-inited menu-tab-sep nh-options-menu-tab-sep menu-requested nh-options-menu-requested num-pad-mode nh-options-num-pad-mode purge-monsters nh-options-purge-monsters bouldersym nh-options-bouldersym travelcc nh-options-travelcc sanity-check nh-options-sanity-check mon-polycontrol nh-options-mon-polycontrol] 2])
(provide 'nethack-api)
