
(provide (quote discuss))

(defvar discuss-source-dir "/afs/sipb.mit.edu/project/discuss/exl/" "\
Source directory from which this version of discuss is loaded, including
the trailing `/'.  It must end with `/', since it will be directly
concatenated to other file names.  Setting this to nil or an empty string
will cause load-path to be used.")

(defvar edsc-machine-type (let ((foo nil) (process-connection-type nil) (buf (get-buffer-create " *edsc-xyzzy*"))) (save-excursion (set-buffer buf) (erase-buffer) (call-process-region (point) (point) "/bin/athena/machtype" nil t nil) (goto-char (point-max)) (delete-backward-char 1) (setq foo (buffer-string)) (kill-buffer buf) (if (eq foo "") (error "Can't determine machine type.") foo))))

(defvar discuss-pathname (format "/afs/sipb.mit.edu/project/discuss/exl/edsc.%s" edsc-machine-type) "\
*Name of program to run as slave process for discuss.")

(defvar discuss-DWIM nil "\
If true, enable Do_What_I_Mean mode.  Allows the user to read discuss by
repeatedly hitting the space bar.  For the truly lazy user.")

(defvar discuss-safe-delete nil "\
If true, discuss asks for confirmation before deleting a transaction with
discuss-delete-trn.")

(defvar discuss-mtgs-mode-map nil "\
Keymap used by the meetings-list mode of the discuss subsystem.")

(defvar discuss-list-mode-map nil "\
Keymap used by the transaction-list mode of the discuss subsystem.")

(defvar discuss-trn-mode-map nil "\
Keymap used by the transaction mode of the discuss subsystem.")

(defvar discuss-main-buffer "*meetings*" "\
Name of main buffer for discuss, which holds a list of the current
meetings.")

(defvar discuss-version nil "\
Version of discuss code loaded.")

(defun discuss-version nil (interactive) (byte-code "!" [discuss-version nil message] 2))

(defvar discuss-process nil "\
Structure discribing the slave discuss subprocess.")

(defvar discuss-cont nil "\
Internal hook to call when discuss subprocess is done.")

(defvar discuss-unwind nil "\
Internal hook to call when discuss subprocess returns an error.")

(defvar discuss-in-progress nil "\
t if a request to the slave subprocess is outstanding.")

(defvar discuss-form nil "\
Lisp form returned by the subprocess.")

(defvar discuss-meeting-list nil "\
Meeting list.")

(defvar discuss-meeting-completion-list nil "\
Meeting list changed into the right format for completion-read.")

(defvar discuss-show-num 0 "\
Current discuss transaction number.")

(defvar discuss-meeting nil "\
Buffer-local variable containing the name of the meeting of a discuss
transaction buffer.  Nil means this buffer is not a discuss-transaction
buffer.")

(defvar discuss-meeting-info nil "\
Buffer-local variable containing the info struction for the discuss
transaction buffer.")

(defvar discuss-cur-mtg-buf nil "\
Name of buffer for current Discuss meeting.")

(defvar discuss-cur-direction 0 "\
Current discuss direction.")

(defvar discuss-async t "\
*Run discuss commands asynchronously.

Currently ignored (always async).")

(defvar discuss-in-show-trn nil)

(defvar discuss-error nil "\
Contains error message returned by edsc process.  If nil, means last
request completed successfully.")

(defun discuss-mtgs-mode nil "\
Major mode for providing an emacs discuss subsystem.
This looks a lot like RMAIL.  This works by using ``edsc'' as a subjob.

The following commands are available:
\\[describe-mode]	List available commands.
\\[discuss-forward-meeting]	Go to next meeting that has unread transactions.
\\[discuss-prev-meeting]	Go to previous meeting has unread transactions.
\\[discuss-lsm]	List meetings.
\\[discuss-goto]	Go to meeting listed on line.
\\[discuss-add-mtg]	Add meeting.
\\[discuss-del-mtg]	Delete meeting listed on line.
\\[discuss-catchup]	Mark a meeting as read (catch up).
\\[discuss-quit]	Quit Discuss." (interactive) (byte-code "ň ǉȉ
!ĉ!" [major-mode mode-name discuss-mtgs-mode-map buffer-read-only t nil kill-all-local-variables discuss-mtgs-mode "Discuss (meetings)" use-local-map run-hooks discuss-mode-hooks] 4))

(defun discuss-list-mode nil "\
Major mode for looking at listings of a meeting under the
discuss subsystem." (interactive) (byte-code "ƈ ɉʉ
!ĉ!Ɖ!Ɖ!" [major-mode mode-name discuss-list-mode-map buffer-read-only t trans-buffer nil meeting-name kill-all-local-variables discuss-list-mode "Discuss (list)" use-local-map make-local-variable run-hooks discuss-list-hooks] 6))

(defun discuss-trn-mode nil "\
Major mode for looking at transactions of a meeting under the
discuss subsystem.
All normal editing commands are turned off.
Instead, these commands are available:

\\[describe-mode]	List available commands.
\\[discuss-scroll-up]	Scroll to next screen of this transaction.
\\[scroll-down]	Scroll to previous screen of this transaction.
\\[discuss-ls]	List headers of remaining transactions.
\\[discuss-next-trn]	Move to Next transaction.
\\[discuss-prev-trn]	Move to Previous transaction.
\\[discuss-last-trn]	Move to Last transaction in meeting.
\\[discuss-first-trn]	Move to First transaction in meeting.
\\[discuss-nref]	Move to Next transaction in chain.
\\[discuss-pref]	Move to Previous transaction in chain.
\\[discuss-fref]	Move to First transaction in chain.
\\[discuss-lref]	Move to Last transaction in chain.
\\[discuss-show-trn]	Goto a specific transaction.
\\[discuss-delete-trn]	Delete transaction (and move forwards).
\\[discuss-delete-trn-backwards]	Delete transaction (and move backwards).
\\[discuss-retrieve-trn]	Retrieve (undelete) a deleted transaction.
\\[discuss-reply]	Reply to this transaction (via discuss.)
\\[discuss-reply-by-mail]	Reply to this transaction (via mail.)
\\[discuss-forward]	Forward this transaction via mail.
\\[discuss-trn-output]	Append this transaction to a UNIX file.
\\[discuss-talk]	Talk.  Enter a new transaction.
\\[discuss-toggle-trn-flag]	Toggle the flag on this transaction.
\\[discuss-set-seen-and-leave-mtg]	Mark transaction as highest-seen and leave meeting.
\\[discuss-catchup]	Catch up.  Mark all of the transactions in this meeting as read.
\\[discuss-add-mtg]	Add meeting (if this transaction is a meeting annoucement).
\\[discuss-leave-mtg]	Quit (leave) meeting." (interactive) (byte-code "Ȉ ʉˉ
!ĉ!Ή!Ή!!!ȉ!" [major-mode mode-name discuss-trn-mode-map buffer-read-only t discuss-current-transaction discuss-highest-seen discuss-output-last-file nil kill-all-local-variables discuss-trn-mode "Discuss (transaction)" use-local-map make-local-variable 0 discuss-meeting discuss-meeting-info run-hooks discuss-trn-hooks] 9))

(defun discuss (&optional arg) "\
Enter discuss mode for emacs and list meetings." (interactive "P") (byte-code "!! !! 	GV?8 !! 3 !5  ; !" [discuss-main-buffer discuss-meeting-list nil arg message "Starting discuss...." get-buffer buffer-name 0 switch-to-buffer get-buffer-create discuss-mtgs-mode "Hit `g' and enter a meeting name." discuss-lsm] 11))

(defun discuss-list-meetings nil "\
List discuss meetings." (interactive) (byte-code "!! )#$" [discuss-main-buffer buffer-read-only nil message "Listing meetings..." switch-to-buffer get-buffer erase-buffer discuss-send-cmd "(gml)
" discuss-end-of-lsm discuss-read-form] 11))

(fset (quote discuss-lsm) (symbol-function (quote discuss-list-meetings)))

(defun cadr (x) (byte-code "A@" [x] 1))

(defun caddr (x) (byte-code "AA@" [x] 1))

(defun cddr (x) (byte-code "AA" [x] 1))

(defun discuss-lsm-1 (entry) (byte-code "@= Ă @; ł !\"@;+ @#7 !7 !\"c" [entry t insert 1 " c       " "   X     " "         " cadr " (" ")" cddr mapcar discuss-lsm-2 "
"] 8))

(defun discuss-lsm-2 (name) (byte-code "\"" [name insert ", "] 3))

(defun flatten (list) (byte-code "	= 	@!	A
=?: A=?) A @!\"A 
+" [nil list newlist restoflist pointer copy-list setcdr] 6))

(defun copy-list (list) (byte-code "	=
  	@	A!B" [nil list copy-list] 3))

(defun discuss-end-of-lsm nil (byte-code "!p	q\"\"!\" eb\"\"db!)eb!q)!" [orig-buffer discuss-main-buffer discuss-meeting-list discuss-form discuss-meeting-completion-list buffer-read-only nil message "Listing meetings..." apply vector mapcar (lambda (x) (byte-code "B" [x 0] 2)) flatten cdr erase-buffer insert " Flags   Meeting name
" " -----   ------------
" discuss-lsm-1 backward-delete-char 1 forward-line 2 "Listing meetings...done."] 12))

(defun discuss-find-meeting (meeting) (byte-code "
G	W 
H>? T 	W' ( *" [i eol discuss-meeting-list meeting nil 0] 3))

(defun discuss-quit nil "\
Exits Discuss mode." (interactive) (byte-code "    !	!" [discuss-cur-mtg-buf discuss-main-buffer nil discuss-leave-mtg discuss-restart switch-to-buffer other-buffer bury-buffer] 6))

(defun discuss-goto (&optional meeting) "\
Go to a meeting." (interactive (byte-code "  	\"? `U 
%C" [current-prefix-arg discuss-main-buffer discuss-meeting-completion-list nil t equal buffer-name 1 completing-read "Meeting name:  " ""] 8)) (byte-code "È?' `Td^\"ZW !H!)9 !9 	\"?Y D  Q!! q q
#o Âp #!	P\"$" [current-prefix-arg discuss-main-buffer discuss-meeting-completion-list nil t meeting curline discuss-meeting-list discuss-cur-mtg-buf discuss-current-meeting discuss-highest-seen discuss-meeting discuss-old-ss discuss-output-last-file count-lines 1 3 0 error "Not looking at a meeting." cadr buffer-name equal discuss-leave-mtg get-buffer-create "*" " meeting*" switch-to-buffer discuss-trn-mode discuss-send-cmd format "(ss %d %s)
" discuss-read-form ".trans" "(gmi %s)
" discuss-end-of-goto discuss-goto-error] 18))

(defun discuss-goto-error nil "\
Called to back out when there's an error in going to a meeting." (byte-code "!!!" [discuss-cur-mtg-buf nil discuss-current-meeting discuss-main-buffer kill-buffer buffer-name switch-to-buffer] 4))

(defun discuss-end-of-goto nil (byte-code "	8	8\"?  
8\"	8V2  !!	!Z$q	!?P Ƃz 	8!^ !z !g Yp !z ##)" [last discuss-form discuss-current-meeting-info discuss-highest-seen discuss-cur-mtg-buf discuss-current-transaction nil t discuss-meeting 4 string-match "r" 10 discuss-goto-error error "Insufficient access to read transactions in %s" 1 11 beep message "Warning!  Last seen transaction higher than last transaction" sit-for "%s meeting: %d new, %d last." cadr zerop 3 "Empty meeting." discuss-show-trn discuss-send-cmd format "(nut %d %s)
" (lambda nil (progn (discuss-show-trn (car discuss-form)))) discuss-read-form] 18))

(defun discuss-stat (&optional meeting) "\
Go to a meeting." (interactive (byte-code "p=
 	$ 
  \"? `U$ %C" [discuss-cur-mtg-buf discuss-meeting current-prefix-arg discuss-main-buffer discuss-meeting-completion-list nil t equal buffer-name 1 completing-read "Meeting name:  " ""] 8)) (byte-code "ň?) `Td^\"ZW !	H!)\"#" [discuss-cur-mtg-buf discuss-meeting current-prefix-arg discuss-main-buffer discuss-meeting-completion-list nil t meeting curline discuss-meeting-list count-lines 1 3 0 error "Not looking at a meeting." cadr discuss-send-cmd format "(gmi %s)
" discuss-end-of-stat discuss-read-form] 8))

(defun discuss-end-of-stat nil (byte-code "			8	8	!\" U?% 	!Z$*" [discuss-current-meeting-info discuss-form discuss-meeting-info last highest-seen discuss-current-meeting discuss-highest-seen 4 11 equal cadr 0 message "%s meeting: %d new, %d last."] 8))

(defun discuss-show-trn (trn-num) "\
Show transaction number N (prefix argument)." (interactive (byte-code "!? !! C" [current-prefix-arg numberp string-to-int read-string "Transaction number: "] 4)) (byte-code "ň		 	! 		$#" [current-prefix-arg trn-num discuss-show-num discuss-cur-direction discuss-current-meeting nil numberp discuss-send-cmd format "(gtfc %d %d %s)
" discuss-end-show-trn discuss-read-form] 7))

(defun discuss-end-show-trn nil (byte-code "	@
q	A]8Y*  !)8# !eb)!U[ \"!!!)" [transaction-file discuss-form discuss-cur-mtg-buf discuss-current-transaction-info discuss-current-transaction discuss-show-num discuss-highest-seen discuss-current-meeting-info discuss-in-show-trn t nil mode-line-process buffer-read-only discuss-meeting 4 discuss-update discuss-block-til-ready format " %d/%d" erase-buffer insert-file-contents caddr 0 message "Last transaction in %s" discuss-mark-read-meeting discuss-next-meeting run-hooks discuss-show-trn-hooks] 11))

(defun discuss-update nil "\
Update Discuss display to show new transactions." (interactive) (byte-code "\"#" [discuss-meeting nil discuss-send-cmd format "(gmi %s)
" discuss-end-of-update discuss-read-form] 5))

(defun discuss-end-of-update nil (byte-code "	
q? !)" [discuss-current-meeting-info discuss-form discuss-cur-mtg-buf discuss-in-show-trn discuss-current-transaction discuss-show-trn] 2))

(defun discuss-next-trn nil "\
Show next transaction." (interactive) (byte-code "Ĉ?
 U !c 
!	UZ ##!
!UG A  D !W Ӊ\"# b Ӊ	!)" [discuss-current-transaction next discuss-current-transaction-info discuss-current-meeting nil discuss-form discuss-DWIM discuss-cur-direction 0 error "Not looking at transactions" caddr discuss-send-cmd format "(gti %d %s)
" discuss-read-form discuss-block-til-ready discuss-leave-mtg "No next transaction." 1 "(im %s)
" discuss-next-trn discuss-show-trn] 13))

(defun discuss-prev-trn nil "\
Show previous transaction." (interactive) (byte-code "Ĉ?
 U !+ 
!	U# !* ʉ	!)" [discuss-current-transaction prev discuss-current-transaction-info discuss-cur-direction nil 0 error "Not looking at transactions" cadr "No previous transaction." 2 discuss-show-trn] 5))

(defun discuss-nref nil "\
Show next transaction in chain." (interactive) (byte-code "Ĉ?
 U !+ 
8	U# !* ʉ	!)" [discuss-current-transaction nref discuss-current-transaction-info discuss-cur-direction nil 0 error "Not looking at transactions" 4 "No next reference." 3 discuss-show-trn] 4))

(defun discuss-pref nil "\
Show previous transaction in chain." (interactive) (byte-code "Ĉ?
 U !+ 
8	U# !* ʉ	!)" [discuss-current-transaction pref discuss-current-transaction-info discuss-cur-direction nil 0 error "Not looking at transactions" 3 "No previous reference." 4 discuss-show-trn] 4))

(defun discuss-lref nil "\
Show last transaction in chain." (interactive) (byte-code "Ĉ?
 U !+ 
8	U# !* ʉ	!)" [discuss-current-transaction lref discuss-current-transaction-info discuss-cur-direction nil 0 error "Not looking at transactions" 6 "No last reference." 4 discuss-show-trn] 4))

(defun discuss-fref nil "\
Show first transaction in chain." (interactive) (byte-code "Ĉ?
 U !+ 
8	U# !* ʉ	!)" [discuss-current-transaction fref discuss-current-transaction-info discuss-cur-direction nil 0 error "Not looking at transactions" 5 "No first reference." 3 discuss-show-trn] 4))

(defun discuss-first-trn nil "\
Show first transaction of meeting." (interactive) (byte-code "È	8ŉ!)" [first discuss-current-meeting-info discuss-cur-direction nil 3 1 discuss-show-trn] 2))

(defun discuss-last-trn nil "\
Show last transaction of meeting." (interactive) (byte-code "È	8ŉ!)" [last discuss-current-meeting-info discuss-cur-direction nil 4 2 discuss-show-trn] 2))

(defun discuss-toggle-trn-flag nil "\
Toggle the per-transaction flag." (interactive) (byte-code "Ĉ	8% 
##!\"
$#)" [old-flag discuss-current-transaction-info discuss-current-transaction discuss-meeting nil 13 discuss-send-cmd format "(it %d %s)
" discuss-read-form message "Toggling the transaction flag...." "(sfl %d %d %s)
" logxor 2 discuss-end-of-toggle] 10))

(defun discuss-end-of-toggle nil (byte-code "!!" [discuss-current-transaction discuss-show-trn message ""] 3))

(defun discuss-set-seen-and-leave-mtg (arg) "\
Sets the highest transaction number seen in the current meeting to
the argument or the current transaction and leaves the meeting." (interactive "p") (byte-code "ǈ? !' 	  \"! " [discuss-cur-mtg-buf current-prefix-arg discuss-highest-seen arg discuss-current-transaction t discuss-current-meeting nil error "Not looking at a meeting." discuss-next-meeting discuss-mark-unread-meeting discuss-leave-mtg] 5))

(defun discuss-leave-mtg nil "\
Leave the current discuss meeting." (interactive) (byte-code "È!6 q	U?# 	
#! Â\" #!!ÉÉ!" [discuss-cur-mtg-buf discuss-highest-seen discuss-meeting nil discuss-old-ss discuss-current-meeting discuss-main-buffer buffer-name 0 discuss-send-cmd format "(ss %d %s)
" discuss-read-form kill-buffer switch-to-buffer] 7))

(defun discuss-catchup (&optional meeting) "\
Mark all messages in the current meeting as read." (interactive (byte-code " 	 `U 
%C" [discuss-cur-mtg-buf current-prefix-arg discuss-meeting-completion-list nil t 1 completing-read "Meeting name:  " ""] 6)) (byte-code "È?	 ;E `Td^\"Z Â3 W) !H!\"\"#)Z 	8	8!! " [discuss-cur-mtg-buf current-prefix-arg discuss-meeting-completion-list nil t meeting curline discuss-meeting-list discuss-highest-seen discuss-current-meeting-info count-lines 1 3 0 error "Not looking at a meeting." cadr message "Catching up in %s" discuss-send-cmd format "(gmi %s)
" discuss-end-of-catchup discuss-read-form 6 discuss-mark-read-meeting discuss-next-meeting discuss-leave-mtg] 10))

(defun discuss-end-of-catchup nil (byte-code "	8	8
# Â #!!!*" [meeting discuss-form highest nil discuss-old-ss t 1 6 discuss-send-cmd format "(ss %d %s)
" discuss-read-form discuss-mark-read-meeting discuss-next-meeting message "Done."] 6))

(defun discuss-delete-trn-backwards (trn-num) (interactive (byte-code " 	 !!C !2 p	=\" 
C2 	/ !!C2 !" [current-prefix-arg discuss-cur-mtg-buf discuss-current-transaction t string-to-int read-input "Transaction to delete: " error "Not currently visiting a meeting."] 7)) (byte-code "ň\"" [current-prefix-arg discuss-cur-mtg-buf discuss-current-transaction t trn-num nil discuss-delete-trn] 3))

(defun discuss-delete-trn (trn-num &optional backwards) (interactive (byte-code " 	 !!C !2 p	=\" 
C2 	/ !!C2 !" [current-prefix-arg discuss-cur-mtg-buf discuss-current-transaction t string-to-int read-input "Transaction to delete: " error "Not currently visiting a meeting."] 7)) (byte-code "ƈ \"!? Ƃz 	# 
U^ 
: !!	F !!	
UQ 	
U^ ! ##\"##*" [current-prefix-arg discuss-cur-mtg-buf discuss-current-transaction t discuss-safe-delete trn-num nil info discuss-current-transaction-info other backwards discuss-meeting yes-or-no-p format "Delete transaction %d? " cadr caddr 0 message "No more transactions in meeting!" beep discuss-send-cmd "(itn %d %s)
" discuss-read-form "Deleting %d...." "(dt %d %s)
" discuss-end-del-trn] 16))

(defun discuss-end-del-trn nil (byte-code "!!" [discuss-current-transaction message "Done." discuss-show-trn] 3))

(defun discuss-retrieve-trn (trn-num) "\
Retrieve a deleted transaction." (interactive "nTransaction to retrieve: ") (byte-code "È		\"	
##" [discuss-current-transaction trn-num discuss-meeting nil message "Retrieving %d...." discuss-send-cmd format "(rt %d %s)
" discuss-end-rt-trn discuss-read-form] 6))

(defun discuss-end-rt-trn nil (byte-code "!	##!" [discuss-current-transaction discuss-meeting message "Done." discuss-send-cmd format "(itn %d %s)
" nil discuss-read-form discuss-show-trn] 6))

(defun discuss-la-invalidate-relatives (trn-num) (byte-code "	##" [trn-num discuss-meeting discuss-send-cmd format "(itn %d %s)
" nil discuss-read-form] 5))

(defun discuss-format-trn-num (num) (byte-code "X ł! X ǂ! X  ɂ! #" [num t format "[%s%d]" 9 "000" 99 "00" 999 "0" ""] 4))

(defun discuss-scroll-up nil (interactive) (byte-code "Ï" [nil err (byte-code "!" [nil scroll-up] 2) ((error (byte-code " 	\" 
8\"    $ 	@	A\"" [discuss-DWIM err discuss-current-transaction discuss-current-meeting-info equal (end-of-buffer) 4 discuss-leave-mtg discuss-next-trn signal] 7)))] 3))

(defun discuss-restart nil "\
Used to save the world when edsc gets hung or dies...

Flushes the discuss cache and destroys the edsc process." (interactive) (byte-code " !\" \"" [discuss-process nil discuss-in-progress equal process-status run send-string "(quit)
"] 5))

(defun discuss-send-cmd (cmd &optional end-func filter-func unwind-func) "\
Send an command to the edsc process." (byte-code "? !? \"#\"#!5 @F \"A F \"\"\"\"Z#Vf 	m !	U
V  \" 	#!*)! ĉ \"\")" [discuss-process process-connection-type nil discuss-pathname t discuss-vers discuss-form discuss-error ver-string discuss-version-string discuss-old-ss filter-func discuss-in-progress discuss-debug-cmd cmd discuss-reading-string discuss-cont end-func discuss-unwind unwind-func file-exists-p error "%s does not exist!" start-process "discuss-shell" set-process-sentinel discuss-edsc-sentinel discuss-send-cmd "(gpv)
" discuss-read-form discuss-block-til-ready equal "Unimplemented operation" 10 "Edsc returned error: %s" format "%d.%d" / * 23 "" cadr 25 discuss-restart "Bad version of edsc (%s) --- you need at least version 2.5." message "Started edsc process.... version %s %s)" sit-for 1 set-process-filter send-string] 22))

(defun discuss-block-til-ready (verbose) "\
Block, waiting until the previous operation for discuss finished.
If VERBOSE is non-nil, then print a message that we're waiting for the
discuss server while we spin-block." (byte-code "  	 !!  !" [discuss-in-progress verbose message "waiting for discuss..." sit-for 1 accept-process-output ""] 5))

(defun discuss-edsc-sentinel (process signal) (byte-code "	!	!
=  & 
=&  O\" *" [buffer process status signal process-buffer process-status exit discuss-restart ding message "discuss-shell: %s." 0 -1] 9))

(defun discuss-read-form (process string) (byte-code "	P\"
 O
OƉ\"8 !
TO\" \"T \"
TO\" \" ! 
TOƉƉ	
 
\" P!@	Ɖ \"*)" [discuss-reading-string string end-of-line flag-char first-line discuss-error nil process discuss-in-progress discuss-form discuss-unwind t discuss-cont string-match "
" 0 1 equal "-" message discuss-read-form "" "l" ";" ding apply read-from-string "("] 15))

(defun discuss-initialize nil (byte-code "Ɖ	P$	P$	P$	P$	P$	P$	P$	P$	P$	P$f Ă  !############ Ă !#######@ A #B C #D #E F #G H #I #J K #L M #N M #O #P #Q #R #S T #U V #W ####X Y #Z [ #\\ ] #^ ##_ #` a !" [discuss-version discuss-source-dir t discuss-mtgs-mode-map nil discuss-trn-mode-map "$Header: /afs/sipb.mit.edu/project/discuss/.cvsroot/discuss/source/edsc/discuss.el,v 2.14 1994/09/11 00:09:47 ckclark Exp $" autoload discuss-talk "discuss-enter" "Enter a new discuss transaction." discuss-reply "Reply to an existing discuss transaction." discuss-randrp "Random reply in a meeting." discuss-ls "discuss-ls" "List the headings of the transactions in a meeting." discuss-list-acl "discuss-acl" "List the ACL of a meeting." discuss-forward "discuss-misc" "Forward a transaction via mail." discuss-forward-to-meeting "Forward a transaction to another discuss meeting." discuss-reply-by-mail discuss-add-mtg "Add a discuss meeting" discuss-del-mtg "Delete a discuss meeting" make-keymap suppress-keymap define-key "a" "d" "n" discuss-forward-meeting "p" discuss-prev-meeting " " discuss-next-meeting "" "l" discuss-lsm "g" discuss-goto "q" discuss-quit "s" discuss-stat "c" discuss-catchup "?" describe-mode "." discuss-update discuss-scroll-up scroll-down discuss-next-trn discuss-prev-trn discuss-delete-trn "R" discuss-retrieve-trn "" discuss-nref "" discuss-pref discuss-show-trn "<" discuss-first-trn ">" discuss-last-trn "f" "F" discuss-toggle-trn-flag "h" discuss-trn-summary "" "t" "r" "" "" "" discuss-trn-output "i" discuss-trn-input discuss-leave-mtg "" discuss-delete-trn-backwards "" discuss-fref "" discuss-lref "=" discuss-set-seen-and-leave-mtg fmakunbound discuss-initialize] 61))

(discuss-initialize)

(defun discuss-trn-output (file-name) "\
Append this message to file named FILE-NAME." (interactive (byte-code "!Q!#C" [discuss-output-last-file read-file-name "Append to: (default " file-name-nondirectory ") " file-name-directory] 6)) (byte-code "ƈ	!	p!q 
!dbced	#)!+" [discuss-output-last-file file-name discuss-trn-buf tembuf case-fold-search t nil expand-file-name get-buffer-create " discuss-trn-output" erase-buffer insert-buffer-substring "
" append-to-file kill-buffer] 8))

(defun discuss-next-meeting (&optional quiet dontgo) "\
Find the next changed meeting in the discuss *meetings* buffer, or wrap." (interactive) (byte-code "ňp	q
 ? Ȋ `)#\"  @ #?@ eb#?@ ?@ !q)" [buffer discuss-main-buffer discuss-DWIM dontgo t nil quiet re-search-backward "^ c" beginning-of-line discuss-goto re-search-forward "^ c " message "No new meetings, try discuss-lsm instead."] 8))

(defun discuss-forward-meeting (&optional quiet) "\
Find the next changed meeting in the discuss *meetings* buffer, or wrap." (interactive) (byte-code "
!)" [discuss-DWIM nil quiet discuss-next-meeting] 2))

(defun discuss-prev-meeting nil "\
Find the previous changed meeting in the discuss *meetings* buffer, or wrap." (interactive) (byte-code " #? db#? !!" [nil t beginning-of-line re-search-backward "^ c " message "No new meetings, try discuss-lsm instead." forward-char 3] 6))

(defun discuss-mark-read-meeting (meeting &optional inschar) "\
Mark a meeting as read on the discuss-mode listing.  An optional
argument means insert that character instead of a space before the
meeting (usually a c)." (byte-code " Ɖ	qeb
!Q#?'  
\"9  !\"!))" [inschar discuss-main-buffer meeting nil t buffer-read-only 32 re-search-forward " " regexp-quote "\\(,\\|$\\)" ding message "Couldn't update changed flag for meeting %s." beginning-of-line forward-char 1 insert-char delete-char] 9))

(defun discuss-mark-unread-meeting (meeting) "\
Mark a meeting as unread on the discuss-mode listing." (byte-code "\"" [meeting discuss-mark-read-meeting 99] 3))
