;ELC ;;; compiled by jwz@thalidomide on Fri Dec 31 02:01:40 1993 ;;; from file /th/jwz/emacs19/lisp/packages/gopher.el ;;; emacs version 19.9 Lucid (beta9). ;;; bytecomp version 2.22; 22-dec-93. ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19"))) (error "This file was compiled for Emacs 19.")) (byte-code "!! !M!!K !KM M)!KM" [require electric forms "19" emacs-version boundp epoch::version gopher-background #[(command) " P!" [shell-command command "&"] 3] fboundp background old-background load-library "background"] 2) (defvar gopher-root-node (vector 49 "root" "" "ucs_gopher" 70) "\ The root gopher server, as a gopher object.") (defvar gopher-directory-mode-hook nil "\ *Invoked when entering a new gopher directory.") (defvar gopher-directory-mode-map (make-keymap) "\ Keymap for gopher-directory-mode.") (defvar gopher-document-mode-hook nil "\ *Invoked when showing gopher document.") (defvar gopher-document-mode-map (make-keymap) "\ Keymap for gopher-document-mode.") (defvar gopher-form-mode-hooks nil "\ *Invoked with entering a gopher form (i.e., for CSO).") (defvar gopher-form-mode-map (make-keymap) "\ Keymap for gopher-form-mode.") (defvar gopher-tmp-buf nil "\ Buffer used to receive output from gopher.") (defvar gopher-debug-read t "\ *If non-nil, show the current status about reading the gopher server output.") (defvar gopher-buggy-accept nil "\ *If non-nil, use sit-for instead of accept-process-output. If gopher consistently hangs while fetching an object, try turning this on.") (defvar gopher-hostname-aliases '(("128.230.33.31" . "oliver.syr.edu")) "\ Emacs can't deal with raw IP addresses used as a hostname. Use this to work around...") (defvar gopher-port-aliases '(("whois_port" . 43)) "\ Some losing hosts send a port name instead of a number. Use this table to convert...") (defvar gopher-support-bookmarks nil "\ *If nil, do not implement bookmarks. If 'unix or t, read and write bookmarks to ~/.gopherrc. If a filename, read and save vector from there directly (not implemented yet). If a vector, treat as a built-in directory.") (defconst gopher-bookmarks nil "\ Internal bookmark directory.") (defconst gopher-bookmarks-modified nil "\ Do bookmarks need to be saved?") (defconst gopher-killed-bookmark nil "\ The last bookmark object to be killed") (defconst gopher-bookmark-directory-p nil "\ Is this buffer a bookmark directory? A buffer-local variable.") (defvar gopher-bookmark-modified-tick 0 "\ Counts each time the bookmark vector is modified.") (defvar gopher-telnet-command (byte-code "=!ć!Ƈ" [system-type vax-vms getenv "DECW$DISPLAY" "create/terminal/wait/window=(title=\"telnet\") telnet" "DISPLAY" "xterm -e telnet"] 2) "\ *Command to use to start a telnet session. If this is nil, the emacs-lisp telnet package will be used. The default setting is to create a terminal window running telnet if you've specified an X server, and to use the emacs-lisp telnet otherwise.") (defvar gopher-image-display-command "xv -geometry +200+200" "\ *The command used to try to display an image object.") (defvar gopher-object-type-alist '((48 "" gopher-document-object) (49 "/" gopher-directory-object) (50 " " gopher-cso-object) (51 " " gopher-unimplemented-object) (52 " " gopher-binary-object) (53 " " gopher-binary-object) (54 " " gopher-binary-object) (55 " " gopher-index-object) (56 " " gopher-telnet-object) (57 " " gopher-binary-object) (84 " " gopher-unimplemented-object) (115 " <)" gopher-binary-object) (77 " " gopher-unimplemented-object) (104 " " gopher-unimplemented-object) (73 " " gopher-image-object) (99 " " gopher-unimplemented-object) (103 " " gopher-image-object)) "\ *Alist describing the types of gopher objects this client know about. The keys are the gopher type characters. The second element in each list is the string to tag onto the end of an object's description, to identify it to the user. The third element is the function to use to retrieve the object. It is called with two arguments: the gopher object to retrieve and the buffer which should be returned to when the user is done with this object.") (byte-code "" [5 gopher-object-length] 1) (fset 'gopher-object-type '(macro . #[(object) " E" [aref object 0] 3 "\ Return the gopher type of OBJECT."])) (fset 'gopher-object-descr '(macro . #[(object) " E" [aref object 1] 3 "\ Return the gopher description of OBJECT."])) (fset 'gopher-object-selector '(macro . #[(object) " E" [aref object 2] 3 "\ Return the gopher selector string for OBJECT."])) (fset 'gopher-object-host '(macro . #[(object) " E" [aref object 3] 3 "\ Return the gopher hostname for OBJECT."])) (fset 'gopher-object-port '(macro . #[(object) " E" [aref object 4] 3 "\ Return the gopher TCP port number for OBJECT."])) (fset 'gopher-set-object-type '(macro . #[(object type) " F" [aset object 0 type] 4 "\ Set the gopher type of OBJECT to TYPE."])) (fset 'gopher-set-object-descr '(macro . #[(object descr) " F" [aset object 1 descr] 4 "\ Set the gopher description of OBJECT to DESCR."])) (fset 'gopher-set-object-selector '(macro . #[(object selector) " F" [aset object 2 selector] 4 "\ Set the gopher selector string for OBJECT to SELECTOR."])) (fset 'gopher-set-object-host '(macro . #[(object host) " F" [aset object 3 host] 4 "\ Set the gopher hostname for OBJECT to HOST."])) (fset 'gopher-set-object-port '(macro . #[(object port) " F" [aset object 4 port] 4 "\ Set the gopher TCP port number for OBJECT to PORT."])) (fset 'gopher-retrieve-document-cleanly '(macro . #[(args handle &rest body) " \"D\"DF" [condition-case nil append progn (gopher-retrieve-document) args body error handle] 7 "\ Call gopher-retrieve-document with condition-case wrapped around, applying HANDLE if appropriate."])) (byte-code "!!!!!!‡" [boundp gopher-dir nil gopher-last gopher-obj gopher-telnet-process-name gopher-bookmark-buffer-tick forms-accept-action] 2) (fset 'gopher #[(&optional askserv) " H\"Iʼn H!\"̏g !!Z I* \"" [askserv gopher-root-node 3 read-string "Gopher server: " nil port portstr "Port: " int-to-string 4 (byte-code " !@" [read-from-string portstr] 2) ((error)) ding message "Port must be numeric" sit-for 1 gopher-read-bookmarks gopher-dispatch-object] 7 "\ Start a gopher session. With C-u, prompt for a gopher server." "P"]) (fset 'gopher-atpoint #[nil "!w ) \"!)" [nil bkmk re-search-backward "^#[ ]*$\\|^[ ]*$\\|\\`" " \n" gopher-parse-bookmark gopher-read-bookmarks gopher-dispatch-object error "Illformed bookmark"] 3 "\ Try to interpret the text around point as a gopher bookmark, and dispatch to that object." nil]) (fset 'gopher-dispatch-object #[(obj lastbuf) "H\n 8 \" \")" [obj 0 gopher-object-type-alist typedesc 2 lastbuf gopher-unimplemented-object] 4 "\ Dispatch a gopher object depending on its type."]) (fset 'gopher-unimplemented-object #[(obj lastbuf) "!" [error "unimplemented object type"] 2]) (fset 'gopher-next-field #[nil "`w\n`{g=u *" [nil s beg "^ \n" 9] 2 "\ Returns as a string all chars between point and the next tab or newline. Point is advanced to after the tab (or to the end-of-line)."]) (fset 'gopher-make-local-vars #[(&rest pairs) "@!@A@LAAm‡" [pairs make-local-variable nil] 3]) (fset 'gopher-get-tmp-buf #[nil " !! ! " [bufferp gopher-tmp-buf get-buffer-create " *gopher-tmp*" buffer-flush-undo] 2 "\ Get a temporary buffer in which to receive gopher output."]) (fset 'gopher-get-dir-buf #[(descr) "\nP! ! )" [generate-new-buffer "*gopher*" descr buf buffer-flush-undo] 3 "\ Get a new buffer suitable for a gopher directory or document."]) (byte-code "KM" [gopher-get-doc-buf gopher-get-dir-buf] 2) (fset 'gopher-trim-blanks #[(str) "\n\"\nÕ\nÕ#O" [string-match "\\`[ \n]*" str 0 "[ \n]*\\'"] 6 "\ Remove leading and trailing blanks from STR."]) (fset 'gopher-directory-object #[(obj oldbuf) " \nH!ȏ*" [gopher-get-tmp-buf gopher-get-dir-buf obj 1 dirbuf tmpbuf nil (byte-code " \nH\nH\nH$! !\n & \"ebd`ZVu \nHP" [gopher-retrieve-document tmpbuf obj 2 3 4 switch-to-buffer dirbuf gopher-make-local-vars gopher-dir gopher-parse-directory gopher-obj gopher-last oldbuf gopher-format-directory 7 gopher-directory-mode "Gopher: " 1 mode-line-buffer-identification] 7) ((error (byte-code " !!" [kill-buffer dirbuf error "Problems retrieving directory."] 2)))] 4 "\ Retrieve and display a gopher directory."]) (fset 'gopher-parse-directory #[(buf) "qebed\"\n\"m  ITyl ," [buf count-lines len make-vector nil dir 0 i gopher-parse-directory-line 1] 3 "\ Parse the gopher directory in buffer BUF into our internal representation. Returns a vector of gopher objects."]) (fset 'gopher-parse-directory-line #[nil "ygu     \" ! \n %-" [nil port host selector descr type 0 gopher-next-field string-match "^[0-9]+$" string-to-int vector] 6 "\ Parse the line containing point as a gopher directory entry. Returns the corresponding gopher object."]) (fset 'gopher-format-directory #[(dir buf) "q G W H T\" Tn+" [buf erase-buffer 0 dir len i gopher-format-directory-line] 4 "\ Print the directory vector DIR into buffer BUF."]) (fset 'gopher-format-directory-line #[(obj ndx) " !\nH GWGZ\"ccc\nHc A@\nH!Pcc*" [int-to-string ndx obj 0 gopher-object-type-alist typedesc ndx-str 5 make-string 32 ". " 1 " ???" char-to-string "\n"] 5 "\ Insert a line describing the gopher object OBJ into the current buffer. NDX is a numeric index to display to the left of the object description."]) (fset 'gopher-directory-mode #[nil " !! !!Ή " [use-local-map gopher-directory-mode-map gopher-directory-mode major-mode "gopher dir" mode-name run-hooks gopher-directory-mode-hook t buffer-read-only require mode-motion make-local-variable mode-motion-hook mode-motion-highlight-line] 2 "\ Gopher directory mode. \\{gopher-directory-mode-map} "]) (byte-code " ! # # # # # # # # # # # # # # # # # #!!MM" [suppress-keymap gopher-directory-mode-map define-key " " gopher-directory-choose " " "l" gopher-last-node "q" "u" "=" gopher-directory-show-object "Q" gopher-quit "f" "e" "n" next-line "p" previous-line "v" gopher-display-bookmarks "a" gopher-add-bookmark " " gopher-delete-bookmark "s" gopher-directory-save-bookmarks "" gopher-yank-bookmark button2 gopher-mouse-directory-choose button3 gopher-directory-menu boundp ("Gopher Commands" ["Select This Link" gopher-directory-choose t] ["Goto Last Node" gopher-last-node t] ["Show Object Internals" gopher-directory-show-object t] ["Quit" gopher-quit t]) #[(event) " !y !" [mouse-set-point event 0 popup-menu gopher-directory-menu] 2 nil "e"] #[(event arg) " !y !" [mouse-set-point event 0 gopher-directory-choose arg] 2 nil "e\nP"]] 4) (fset 'gopher-directory-nth-obj #[(n) "X\nGV!\nSH" [n 0 gopher-dir error "Out of range."] 2 "\ Returns the Nth object (starting at 1) in a gopher directory buffer."]) (fset 'gopher-directory-n #[(arg) "!`d=ed\"Te`T\"" [arg prefix-numeric-value count-lines] 3 "\ Return the index of the object specified by ARG (starting at 1). If ARG is nil, this is the index of the current line. Otherwise, it is the value of ARG (as a prefix argument)."]) (fset 'gopher-directory-obj #[(arg) "\n!!" [gopher-directory-nth-obj gopher-directory-n arg] 3 "\ Return the gopher object given by prefix arg ARG. If it is nil, return the object given by the line point is on. Otherwise, ARG is the index of the object."]) (fset 'gopher-directory-choose #[(arg) "\n!p\"" [gopher-dispatch-object gopher-directory-obj arg] 3 "\ Choose an item from the directory, and do whatever is appropriate based on the object's type. Default is to choose the object given by the line the cursor is on. With numeric prefix argument N, choose object N." "P"]) (fset 'gopher-directory-show-object #[(arg) " !H A@8\nː \n$!\nH\"!\nH\"!\nH\"!\nH\"!-!!!ډ" [gopher-directory-obj arg obj 0 type gopher-object-type-alist typespec "?" typetag 2 typeproc "*Gopher object*" princ format "Type : %c `%s' %s\n" "Description : %s\n" 1 "Selector : %s\n" "Host : %s\n" 3 "Port : %s\n" 4 shrink-window-if-larger-than-buffer get-buffer-window set-buffer-modified-p nil t buffer-read-only] 8 "\ Dump the internal information in a gopher object. With numeric prefix argument N, show information about the Nth object." "P"]) (fset 'gopher-last-node #[nil "p !! V!S  yd`ZVu)  ! !)" [oldbuf gopher-last switch-to-buffer kill-buffer gopher-bookmark-directory-p gopher-bookmark-modified-tick gopher-bookmark-buffer-tick gopher-directory-n nil ppos gopher-format-bookmarks 7 gopher-support-bookmarks gopher-bookmarks-modified y-or-n-p "Changes have been made to the Bookmark directory. Save? " gopher-save-bookmarks] 2 "\ Return to the previous gopher node. By convention, a gopher buffer has the local variable gopher-last which contains the buffer to which we should return." nil]) (fset 'gopher-directory-save-bookmarks #[nil " ! " [gopher-bookmark-directory-p error "This isn't the bookmark directory." gopher-save-bookmarks] 2 "\ Save the bookmark list." nil]) (fset 'gopher-quit #[nil "!\n !   @!\"= @! A f*" [y-or-n-p "Do you really want to kill all gopher buffers? " gopher-support-bookmarks gopher-bookmarks-modified "Changes have been made to the Bookmark directory. Save? " gopher-save-bookmarks buffer-list t case-fold-search buflist string-match "\\*gopher" buffer-name 0 kill-buffer nil] 5 "\ Quit gopher, and kill all gopher buffers. If there are unsaved changes to your bookmark directory, you will be asked if you want to save them" nil]) (fset 'gopher-read-bookmarks #[nil "?š ;!!!" [gopher-support-bookmarks unix t gopher-read-unix-bookmarks gopher-bookmarks gopher-read-lisp-bookmarks vectorp message "Illformed gopher-bookmarks, assuming none"] 2]) (fset 'gopher-read-unix-bookmarks #[nil " ! ! ! ! \nT\n* \")" ["~/.gopherrc" rcfile file-exists-p find-file-noselect rcbuf gopher-parse-bookmark-buffer bkmks kill-buffer nil gopher-bookmarks-modified gopher-bookmark-modified-tick message "No %s exists."] 3 "\ Read bookmarks out of ~/.gopherrc file."]) (fset 'gopher-parse-bookmark-buffer #[(buf) "qebd#ĉ  Br !\"*)" [buf re-search-forward "^bookmarks:\n" t nil bkmks bkmk gopher-parse-bookmark apply vector reverse] 4 "\ Read buffer containing bookmarks, formatted like ~.gopherrc in UNIX gopher client."]) (fset 'gopher-parse-bookmark-line #[(regexp end setf bkmk) " \n# ǔǕ{E!)" [re-search-forward regexp end t eval setf bkmk 1] 5]) (fset 'gopher-parse-bookmark #[nil "!ym?Ҋy`)\" $ $ $ $ $ H!I H!I b*" [looking-at "^#$" nil 5 make-vector bkmk end gopher-parse-bookmark-line "^Type *= *\\(.+\\) *$" gopher-set-object-type "^Name *= *\\(.*\\) *$" gopher-set-object-descr "^Path *= *\\(.*\\) *$" gopher-set-object-selector "^Host *= *\\(.+\\) *$" gopher-set-object-host "^Port *= *\\(.+\\) *$" gopher-set-object-port 0 string-to-char 4 string-to-int] 5 "\ Read next bookmark. Return a directory object."]) (fset 'gopher-format-bookmarks #[nil "  p\"ebd`ZVu)" [nil buffer-read-only erase-buffer gopher-bookmarks gopher-dir gopher-format-directory 7 gopher-bookmark-modified-tick gopher-bookmark-buffer-tick] 3 "\ Make the current buffer (which is assumed to be a bookmark buffer) contain an up-to-date listing of the bookmark list."]) (fset 'gopher-display-bookmarks #[nil "GVp! ! &\n Ұ*!" [gopher-bookmarks 0 gopher-get-dir-buf "*Gopher Bookmarks*" dirbuf oldbuf switch-to-buffer gopher-make-local-vars gopher-dir gopher-bookmark-directory-p t gopher-bookmark-buffer-tick gopher-bookmark-modified-tick gopher-obj bookmark gopher-last gopher-format-bookmarks gopher-directory-mode "Gopher: *Bookmarks*" mode-line-buffer-identification error "No bookmarks supported."] 11 "\ Retrieve and display the gopher bookmark directory." nil]) (fset 'gopher-save-bookmarks #[nil "š ;!!lj" [gopher-support-bookmarks unix t gopher-save-unix-bookmarks gopher-save-lisp-bookmarks message "Illformed gopher-support-bookmarks, assuming none" nil gopher-bookmarks-modified] 2 "\ Save bookmarks."]) (fset 'gopher-save-unix-bookmarks #[nil " !? !q ceb#`d|dbc   GW  HHHHHH!ڱ  T )I) !," ["~/.gopherrc" rcfile file-exists-p new-file-p find-file-noselect rcbuf "bookmarks:\n" re-search-forward "^bookmarks:\n" nil t 0 obj-count gopher-bookmarks obj "#" "\nType=" "\nName=" 1 "\nPath=" 2 "\nHost=" 3 "\nPort=" int-to-string 4 "\n" write-file] 14 "\ Save bookmarks out to ~/.gopherrc file."]) (fset 'gopher-add-bookmark #[(arg) " ! GT\"!! G \n  \n\nH\"I  \nI V S     HIh T," [gopher-bookmark-directory-p error "That item is already a bookmark!" gopher-bookmarks make-vector nil copy-sequence gopher-directory-obj arg l obj new-bookmarks existing-bookmarks 1 read-from-minibuffer "Node Name: " 0 t gopher-bookmarks-modified gopher-bookmark-modified-tick] 6 "\ Add current object to menu of bookmarks. With numeric prefix argument N, add Nth object." "P"]) (fset 'gopher-delete-bookmark #[(arg) " ! GS\"!S G \n    W   HI T i \nSW   THI T g  H   T!S WS ebyu-`dU! GU " [gopher-bookmark-directory-p error "Can only delete object in Bookmark directory." make-vector gopher-bookmarks nil gopher-directory-n arg 0 i l pos new-bookmarks gopher-killed-bookmark gopher-dir t gopher-bookmarks-modified gopher-bookmark-modified-tick ppos gopher-format-bookmarks 7 previous-line 1 gopher-last-node] 5 "\ Delete current bookmark. With numeric prefix argument N, delete Nth bookmark." "P"]) (fset 'gopher-yank-bookmark #[(arg) " ! ! GT\"  !S   W GV! S Y   HI S j  I  W  T  HI T h T!S XT ebyu-" [gopher-bookmark-directory-p error "Can only yank bookmark objects into bookmark directory." gopher-killed-bookmark "No killed bookmark object" gopher-bookmarks len make-vector nil new-bookmarks gopher-directory-n arg pos i 0 "Out of range." t gopher-bookmarks-modified gopher-bookmark-modified-tick ppos gopher-format-bookmarks 7] 5 "\ Yank the most recently killed bookmark at the current position. With numeric prefix argument N, yank into position N." "P"]) (defun gopher-bookmark-directory-p nil "\ Return T if currently displaying Bookmark directory." gopher-bookmark-directory-p) (fset 'gopher-read-lisp-bookmarks #[(fn) "!" [error "gopher-read-lisp-bookmark is not yet supported. Sorry."] 2 "\ currently unsupported"]) (fset 'gopher-save-lisp-bookmarks #[(fn) "!" [error "gopher-save-lisp-bookmark is not yet supported. Sorry."] 2 "\ currently unsupported"]) (fset 'gopher-document-object #[(obj oldbuf &optional end-regexp) " H!Ə)" [gopher-get-doc-buf obj 1 docbuf nil (byte-code " \nH\nH\nH% !\n $eb \nHP" [gopher-retrieve-document docbuf obj 2 3 4 end-regexp switch-to-buffer gopher-make-local-vars gopher-obj gopher-last oldbuf gopher-document-mode "Gopher: " 1 mode-line-buffer-identification] 6) ((error (byte-code " !!" [kill-buffer docbuf error "Problems retrieving document."] 2)))] 3 "\ Retrieve and display a gopher document. Optional argument END-REGEXP is used if the data will not be ended by `.'."]) (byte-code " ! # # # # # #" [suppress-keymap gopher-document-mode-map define-key "l" gopher-last-node "q" "u" " " scroll-up "" scroll-down " " gopher-scroll-one-line-up] 4) (fset 'gopher-document-mode #[nil " !!ȉ " [use-local-map gopher-document-mode-map gopher-document-mode major-mode "gopher doc" mode-name run-hooks gopher-document-mode-hook t buffer-read-only] 2 "\ Gopher document mode. \\{gopher-document-mode-map} "]) (fset 'gopher-scroll-one-line-up #[(&optional arg) " !" [scroll-up arg 1] 2 "\ Scroll the selected window up (forward in the text) one line (or N lines)." "p"]) (fset 'gopher-cso-object #[(obj oldbuf) " H$ $" [gopher-form obj 1 gopher-do-cso 4 ("====== phone directory lookup ======" "\n Press `C-c RET' to lookup, `C-c l' to return to the last gopher object." "\n (you must fill in at least one of the first three fields)" "\n" "Name : " 1 "\n" "Phone : " 2 "\n" "E-Mail : " 3 "\n" "Address : " 4) gopher-make-local-vars gopher-last oldbuf gopher-obj] 5 "\ Display a CSO lookup form."]) (defconst gopher-cso-fields '("name" "phone" "email" "address") "\ Field names to use in CSO queries.") (fset 'gopher-do-cso #[(vals) "@GA@G8G\\\\U! \n@GU\n @@\nA A _\nIp#!+" [vals 2 0 error "Must specify name, phone, or email." "query" gopher-cso-fields gopher-obj obj fields query " " "=" gopher-document-object "^[2-9]" gopher-clean-cso-buffer] 5 "\ Make a CSO query. VALS is the data the user entered in the form, as a list of strings."]) (fset 'gopher-clean-cso-buffer #[(obj) "ebcmgYgX! HPcg=!`w `{ b \nPc\n`wu `|`y `|yy#eb!," ["" nil nreq beg buffer-read-only req "\n" 51 57 delete-char 4 obj 2 45 5 "^:" "--------------------------" "-----------------------------\n" 1 -1] 4 "\ Strip CSO control information from the current buffer."]) (fset 'gopher-index-object #[(obj oldbuf) "! ! !GV H QI p\"*" [read-from-minibuffer "Key: " copy-sequence obj newobj str gopher-trim-blanks 0 2 " " gopher-directory-object] 6 "\ Query a gopher directory object."]) (fset 'gopher-telnet-object #[(obj oldbuf) "HH U =Ȫ Q\nˋ ! P&\"\"HGU? HP!*" [obj 3 4 port arg 0 system-type vax-vms "/port=" " " gopher-telnet-command ((byte-code " Q!" [gopher-background gopher-telnet-command " " arg] 4)) telnet gopher-make-local-vars gopher-obj gopher-last oldbuf gopher-telnet-process-name "-telnet" local-set-key "l" gopher-telnet-quit "k" 2 beep message "Login as: "] 8 "\ Start a telnet session to a gopher object. If gopher-telnet-command is nonnil, then that is a command to start a telnet session in a subprocess. Otherwise, the emacs-lisp telnet package is used."]) (fset 'gopher-telnet-quit #[nil " " [nil (delete-process gopher-telnet-process-name) ((error)) gopher-last-node] 3 "\ Clean up a telnet session and return to the previous gopher node." nil]) (fset 'gopher-image-object #[(obj oldbuf) "! H!!!Ώ+" [y-or-n-p "Display this item? " nil gopher-get-doc-buf obj 1 buf fname showit make-temp-name "/tmp/gopherimg" read-file-name "File to save in: " (byte-code " \nH\nH\nH% q!) !\n ̋" [gopher-retrieve-document buf obj 2 3 4 none write-file fname kill-buffer showit gopher-image-display-command ((byte-code " Q! !E DEF\")" [gopher-background gopher-image-display-command " " fname p set-process-sentinel lambda (process msg) process-sentinel process msg if (not (eq (process-status process) 'run)) delete-file] 9))] 6) ((error (byte-code "! !" [error "Problems retrieving object." kill-buffer buf] 2)))] 6 "\ Retrieve what we hope is an image and show it."]) (fset 'gopher-binary-object #[(obj oldbuf) "! H!ɏ*" [read-file-name "File to save in: " gopher-get-doc-buf obj 1 buf fname nil (byte-code " \nH\nH\nH% q!) !" [gopher-retrieve-document buf obj 2 3 4 none write-file fname kill-buffer] 6) ((error (byte-code "! !" [error "Problems retrieving object." kill-buffer buf] 2)))] 4 "\ Retrieve a gopher object and save it to a file, without trying to interpret it in any way."]) (fset 'gopher-form #[(form-name accept-action number-of-fields format-list) "!! & !!!!!!#!&!S\"!!" [switch-to-buffer generate-new-buffer "*gopher form*" gopher-make-local-vars forms-format-list format-list forms-number-of-fields number-of-fields forms-field-sep " " forms-read-only nil forms-multi-line forms--number-of-markers forms--markers forms--format forms--parser forms--dynamic-text forms-fields forms-the-record-list forms-accept-action accept-action forms--process-format-list forms--make-format forms--make-parser erase-buffer make-local-variable forms--file-buffer forms--total-records forms--current-record forms--the-record-list forms--search-rexexp gopher-form-mode major-mode "gopher form" mode-name set-buffer-modified-p use-local-map gopher-form-mode-map forms--show-record make-string 9 run-hooks gopher-form-mode-hooks] 27 "\ Display a buffer containing a form for the user to enter data. The form is described by NUMBER-OF-FIELDS and FORMAT-LIST (cf. forms-mode). FORM-NAME is a string to put in the modeline. When the user accepts the data in the form by pressing `C-c RET', the function ACCEPT-ACTION is called with a list of the strings which the user entered."]) (byte-code "M # #" [gopher-form-accept #[nil " !" [forms-accept-action forms--parse-form] 2 nil nil] define-key gopher-form-mode-map " " "l" gopher-last-node] 4) (fset 'gopher-retrieve-document #[(buf sel host port &optional end-regexp) "\nq \"A)ȉ\n \n\nΏr *\"P\";dby;!ȉe!>!ȉS!!!\"\"!%!珈; ɪ+" [end-regexp "^\\. $" buf erase-buffer assoc host gopher-hostname-aliases h nil t try-again p errinfo (byte-code "p\n $" [open-network-stream "gopher" host port p] 5) ((error (byte-code "\nA@\" \"A \n@\nA@#!" [string-match "^Unknown service .*$" errinfo assoc port gopher-port-aliases t try-again ding message format "%s: %s"] 5))) gopher-server-process wait set-process-sentinel gopher-sentinel process-send-string sel " \n" -1 looking-at process-status (open run) message "gopher: connection closed" gopher-debug-read "gopher: Reading..." gopher-buggy-accept sit-for 1 boundp epoch::version accept-process-output 2 " " (delete-process gopher-server-process) ((error)) gopher-clean-text] 5 "\ Retrieve a gopher object into BUF. The object is identified by a SEL HOST PORT triple. Optional argument END-REGEXP is used for data which is not `.'-terminated. If END-REGEXP is non-nil and not a string, then it is assumed that the data is binary, and reading will continue until the sender disconnects. Returns NIL if an error occured during the attempt to retrieve the document, otherwise T. "]) (fset 'gopher-clean-text #[nil "dbnceb#!sdby!`y`|yoeb#!s" ["\n" re-search-forward " [^\n]*$" nil t replace-match "" -1 looking-at "^\\.$" 1 search-forward "\n.." delete-char] 4 "\ Decode text transmitted by gopher. 0. Delete status line. 1. Delete `^M' at end of line. 2. Delete `.' at end of buffer (end of text mark). 3. Delete `.' at beginning of line. (does gopher want this?)"]) (byte-code "M!" [gopher-sentinel (lambda (proc status)) provide gopher] 2)