
(provide (quote zwrite))

(defvar zwrite-last-class nil)

(defvar zwrite-last-instance nil)

(defvar zwrite-last-recipient nil)

(defvar zwrite-last-signature nil)

(defvar zwrite-signature nil)

(defvar zwrite-min-height 15)

(defvar zwrite-hook nil "\
Hooks run when zwrite is entered.")

(defvar zwrite-send-hook nil "\
Hooks run when a zgram is sent.")

(defvar zwrite-path "/usr/athena/bin/" "\
Path to zephyr programs")

(defvar zwrite-last-zgram nil "\
List of class, instance, recipient, body of last *sent* zephyrgram")

(define-abbrev-table (quote zwrite-abbrev-table) (quote nil))

(defun zwrite-triple (class instance recipient &optional generic-buffer-name) "\
Start a zwrite process to the given triple.  Allow the
user to enter a message.  Run zwrite-hook." (byte-code "Ð	ƒ	 Ñ‚ ÒÓ
$!Ô!ˆÕ W…\" ÖÕ Z!ˆ× ˆØcˆ‰ˆÉ‰ˆÙ‰
ˆÚ‰ˆÛÌ!ˆÛÍ!ˆ
E‰ˆÜÝ !ˆÞßà\"ˆáâ!ˆãäåÚæPEçè\"ƒr éC‚t Cêë
ìí&#\"‰ˆîï\"ˆðñ\"ˆòó!)‡" [b generic-buffer-name class instance recipient zwrite-min-height local-abbrev-table zwrite-abbrev-table abbrev-mode t major-mode mode-name zwrite-target zwrite-process zwrite-path zwrite-signature generate-new-buffer "*Zwrite*" format "*Zwrite to <%s,%s,%s>*" switch-to-buffer window-height enlarge-window indented-text-mode "*** Zwrite process status: checking for subscribers

" zwrite-mode "Zwrite" make-local-variable use-local-map make-sparse-keymap local-set-key "" zwrite-send message "Press C-c C-c to send message" apply start-process append "zwrite" equal "*" "-n" list "-c" "-i" "-s" set-process-sentinel zwrite-sentinel set-process-filter zwrite-filter run-hooks zwrite-hook] 26))

(defun zwrite-filter (proc str) (byte-code "ŠÅ!qˆebˆÆÇ!ˆ`È ˆÉ	`\")ˆÊËÌ!
\"ƒ& Íc‚I ÊËÎ!
\"ƒ4 Ïc‚I ÊËÐ!
\"ƒG ÑcˆÒÓ\"‚I 
c)‡" [proc start str zwrite-target t process-buffer search-forward ": " end-of-line delete-region string-match regexp-quote "Type your message now" "Ready for message" "Not logged in" "*** NO SUBSCRIBERS ***" "Message sent" "zwrite successful" message "Message sent to %s"] 13))

(defun zwrite-send nil (interactive) (byte-code "ÅˆÆÇ!ˆÈÉÊ\"!ˆŠdbˆn?… ËcˆebˆÌÍ!ˆl…' ÌÍ!ˆÎ`d\"Ï
	\"ˆÐ	C\"‰)ˆÏ
Ñ\")ˆÒÓ!…K ÔÓ\"ˆÕp!ˆÖ× Ä\"‡" [zwrite-target text zwrite-process zwrite-last-zgram t nil run-hooks zwrite-send-hook message format "Sending message to %s" "
" forward-line 1 buffer-substring process-send-string append "" fboundp zlog-add apply bury-buffer switch-to-buffer other-buffer] 16))

(defun zwrite-resend nil (interactive) (byte-code "Áˆƒ ÂÃ8Ä8Å8#ˆÆ8c‚ ÇÈ!‡" [zwrite-last-zgram nil zwrite-triple 0 1 2 3 error "No last zephyrgram"] 5))

(defun zwrite-string-to-triple (msg class inst recip) (byte-code "ÇÈÉÊÁ
ËPEÌÍ\"ƒ Á‚ CÎÏÐÑ%#\"Ò\"ˆÒÓ\")ˆÔÕ!…9 Õ$‡" [p nil zwrite-path recip class inst msg apply start-process append "Zwrite" "zwrite" equal "*" list "-n" "-c" "-i" process-send-string "
" fboundp zlog-add] 12))

(defun zwrite-sentinel (proc str) (byte-code "ÁÂ!!‡" [proc kill-buffer process-buffer] 3))

(defun zwrite-get-option (prompt specified last) (byte-code "† ÅÆÇ
#!È	É\"ƒ Ä‚ 	)† ‡" [specified input prompt last nil read-from-minibuffer format "%s [%s]: " equal ""] 5))

(defun zwrite-personal (&optional recip) (interactive) (byte-code "ÂˆÃÄ	#‰ˆÅÆÇ#‡" [zwrite-last-recipient recip nil zwrite-get-option "Send personal message to" zwrite-triple "message" "personal"] 5))

(defun zwrite-instance (&optional inst) (interactive) (byte-code "ÂˆÃÄ	#‰ˆÅÆÇ#‡" [zwrite-last-instance inst nil zwrite-get-option "Write to instance" zwrite-triple "message" "*"] 5))

(defun zwrite-class (&optional class inst) (interactive) (byte-code "ÄˆÅÆ	#‰ˆÅÇ
#‰ˆÈ
É#‡" [zwrite-last-class class zwrite-last-instance inst nil zwrite-get-option "Write to class" "Write to instance" zwrite-triple "*"] 6))

(defun zwrite-i-help nil (interactive) (byte-code "ÀˆÁÂ!‡" [nil zwrite-instance "help"] 2))

(defun zwrite-i-sipb nil (interactive) (byte-code "ÀˆÁÂ!‡" [nil zwrite-instance "sipb"] 2))

(defun zwrite-i-white-magic nil (interactive) (byte-code "ÀˆÁÂ!‡" [nil zwrite-instance "white-magic"] 2))

(defun zwrite-i-fenway nil (interactive) (byte-code "ÀˆÁÂ!‡" [nil zwrite-instance "fenway"] 2))

(defun zwrite-punt-instance (instance) (interactive "sInstance to punt: ") (byte-code "ÁˆÃÄPÁ
ÅPÆÇÈ&‡" [instance nil zwrite-path start-process "punt-instance-" "zctl" "unsub" "message" "*"] 8))

(defun zwrite-punt-all nil (interactive) (byte-code "ÁˆÂÃPÁÁÁÄ%ˆÅÆÁÃPÇÈÉÊ&‡" [zwrite-path nil call-process "zctl" "cancel" start-process "resubscribe-personal" "sub" "message" "personal" "*"] 9))

(defun zwrite-help-rtfm nil (interactive) (byte-code "ÀˆÁÂÃÄÅ$‡" [nil zwrite-string-to-triple "rtfm..." "message" "help" "*"] 5))

(defun zwrite-help-tryit nil (interactive) (byte-code "ÀˆÁÂÃÄÅ$‡" [nil zwrite-string-to-triple "try it..." "message" "help" "*"] 5))

(defun zwrite-reply-to-sender nil (interactive) (byte-code "ÁˆÁŠÃÄ!qˆebˆÅÆÁÂ#…! ÇÈÉ 8ÊÉ 8\"‰)ˆ…* Ë!)‡" [sender nil t get-buffer "*zwgc*" re-search-forward "From \\(.*\\) on" buffer-substring 2 match-data 3 zwrite-personal] 8))

(defun zwrite-reply-to-instance nil (interactive) (byte-code "ÁˆÁŠÂÃ!qˆebˆÄÅ!… ÆÇÈ 8ÉÈ 8\"‰)ˆ…( Ê!)‡" [instance nil get-buffer "*zwgc*" re-search-forward " *\\([^ 
]*\\)" buffer-substring 2 match-data 3 zwrite-instance] 8))

(defun zwrite-reply-to-instance-unless-personal nil (interactive) (byte-code "ÂˆÂŠÃÄ!qˆebˆÅÆ!… ÇÈÉ 8ÊÉ 8\"‰)ˆ…G ËÌ!Í\"ƒ3 Î ‚G ËÌ!Ï\"ƒD ÐÏÑÒ#‚G Ó!)‡" [instance t nil get-buffer "*zwgc*" re-search-forward " *\\([^ 
]*\\)" buffer-substring 2 match-data 3 string-equal downcase "personal" zwrite-reply-to-sender "looney" zwrite-triple "reply" "*" zwrite-instance] 14))
