;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.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.el' was compiled for Emacs 19.29 or later"))

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


(byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\305\306\307\310\311\312%\207" [require nethack-compat nethack-api nethack-cmd nethack-keys custom-declare-group nethack nil "Emacs lisp frontend to the lisp window port of Nethack 3.4.0." :group games] 6)
#@44 Program to run to start a game of Nethack.
(custom-declare-variable 'nethack-program '"nethack" '(#$ . 863) :type '(string) :group 'nethack)
#@41 Arguments to pass to `nethack-program'.
(custom-declare-variable 'nethack-program-args 'nil '(#$ . 1010) :type '(repeat string) :group 'nethack)
#@30 Height of the status window.
(custom-declare-variable 'nethack-status-window-height '4 '(#$ . 1161) :type '(integer) :group 'nethack)
#@31 Height of the message window.
(custom-declare-variable 'nethack-message-window-height '10 '(#$ . 1301) :type '(integer) :group 'nethack)
#@65 The number of turns to keep a changed status field highlighted.
(custom-declare-variable 'nethack-status-highlight-delay '5 '(#$ . 1444) :type '(integer) :group 'nethack)
#@53 Format string for the status in `nh-status-buffer'.
(custom-declare-variable 'nethack-status-buffer-format '"n w s d c i W C A\nL l g h p a e t f" '(#$ . 1621) :type '(string) :group 'nethack)
#@48 Format string for the status on the mode-line.
(custom-declare-variable 'nethack-status-mode-line-format '"s d c i W C g h p a e t" '(#$ . 1820) :type '(string) :group 'nethack)
#@50 Format string for the status on the header-line.
(custom-declare-variable 'nethack-status-header-line-format '"n w <L,l> A   f" '(#$ . 2004) :type '(string) :group 'nethack)
#@77 When this variable is non-nil, kill all nethack buffers when nethack quits.
(custom-declare-variable 'nethack-purge-buffers 't '(#$ . 2184) :type '(boolean) :group 'nethack)
#@37 If non-nil, use XPMs to draw tiles.
(custom-declare-variable 'nethack-use-tiles 'nil '(#$ . 2364) :type '(boolean) :group 'nethack)
#@58 Functions to be called after setting up the Nethack map.
(custom-declare-variable 'nethack-map-mode-hook 'nil '(#$ . 2502) :type '(hook) :group 'nethack)
#@57 Functions to be called after setting up a Nethack menu.
(custom-declare-variable 'nethack-menu-mode-hook 'nil '(#$ . 2662) :type '(hook) :group 'nethack)
#@39 Hook run before a message is printed.
(custom-declare-variable 'nethack-before-print-message-hook 'nil '(#$ . 2822) :type '(hook) :group 'nethack)
#@34 Hook run when nethack has ended.
(custom-declare-variable 'nethack-end-hook 'nil '(#$ . 2975) :type '(hook) :group 'nethack)
#@166 List of functions to call after a status attribute change.

Three arguments are passed to each function: the name of the
attribute, the new value and the old value.
(custom-declare-variable 'nethack-status-attribute-change-functions 'nil '(#$ . 3107) :type '(hook) :group 'nethack)
#@33 Hook run after loading nethack.
(custom-declare-variable 'nethack-load-hook 'nil '(#$ . 3395) :type '(hook) :group 'nethack)
#@46 Hook run after a menu option has been added.
(custom-declare-variable 'nethack-add-menu-hook 'nil '(#$ . 3526) :type '(hook) :group 'nethack)
(byte-code "\301\302\303\304\305\306%\210\307\310\311\312\305\302%\210\307\313\314\315\305\302%\210\307\316\317\320\305\302%\210\307\321\322\323\305\302%\210\307\324\325\326\305\302%\210\307\327\330\331#\210\307\332\333\334\305\302%\210\307\335\336\337\305\302%\210\307\340\341\342\305\302%\210\307\343\344\345\305\302%\210\307\346\347\350\305\302%\210\307\351\352\353\305\302%\210\307\354\355\356\305\302%\210\307\357\360\361\305\302%\210\307\362\363\364\305\302%\210\307\365\366\367\305\302%\210\307\370\371\372\305\302%\210\307\373\374\375\305\302%\210\307\376\377\201@ \305\302%\210\307\201A \201B \201C \305\302%\210\307\201D \201E \201F \305\302%\210\307\201G \201H \201I \305\302%\210\307\201J \201K \201L \305\302%\210\307\201M \201N \201O \305\302%\210\307\201P \201Q \201R \305\302%\210\307\201S \201T \201U \305\302%\210\307\201V \201W \201R \305\302%\210\201X B\201Y \201X !\204)\201Z \201X \303\"\210\201[ B\201Y \201[ !\204D\201Z \201[ \201\\ \"\210\303\207" [current-load-list custom-declare-group nethack-faces nil "Customizations for faces used by Enethack." :group nethack custom-declare-face nethack-status-good-face ((((type tty) (class color)) (:background "green" :foreground "black")) (((class color) (background light)) (:background "darkseagreen2")) (((class color) (background dark)) (:background "green4"))) "Face for highlighting good changes in the status buffer." nethack-status-bad-face ((((type tty) (class color)) (:background "red")) (((class color) (background light)) (:background "pink")) (((class color) (background dark)) (:background "red")) (t (:inverse-video t))) "Face for highlighting bad changes in the status buffer." nethack-status-neutral-face ((((type tty) (class color)) (:foreground "white" :background "blue")) (((type tty) (class mono)) (:inverse-video t)) (((class color) (background dark)) (:background "blue3")) (((class color) (background light)) (:background "lightgoldenrod2")) (t (:background "gray"))) "Face for highlighting neutral changes in the status buffer." nethack-message-highlight-face ((t (:foreground "black" :background "green"))) "The face used to highlight new text in the message window." nethack-atr-none-face ((t nil)) "Nethack default face." nethack-atr-uline-face ((t (:underline t))) "Nethack underline face." nethack-atr-bold-face ((t (:bold t))) "Nethack bold face." nethack-atr-blink-face ((t (:inverse-video t))) "Nethack blink face." nethack-atr-inverse-face ((t (:inverse-video t))) "Nethack inverse face." nethack-black-face ((t (:foreground "dark blue"))) "nethack black face" nethack-red-face ((((type tty) (class color)) (:foreground "red")) (((class color)) (:foreground "red")) (t (:foreground "gray"))) "nethack red" nethack-green-face ((((type tty) (class color)) (:foreground "green")) (((class color) (background dark)) (:foreground "lime green")) (((class color) (background light)) (:foreground "lime green")) (t (:foreground "gray"))) "nethack green" nethack-brown-face ((((type tty) (class color)) (:foreground "yellow")) (((class color) (background dark)) (:foreground "chocolate")) (((class color) (background light)) (:foreground "brown")) (t (:foreground "gray"))) "nethack brown" nethack-blue-face ((((type tty) (class color)) (:foreground "blue")) (((class color) (background dark)) (:foreground "dark blue")) (((class color) (background light)) (:foreground "dark blue")) (t (:foreground "gray"))) "nethack blue" nethack-magenta-face ((((type tty) (class color)) (:foreground "magenta")) (((class color) (background dark)) (:foreground "dark magenta")) (((class color) (background light)) (:foreground "dark magenta")) (t (:foreground "gray"))) "nethack magenta" nethack-cyan-face ((((type tty) (class color)) (:foreground "cyan")) (((class color) (background dark)) (:foreground "dark cyan")) (((class color) (background light)) (:foreground "cyan4")) (t (:foreground "gray"))) "nethack cyan" nethack-gray-face ((((type tty) (class color)) (:foreground "white")) (((class color) (background dark)) (:foreground "lightgray")) (((class color) (background light)) (:foreground "darkgray")) (t (:foreground "gray"))) "nethack gray" nethack-dark-gray-face ((((type tty) (class color)) (:foreground "black" :bold t)) (((class color) (background dark)) (:foreground "darkgray")) (((class color) (background light)) (:foreground "lightgray")) (t (:foreground "gray"))) "nethack dark gray" nethack-orange-face ((((type tty) (class color)) (:foreground "red" :bold t)) (((class color)) (:foreground "orange")) (t (:foreground "gray"))) "nethack light orange" nethack-bright-green-face ((((type tty) (class color)) (:foreground "green" :bold t)) (((class color) (background dark)) (:foreground "green")) (((class color) (background light)) (:foreground "dark green")) (t (:foreground "gray"))) "nethack bright green" nethack-yellow-face ((((type tty) (class color)) (:foreground "yellow" :bold t)) (((class color) (background dark)) (:foreground "yellow")) (((class color) (background light)) (:foreground "yellow3")) (t (:foreground "gray"))) "nethack yellow" nethack-bright-blue-face ((((type tty) (class color)) (:foreground "blue" :bold t)) (((class color) (background dark)) (:foreground "blue")) (((class color) (background light)) (:foreground "blue")) (t (:foreground "gray"))) "nethack bright blue" nethack-bright-magenta-face ((((type tty) (class color)) (:foreground "magenta" :bold t)) (((class color)) (:foreground "magenta")) (t (:foreground "gray"))) "nethack bright magenta" nethack-bright-cyan-face ((((type tty) (class color)) (:foreground "cyan" :bold t)) (((class color) (background dark)) (:foreground "cyan")) (((class color) (background light)) (:foreground "cyan3")) (t (:foreground "gray"))) "nethack bright cyan" nethack-white-face ((((type tty) (class color)) (:foreground "white" :bold t)) (((class color) (background dark)) (:foreground "white")) (((class color) (background light)) (:foreground "black")) (t (:foreground "gray"))) "nethack white" nethack-map-tile-face ((((type tty)) nil) (t (:font "6x10"))) "Map face with height less than the tile size (16 pixels)." nethack-pet-face ((((type tty) (class color)) (:foreground "black" :background "white" :bold t)) (((class color) (background dark)) (:foreground "black" :background "white")) (((class color) (background light)) (:foreground "white" :background "black")) (t (:foreground "gray"))) nh-proc default-boundp set-default nh-proc-buffer-name "*nh-output*"] 6)
#@61 When the process ends kill the process buffer if this is t.
(defvar nh-proc-kill-buffer-on-quit t (#$ . 10130))
(byte-code "\301B\302\301!\204 \303\301\304\"\210\301\207" [current-load-list nh-log-buffer default-boundp set-default "*nh-log*"] 3)
#@96 Start a game of Nethack.

The variable `nethack-program' is the name of the executable to run.
(defalias 'nethack #[nil "\303 \203\f \304\305!\210\306 \207\307!\203 \310!\210\311\312\313\314	\n%!\207" [nh-proc-buffer-name nethack-program nethack-program-args nethack-is-running message "Nethack process already running..." nhapi-restore-window-configuration get-buffer kill-buffer nethack-start apply start-process "nh"] 7 (#$ . 10385) nil])
#@41 return T if nethack is already running.
(defalias 'nethack-is-running #[nil "\301!\205 \302!\303\235\207" [nh-proc processp process-status (open run)] 2 (#$ . 10837)])
#@75 Given the process, start nethack. Assumes nethack is not already running.
(defalias 'nethack-start #[(process) "\212\302 \210\303	\304\"\210\305	\306\")\207" [process nh-proc nh-reset-status-variables set-process-filter nh-filter set-process-sentinel nh-sentinel] 3 (#$ . 11014)])
#@37 Toggle the use of tiles on the map.
(defalias 'nethack-toggle-tiles #[nil "?\301\302!\207" [nethack-use-tiles nethack-command-redraw-screen 2] 2 (#$ . 11303) nil])
(byte-code "\301B\302\303!\207" [current-load-list nh-prompt-regexp (lambda (#1=#:defconst-tmp-var) (defconst nh-prompt-regexp #1#)) "^\\(command\\|menu\\|dummy\\|direction\\|number\\|string\\)> *"] 2)
#@94 Nethack background process sentinel.
PROC is the process object and MSG is the exit message.
(defalias 'nh-sentinel #[(proc msg) "r\305!q\210\306e`{!\210\307ed\"\210\310	\261\210)\311!\210\n\203% \312\313!!\210\f\205+ \314 \207" [proc msg nh-proc-kill-buffer-on-quit nh-proc-buffer-name nethack-purge-buffers process-buffer nh-log eval-region "Nethack " delete-process kill-buffer get-buffer nethack-kill-buffers] 3 (#$ . 11679)])
(byte-code "\301B\302\301!\204 \303\301\304\"\210\301\207" [current-load-list nh-log-process-text default-boundp set-default t] 3)
(defalias 'nh-log #[(string) "\205 r\303	!q\210db\210\nc)\207" [nh-log-process-text nh-log-buffer string get-buffer-create] 2])
(byte-code "\301B\302\301!\204 \303\301\304\"\210\304\207" [current-load-list nh-at-prompt default-boundp set-default nil] 3)
#@180 Insert contents of STRING into the buffer associated with PROC.
Evaluate the buffer contents if we are looking at a prompt and then
delete the contents, perhaps logging the text.
(defalias 'nh-filter #[(proc string) "r\305!q\210db\210	c\210\306y\210\307\n!\205; \310\311!\312e`{!\210\313e`\"\210\314\232\2040 \315\232\205: \316 \210\317\306!\210\320\211))\207" [proc string nh-prompt-regexp prompt nh-at-prompt process-buffer 0 looking-at match-string 1 nh-log eval-region "command" "menu" nh-print-status sit-for t] 3 (#$ . 12514)])
(defalias 'nh-send #[(form) "\204 \303\202 ;\203 \202 \304!r\305\n!q\210\306 \210)\307\n	\310P\"\210\311\312\313	\"!)\207" [form command nh-proc "()" prin1-to-string process-buffer erase-buffer process-send-string "\n" nh-log format ";;; %s\n"] 4])
(defalias 'nh-send-and-wait #[(form) "\303!\210\304\305\n!\306\235\205 	?\205 \307\n!\210\202 \207" [form nh-at-prompt nh-proc nh-send nil process-status (open run) accept-process-output] 2])
#@39 Syntax table used in the Nethack map.
(defvar nh-map-mode-syntax-table (byte-code "\301 \302\303\304#\210\302\305\304#\210\302\306\304#\210\302\307\304#\210\302\310\304#\210\302\311\304#\210)\207" [table make-syntax-table modify-syntax-entry 40 "w   " 41 91 93 123 125] 4) (#$ . 13514))
#@65 Major mode for the main Nethack map window.

\{nh-map-mode-map}
(defalias 'nh-map-mode #[nil "\306!\210\307	!\210\310\311\312\305!\210\f\313\314!\207" [nh-map-mode-map nh-map-mode-syntax-table mode-name major-mode nh-message-buffer other-window-scroll-buffer use-local-map set-syntax-table "NETHACK MAP" nh-map-mode make-variable-buffer-local run-hooks nethack-map-mode-hook] 2 (#$ . 13815)])
#@72 kill all nethack associated buffers except the nethack process
buffer.
(defalias 'nethack-kill-buffers #[nil "\305!\203\n \306!\210\305	!\203 \306	!\210\305\n!\203 \306\n!\210\307\310\"\210\306\311\f!!\207" [nh-map-buffer nh-status-buffer nh-message-buffer nh-menu-buffer-table nh-log-buffer buffer-live-p kill-buffer mapcar #[(x) "\301A!\205 \302A!\207" [x buffer-live-p kill-buffer] 2] get-buffer] 3 (#$ . 14218)])
(byte-code "\300\301!\210\302\303!\207" [run-hooks nethack-load-hook provide nethack] 2)
(defalias 'nethack-el-version #[nil "\301\302\303\"!\207" [nethack-el-version message format "nethack-el %s"] 4 nil nil])
(byte-code "\301B\302\303!\207" [current-load-list nethack-el-version (lambda (#1=#:defconst-tmp-var) (defconst nethack-el-version #1#)) "0.9.0"] 2)
