
(provide (quote zwgc))

(defconst zwgc-emacs-type (cond ((boundp (quote epoch::version)) (quote epoch)) ((string-match "Lucid" emacs-version) (quote lemacs)) ((string-match "^19" emacs-version) (quote emacs19)) ((string-match "^18" emacs-version) (quote emacs18))) "\
Type of emacs we're running.  One of epoch, lemacs, emacs18, or emacs19")

(defvar zwgc-version "$Id: zwgc.el,v 2.54 91/11/24 20:51:45 bjaspan Exp $" "\
*The RCS string identifing the precise version of zwgc mode.")

(defvar zwgc-process nil)

(defvar zwgc-description-file (expand-file-name "~/.zwgc.desc") "\
*Filename passed after the \"-f\" argument to zwgc.")

(defvar zwgc-prog-additional-args (quote nil) "\
*A list containing extra arguments to pass to zwgc.")

(defvar zwgc-environment (list "EMACS=t" "DISPLAY=emacs-zwgc" "TERM=unknown") "\
*List of strings to add to the environment for zwgc.")

(defvar zwgc-bufnam "*zwgc*" "\
The actual name of the *zwgc* buffer.")

(defvar zwgc-window-min-height 7 "\
*Minimum size of the *zwgc* buffer when it is displayed.  The intention is
to minimze repainting as the buffer size gets bounced around.")

(defvar zwgc-window-max-height 10 "\
*Maximum size of the *zwgc* buffer when it is displayed.")

(defvar zwgc-notices 0 "\
The total number of zephyr messages currently in the *zwgc* buffer.")

(defvar zwgc-current-notice 1 "\
The number of the notice currently displayed in the *zwgc* buffer.")

(defvar zwgc-prog "/usr/athena/bin/zwgc" "\
*Program to run as the zwgc process. Should set it for the machine type.")

(defvar zwgc-zctl-prog "/usr/athena/bin/zctl" "\
*Program to run as zctl, used by zwgc-zctl-cmd.")

(defvar zwgc-zpunt-prog "/afs/sipb.mit.edu/project/sipb/@sys/zpunt" "\
*Program used by zwgc-zpunt.")

(defvar zwgc-zunpunt-prog "/afs/sipb.mit.edu/project/sipb/@sys/zunpunt" "\
*Program used by zwgc-zunpunt.")

(defvar zwgc-show-on-new t "\
*Toggles whether buffer pops up when new messages arrive.")

(defvar zwgc-show-on-first t "\
*Toggles whether buffer pops up when a zephyr arrives and there are none currently")

(defvar zwgc-warp-to-new nil "\
*Whether new messages are immediately displayed.")

(defvar zwgc-warp-on-first t "\
*Whether to display a message immediately if there are none currently")

(defvar zwgc-bury-buffer t "\
*Controls whether the *zwgc* buffer is buried when the last notice
is deleted.")

(defvar zwgc-hide-frame nil "\

*Whether to make the frame containing zwgc 
invisible when the last zephyr is deleted. 
Is ignored unless there are other frames
")

(defvar zwgc-jump-on-new nil "\
*If non-nil, change the selected window when a new notice arrives if
the *zwgc* window is selected.")

(defvar zwgc-buffer-stack nil "\
Internal stack used to jump in and out of the *zwgc* buffer.")

(defvar zwgc-notifications-terminator "
" "*String used by zwgc mode to identify the end of a notice.
Necessary for proper functioning of zwgc-got-notice-hook and
zwgc-notice-regexp-alist.")

(defvar zwgc-mode-map nil "\
*Keymap used by the zwgc major mode.  Binding a
key to this variable sets that key as a prefix for zwgc-mode functions
from outside the *zwgc* buffer.")

(defvar zwgc-notice-regexp-alist nil "\
*List of (REGEXP . function) pairs that are matched against each
notice as it is received.  If REGEXP matches a new notice, the
corresponding function is called with a single argument,
(match-data).")

(defvar zwgc-reply-cell nil "\
\\<zwgc-mode-map>
*Cons cell consisting of (REGEXP . FUNCTION).  REGEXP is matched
against the current notice when \\[zwgc-reply] (zwgc-reply) is
executed and the match data is passed as the only argument to
FUNCTION.")

(defvar zwgc-summary-regexp nil "\
*Regular expression used by zwgc-summary to extract information for
the *zwgc-summary* buffer.")

(defvar zwgc-current-data nil "\
Internal string used to build up each notice until the terminator
is received.")

(defvar zwgc-load-dir "/afs/athena.mit.edu/user/b/bjaspan/elisp" "\
*Path where emacs zwgc and related files live.")

(defvar zwgc-summary-hook nil "\
*Function called to produce a summary string for a zwgc notice.
Takes a list of strings matched by zwgc-summary-regexp as an argument.")

(defvar zwgc-window-placement (quote bottom) "\
*Where to pop up zwgc window, can be either 'bottom 'top")

(defvar zwgc-warp-on-string "warp" "\
String to insert into modeline to indicate warp-to-new mode")

(defvar zwgc-warp-off-string "impulse" "\
String to insert into modeline to indicate warp-to-new is false")

(defvar zwgc-current-notice-string (int-to-string zwgc-current-notice))

(defvar zwgc-notices-string (int-to-string zwgc-notices))

(defun zwgc-silent-replace-regexp (old new) (byte-code "d# 
! )" [old t new re-search-forward replace-match] 4))

(defun zwgc-replace-regexp-on-string (from to string) "\
Replace occurences of regexp FROM with regexp TO in STRING; uses same
rules as replace-regexp." (byte-code "!qceb\"ed\"!	*)" [buf new-string nil string from to generate-new-buffer "  *tmp" zwgc-silent-replace-regexp buffer-substring kill-buffer] 5))

(defun zwgc-split (string &optional regexp sep) "\
Splits STRING into a list of strings by choosing breakpoints 
according to REGEXP.  If REGEXP does not occur the entire STRING
is contained in the first element of the returned list.  REGEXP is
optional and defaults to [ \\t]+ (whitespace).  Optional third arg
SEPARATORS causes the text that matches grouped expressions in REGEXP
at each breakpoint to be included in the returned list.  If REGEXP
matches the null string \"\", split will behave as if it matched a
single character at that point; (zwgc-split \"foo\" \" *\") --> (\"f\" \"o\" \"o\")" (byte-code "  ʉ!͎C
qceb`#4 TdW !!\"P !\"C\"_ T\"C\"!A 	r  C\"A`' *`d\"C\"AA*)))" [regexp nil buf split-list split-tail string p mtext t sep "[ 	]+" generate-new-buffer "  *tmp" ((byte-code "!" [buf kill-buffer] 2)) re-search-forward /= match-beginning 0 match-end setcdr buffer-substring forward-char 1 zwgc-matched-strings] 18))

(defun zwgc-filter (pred list) (byte-code "\"\"" [list apply append mapcar (lambda (elem) (byte-code "	\" 	C " [pred elem nil funcall] 3))] 5))

(defun zwgc-broken-filter (pred lst) "\
Applies PREDICATE to each element of LIST, returning the list of
all elemenets for which the predicate returns non-nil." (byte-code "?	 ! 
@\" @
A\"B! 
A\"" [lst nil pred t funcall zwgc-filter] 5))

(defun zwgc-matched-strings-list nil "\
Returns a list that contains each grouped subexpression matched in
the previous regular-expression search." (byte-code " \"C	GS	\"< @ @U?1 
@8\"C\"
A\" 	A+" [data mlist mtail nthcdr 2 match-data 0 setcdr buffer-substring 1] 10))

(defun zwgc-matched-strings nil "\
Returns a single string that is the concatenation of all the parenthesized
expressions in the previous regular-expression search." (byte-code " \"" [apply concat zwgc-matched-strings-list] 4))

(defvar zwgc-frame nil)

(defun zwgc-get-frame nil (byte-code "!   !" [zwgc-frame nil t frame-live-p window-frame frame-first-window] 5))

(defun zwgc-set-frame (&optional frame) (interactive (byte-code " !C" [window-frame frame-first-window] 3)) (byte-code "	" [zwgc-frame frame nil] 2))

(defun zwgc-visible-p nil (byte-code " 	=  !! )" [window zwgc-emacs-type zwgc-find-window emacs19 frame-visible-p window-frame] 4))

(defun zwgc-update-mode-line nil (byte-code "	!!! !" [zwgc-current-notice-string zwgc-current-notice zwgc-notices-string zwgc-notices t int-to-string fboundp force-mode-line-update] 5))

(defun zwgc-get-window nil "\
get the right window to place zwgc buffer in" (byte-code "=6 	=  !3 	=3  !! 
=0 
!  
)G 	=C  !G  !" [zwgc-emacs-type zwgc-window-placement w t emacs19 top frame-first-window zwgc-get-frame bottom previous-window minibuffer-window next-window] 12))

(defun zwgc-find-window nil "\
find window displaying zwgc buffer if any exist" (byte-code "= 	\" 	!" [zwgc-emacs-type zwgc-bufnam t emacs19 get-buffer-window] 3))

(defun zwgc-push-to-buffer nil "\
Save the current window and buffer and move into the *zwgc* window,
if it exists." (byte-code "p ! ? 
? !* 	BB!
q," [buffer window zwgc-buffer zwgc-bufnam zwgc-window zwgc-buffer-stack selected-window get-buffer zwgc-find-window error "*zwgc* buffer not visible or does not exist" select-window] 6))

(defun zwgc-pop-from-buffer nil "\
Restore the previously pushed (with zwgc-push-to-buffer) window and buffer." (byte-code "? !. @A	A	A!!\"?% - 	A!	@q)" [zwgc-buffer-stack p nil error "zwgc buffer stack is empty." equal next-window previous-window select-window] 6))

(defun zwgc-pop-from-buffer-to-nowhere nil "\
Delete the top element from zwgc-buffer-stack." (byte-code "? ! A" [zwgc-buffer-stack error "zwgc buffer stack is empty."] 3))

(defun zwgc-wrap-function (symbol) "\
Returns a lambda expression that calls the function value of SYMBOL,
wrapped by calls to zwgc-push-to-buffer and zwgc-pop-from-buffer." (byte-code "DDEE\"" [symbol append (lambda nil) (interactive) (zwgc-push-to-buffer) unwind-protect call-interactively quote (zwgc-pop-from-buffer)] 8))

(defun zwgc-apply-cell (cell) "\
CELL is (REGEXP . function).  Calls function with the argument
match-data if REGEXP matches the current notice." (byte-code "eb	@	A# ȏ*)" [regexp cell f nil t re-search-forward err (byte-code " \"" [f funcall match-data] 4) ((error (byte-code "	#!!" [err cell message format "zwgc: received %s applying %s" ding 1] 5)))] 4))

(defun zwgc-notice-iter (p &rest args) "\
Calls FUNCTION on each zwgc notice in turn, passing it ARGS.
FUNCTION must return t if it deletes the notice with zwgc-punt.
Called interatively, prompts for a symbol to call as FUNCTION, with no
args." (interactive "aFunction to iterate: ") (byte-code "ǈ
 TX) \"\"=% S	 	W6 	!9 ! *" [n save-notice zwgc-current-notice zwgc-notices t p args nil 0 zwgc-push-to-buffer zwgc-nth-notice apply zwgc-pop-from-buffer] 7))

(defun zwgc-summary (regexp) "\
Produces a summary of all notices in the *zwgc* buffer by putting
the matched data from a regexp search in the *zwgc-summary* buffer (if
zwgc-summary-hook is defined, it is called with the list of matched
strings and its return value is used).  Uses zwgc-summary-regexp if it
is defined, or prompts for a regexp if it isn't or if a prefix
argument is given." (interactive (byte-code "? 	 !C" [current-prefix-arg zwgc-summary-regexp read-string "Summary regexp: "] 2)) (byte-code "È! !!
\"
!)" [current-prefix-arg zwgc-summary-regexp buffer nil get-buffer "*zwgc-summary*" kill-buffer get-buffer-create zwgc-notice-iter (lambda (b) (byte-code "	#*  J \"  q\")*" [found regexp nil t summary zwgc-summary-hook b re-search-forward apply zwgc-matched-strings-list zwgc-matched-strings insert "
"] 7)) pop-to-buffer] 6))

(defun zwgc-eonp (string) (byte-code "	GG
Y 
[O\"*" [znt zwgc-notifications-terminator znt-len string equal nil] 4))

(defun zwgc-initial-wakeup (proc string) (byte-code "!q!)	\"	
\"" [zwgc-bufnam proc string get-buffer run-hooks zwgc-running-hook set-process-filter zwgc-wakeup] 6))

(defun zwgc-wakeup (proc string) (byte-code "#
\"	A 	@\"	A 	@\"?- 	@\"*" [string split-list zwgc-notifications-terminator t nil zwgc-replace-regexp-on-string "" "" zwgc-split zwgc-wakeup-2 equal] 7))

(defun zwgc-wakeup-2 (string end-of-notice) (byte-code "	P
 !!q  eU/ d TU/ V
	ڎ db\"T\"V ǂ_ ׉Ήǉ\"\"! )+)W ǂ    ? !\"     +" [zwgc-current-data string end-of-notice zwgc-buffer zwgc-bufnam zwgc-window first-notice-flag nil beg end widep zwgc-notices zwgc-notifications-terminator zwgc-current-notice t zwgc-notice-regexp-alist zwgc-show-on-new zwgc-jump-on-new zwgc-warp-to-new get-buffer get-buffer-window point-min-marker point-max-marker 1 buffer-size 0 ((byte-code "!q	   
\")" [beg widep end marker-buffer widen narrow-to-region] 5)) widen insert /= zwgc-nth-notice mapcar zwgc-apply-cell run-hooks zwgc-got-notice-hook zwgc-update-mode-line zwgc-visible-p zwgc-pop-up-window zwgc-last-notice] 18))

(defun zwgc-resize-window nil "\
Resizes the zwgc window to the current notice (within the
constraints of zwgc-window-{min,max}-height).  The *zwgc* buffer must
be visible and selected." (byte-code "! 2 ed\"TV  ) W)  !Z!)" [lines nil t zwgc-window-max-height zwgc-window-min-height one-window-p count-lines enlarge-window window-height selected-window] 7))

(defun zwgc-nth-notice (n &optional nodisplay) (interactive "Nnotice #:") (byte-code "ÈW 	V \" Â  ̎ ebU5 `H S$E `H !) 
b#?\\ !G[!
`\" s Â}   ))" [n zwgc-notices beg nil nodisplay zwgc-notifications-terminator t zwgc-current-notice 1 error "No such notice: %d" zwgc-push-to-buffer ((byte-code " 
  " [nodisplay nil zwgc-pop-from-buffer] 2)) widen search-forward "Rep invariant failure in zwgc!" forward-char narrow-to-region mark-whole-buffer zwgc-update-mode-line zwgc-resize-window] 14))

(defun zwgc-first-notice nil (interactive) (byte-code "!" [nil zwgc-nth-notice 1] 2))

(defun zwgc-next-notice nil "\
Display the next notice in the *zwgc* buffer." (interactive) (byte-code "T!" [zwgc-current-notice nil zwgc-nth-notice] 2))

(defun zwgc-prev-notice nil "\
Display the previous notice in the *zwgc* buffer." (interactive) (byte-code "S!" [zwgc-current-notice nil zwgc-nth-notice] 2))

(defun zwgc-current-notice nil "\
A peculiar command used to reset the narrowed region after a 
notice has been deleted." (interactive) (byte-code "!" [zwgc-current-notice nil zwgc-nth-notice] 2))

(defun zwgc-last-notice nil (interactive) (byte-code "!" [zwgc-notices nil zwgc-nth-notice] 2))

(defun zwgc-punt (&optional nodisplay backwards) "\
Delete the current Zephyr notice.  Optional argument NODISPLAY
means not to display the new current notice after punting.  Returns t." (interactive) (byte-code "ĈW !p!qedG\\S6 	S		VE 	P 	WP ͉	 \"U Ӊ	 
?}  !=z !  ? !!  Ă  ! 
q," [zwgc-notices window-min-height buffer beg nil end zwgc-bufnam zwgc-notifications-terminator backwards zwgc-current-notice zwgc-bury-buffer nodisplay t 1 error "No notices to punt!" get-buffer widen delete-region 0 zwgc-update-mode-line selected-window get-buffer-window other-window one-window-p delete-windows-on bury-buffer run-hooks zwgc-killed-notice-hook] 15))

(defun zwgc-punt-backwards (&optional nodisplay) "\
Delete the currrent Zephyr notice, then go to previous one" (interactive) (byte-code "\"" [nodisplay t nil zwgc-punt] 3))

(defun zwgc-punt-regexp (regexp) "\
Cause zwgc to ignore all zwgc notices that match REGEXP.  With a
prefix, does the opposite operation." (interactive (byte-code "
 ! !C" [current-prefix-arg read-string "Regexp to unpunt: " "Regexp to punt: "] 3)) (byte-code "Ĉ
B \" 	B)" [current-prefix-arg cell regexp zwgc-notice-regexp-alist nil zwgc-punt zwgc-filter (lambda (x) (byte-code "	\"?" [cell x equal] 3))] 3))

(defun zwgc-reply nil "\
Performs a regular-expression search on the current notice with the
car of zwgc-reply-cell as the regexp and then calls the cdr of
zwgc-reply-cell with the match data as an argument." (interactive) (byte-code "? !  ! " [zwgc-reply-cell nil error "zwgc-reply-cell is not defined." zwgc-push-to-buffer zwgc-apply-cell zwgc-pop-from-buffer] 5))

(defun zwgc-show nil (interactive) (byte-code " !\"" [zwgc-bufnam nil zwgc-update-mode-line zwgc-pop-up-window get-buffer] 5))

(defun zwgc-hide nil "\
Bury the *zwgc* buffer (make it the least likely to be selected by
\\[switch-to-buffer]) and delete the window it is in." (interactive) (byte-code "  !    " [t nil zwgc-push-to-buffer bury-buffer one-window-p delete-window zwgc-pop-from-buffer-to-nowhere] 6))

(defun kill-zwgc nil "\
Kill the zwgc subprocess and the *zwgc* buffer." (interactive) (byte-code "Ĉ	!! ! !=?$ !!!!!
<  ?B 
!!+" [buf zwgc-bufnam win proc nil get-buffer get-buffer-window get-buffer-process process-status run error "No zwgc process currently running." interrupt-process sit-for 1 delete-process kill-buffer one-window-p delete-window run-hooks zwgc-killed-hook] 13))

(defun zwgc-set-min-height (height) (interactive "NMinimum height for zwgc buffer (incl. modeline): ") (byte-code "È	V    " [height zwgc-window-min-height zwgc-window-max-height nil zwgc-find-window zwgc-resize-window] 3))

(defun zwgc-inc-min-height nil (interactive) (byte-code "T!" [zwgc-window-min-height nil zwgc-set-min-height] 2))

(defun zwgc-set-max-height (height) (interactive "NMaximum height for zwgc buffer (incl. modeline): ") (byte-code "È	W    " [height zwgc-window-min-height zwgc-window-max-height nil zwgc-find-window zwgc-resize-window] 3))

(defun zwgc-dec-max-height nil (interactive) (byte-code "S!" [zwgc-window-max-height nil zwgc-set-max-height] 2))

(defun zwgc-toggle-warp (arg) (interactive "P") (byte-code " V 	? " [arg zwgc-warp-to-new nil 0 zwgc-update-mode-line] 2))

(defun start-zwgc nil "\
Start the zwgc process." (byte-code "	!! !qω
>( łW / !\"	
&	*\"\")*" [buffer zwgc-bufnam status zwgc-process default-directory nil process-environment zwgc-environment process-connection-type zwgc-prog zwgc-description-file zwgc-prog-additional-args get-buffer get-buffer-process process-status "/" (run stop) delete-process append apply start-process "Zwgc" "-ttymode" "-nofork" "-f" set-process-sentinel zwgc-sentinel set-process-filter zwgc-initial-wakeup] 15))

(defun zwgc nil "\
Run zwgc as a subprocess." (interactive) (byte-code "	!q  ))" [buffer zwgc-bufnam nil get-buffer-create zwgc-mode start-zwgc] 4))

(defun zwgc-make-keymap nil (interactive) (byte-code "!K!##################!#!#!#!########@ !" [zwgc-mode-map nil define-prefix-command suppress-keymap define-key "?" describe-mode "[" zwgc-set-min-height "]" zwgc-set-max-height "{" zwgc-dec-max-height "}" zwgc-inc-min-height "<" zwgc-first-notice ">" zwgc-last-notice "n" zwgc-next-notice "p" zwgc-prev-notice "." zwgc-current-notice "g" zwgc-nth-notice "r" zwgc-reply "d" zwgc-punt "" zwgc-punt-backwards "q" zwgc-hide "s" zwgc-show "f" zwgc-toggle-warp "K" kill-zwgc "" zwgc-wrap-function copy-region-as-kill "w" write-region " " scroll-up "" scroll-down "" zwgc-zpunt "" zwgc-punt-regexp "h" zwgc-summary "=" "c" zwgc-zctl-cmd "x" zwgc-call-process "l" zwgc-znol-mode-map run-hooks zwgc-make-keymap-hook] 38))

(zwgc-make-keymap)

(defun zwgc-mode nil "\
\\<zwgc-mode-map>Major mode for receiving and viewing Zephyr
notices.  Each time a notice is received it is displayed in the *zwgc*
window (which is created at the bottom of the screen if it does not
already exist).  When a notice is deleted with \\[zwgc-punt], the next
notice in the queue is displayed or, if there are no more notices, the
window disappears.

Each zephyr notice is expected to end with the value of the variable
zwgc-notifications-terminator (\"^L\\n\" by default).  The are several
variables that otherwise control the behavior of zwgc mode; UTFL.

All normal editing commands are turned off.  Instead, the following
commads are defined:

\\[zwgc-next-notice]		Move to next notice.
\\[zwgc-prev-notice]		Move to previous notice.
\\[zwgc-first-notice]		Move to first notice.
\\[zwgc-last-notice]		Move to last notice.
\\[zwgc-current-notice]		``Move'' to current notice.
\\[zwgc-punt]		Delete current notice.
\\[zwgc-hide]		Hide the *zwgc* buffer until a notice is received.
\\[zwgc-show]		Display the *zwgc* buffer.
\\[zwgc-summary]		Produce a summary of notice headers.
\\[kill-zwgc]		Kill the zwgc subprocess and *zwgc* buffer.
\\[zwgc-zpunt]		Punt/unpunt notices with zpunt.
\\[zwgc-punt-regexp]		Punt/unpunt notices matching regexp.
\\[zwgc-zctl-cmd]		Perform a 'zctl' command.
\\[zwgc-call-process]		Execute a program in zwgc's environment.
\\[zwgc-znol-mode-map]		Prefix key for *znol* buffer commands.
\\[write-region]		Write current notice to file.
\\[copy-region-as-kill]		Copy current notice as if killed.
\\[describe-mode]		This help message." (interactive) (byte-code "Ȉ ʉˉ#ωЉ!qed\")ӉӉȉ> Ȃ@  !!" [major-mode mode-name mode-line-format mode-line-process zwgc-bufnam zwgc-notices zwgc-current-notice zwgc-mode-map nil kill-all-local-variables zwgc-mode "zwgc" put mode-class special ("" mode-line-modified mode-line-buffer-identification "   " global-mode-string "   %[(" mode-name minor-mode-alist mode-line-process ")%]----" (-3 . "%p") "-%-") (":" zwgc-current-notice-string "/" zwgc-notices-string " " (zwgc-warp-to-new zwgc-warp-on-string zwgc-warp-off-string)) get-buffer delete-region 0 zwgc-make-keymap use-local-map run-hooks zwgc-mode-hook] 8))

(defun zwgc-sentinel (process signal) (byte-code "	!	!
=) \" Ă&  O\" 9 
=3 Ă9  !*" [buffer process status signal nil t process-buffer process-status exit equal "finished
" ding message "zwgc: %s, restarting" 0 -1 start-zwgc "zwgc: sentinel called for unknown reason!"] 9))

(defun zwgc-start-process (name buffer program &rest args) "\
Exactly like start-process except that zwgc-environment is added to
the process environment." (byte-code "	\"
%)" [process-environment zwgc-environment name buffer program args append apply start-process] 7))

(defun zwgc-call-process (program &optional infile buf-or-name dsp &rest args) "\
Exactly like call-process except that zwgc-environment is added to
the processes environment.  Called interactively, prompts for a string
which is the program to run plus any arguments.  Output is discarded
unless there is a prefix argument, in which case it is inserted into
the current buffer." (interactive (byte-code "!!
??@		FA\"*" [prog arg current-prefix-arg nil zwgc-split read-string "Program to run: " append] 7)) (byte-code "È\"	
\"&)" [prog arg current-prefix-arg nil process-environment zwgc-environment program infile buf-or-name dsp args append apply call-process zwgc-filter identity] 10))

(defun zwgc-zpunt (arg1 &optional arg2 arg3) "\
Called interactively, prompts for a string of the form
'string1[,string2[,string3]' and passes the strings separately as
arguments to zwgc-zpunt-prog.  Called non-interactively, takes one
string and optionally two more that are passed to zwgc-zpunt-prog.
The program is executed with the same environment as zwgc.

With a prefix argument, uses zwgc-zunpunt-prog instead." (interactive (byte-code " ! !\"" [current-prefix-arg zwgc-split read-string "String to zunpunt: " "String to zpunt: " "[ ,]+"] 5)) (byte-code " 	& &" [current-prefix-arg zwgc-zunpunt-prog nil arg1 arg2 arg3 zwgc-zpunt-prog zwgc-call-process] 9))

(defun zwgc-zctl-cmd (&rest args) "\
Takes any number of arguments and passes then to zwgc-zctl-prog,
running the program with the same environment as zwgc.  Called
interactively, prompts for a string that are the arguments to pass." (interactive (byte-code "!\"" [zwgc-split read-string "Zctl command: " "[ ]+"] 4)) (byte-code "
&" [zwgc-zctl-prog nil args apply zwgc-call-process] 7))

(defun zwgc-pop-up-window (ignored &optional leave) (byte-code " p =  !?  !( ǂ1  ! !! \"M !!	\"X !![ !	i !!\"o !-" [retwin retbuf pop-up-windows t window-min-height zwgc-window zwgc-emacs-type nil zwgc-bufnam leave selected-window 1 zwgc-find-window emacs19 frame-visible-p zwgc-get-frame make-frame-visible split-window zwgc-get-window select-window switch-to-buffer zwgc-resize-window equal window-buffer next-window other-window] 24))

(defun zwgc-do-autoload (symbol) "\
Loads the file SYMBOL autoloads from, if SYMBOL is autoloaded." (byte-code "	K@= A@!	K@= 	!\")" [l symbol autoload load-library error "Autoloading failed to define function %s" symbol-name] 5))

(defun zwgc-install-window-functions nil "\
Installs replacements for C-x 0, C-x 1, and C-x 2 that try hard 
to keep the *zwgc* buffer displayed and fixed in size." (interactive) (byte-code "###!KM" [global-map nil define-key "0" zwgc-hacked-delete-window "1" zwgc-hacked-delete-other-windows "2" zwgc-hacked-split-window zwgc-do-autoload zwgc-pop-to-buffer pop-to-buffer] 6))

(defun zwgc-autoload (symbol file doc) (byte-code "	
Q%" [symbol zwgc-load-dir file doc t nil autoload "/"] 6))

(defun zwgc-startup nil (byte-code "#####!" [zwgc-autoload zwgc-znol "zwgc-znol" "This is the main entry point for *znol* with emacs zwgc." zwgc-hacked-delete-window "zwgc-window" "delete-window without resizing *zwgc* window" zwgc-hacked-delete-other-windows "delete-other-windows without resizing *zwgc* window" zwgc-hacked-split-window "split-window without resizing *zwgc* window" zwgc-pop-to-buffer "pop-to-buffer that will not choose *zwgc*" fmakunbound zwgc-startup] 8))

(zwgc-startup)
