home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / lucid / lemacs-19.6 / lisp / ilisp / bridge.elc < prev    next >
Emacs Compiled Lisp  |  1993-04-01  |  7.6 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text


This file was processed as: Emacs Compiled Lisp (other/emacsCompiledLisp).
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
1% dexvert Emacs Compiled Lisp (other/emacsCompiledLisp) magic Unsupported
1% dexvert Combustion 2 Particle Library (other/combustion2ParticleLibrary) ext Unsupported
100% file Emacs/XEmacs v19 byte-compiled Lisp data default
99% file data default
100% TrID Emacs/XEmacs byte-compiled Lisp (generic) default
100% xdgMime text/x-emacs-lisp default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3b 45 4c 43 13 00 00 00 | 0a 3b 3b 3b 20 63 6f 6d |;ELC....|.;;; com|
|00000010| 70 69 6c 65 64 20 62 79 | 20 6a 77 7a 40 74 68 61 |piled by| jwz@tha|
|00000020| 6c 69 64 6f 6d 69 64 65 | 20 6f 6e 20 4d 6f 6e 20 |lidomide| on Mon |
|00000030| 46 65 62 20 20 31 20 31 | 38 3a 35 33 3a 34 34 20 |Feb 1 1|8:53:44 |
|00000040| 31 39 39 33 0a 3b 3b 3b | 20 66 72 6f 6d 20 66 69 |1993.;;;| from fi|
|00000050| 6c 65 20 2f 63 61 64 69 | 6c 6c 61 63 31 2f 63 6f |le /cadi|llac1/co|
|00000060| 64 65 2f 62 75 69 6c 64 | 2f 6c 65 6d 61 63 73 2f |de/build|/lemacs/|
|00000070| 6c 69 73 70 2f 69 6c 69 | 73 70 2f 62 72 69 64 67 |lisp/ili|sp/bridg|
|00000080| 65 2e 65 6c 0a 3b 3b 3b | 20 65 6d 61 63 73 20 76 |e.el.;;;| emacs v|
|00000090| 65 72 73 69 6f 6e 20 31 | 39 2e 34 2e 31 33 20 4c |ersion 1|9.4.13 L|
|000000a0| 75 63 69 64 2e 0a 3b 3b | 3b 20 62 79 74 65 63 6f |ucid..;;|; byteco|
|000000b0| 6d 70 20 76 65 72 73 69 | 6f 6e 20 32 2e 31 30 3b |mp versi|on 2.10;|
|000000c0| 20 20 31 2d 66 65 62 2d | 39 33 2e 0a 3b 3b 3b 20 | 1-feb-|93..;;; |
|000000d0| 6f 70 74 69 6d 69 7a 61 | 74 69 6f 6e 20 69 73 20 |optimiza|tion is |
|000000e0| 6f 6e 2e 0a 3b 3b 3b 20 | 74 68 69 73 20 66 69 6c |on..;;; |this fil|
|000000f0| 65 20 75 73 65 73 20 6f | 70 63 6f 64 65 73 20 77 |e uses o|pcodes w|
|00000100| 68 69 63 68 20 64 6f 20 | 6e 6f 74 20 65 78 69 73 |hich do |not exis|
|00000110| 74 20 69 6e 20 45 6d 61 | 63 73 31 38 2e 0a 0a 28 |t in Ema|cs18...(|
|00000120| 69 66 20 28 61 6e 64 20 | 28 62 6f 75 6e 64 70 20 |if (and |(boundp |
|00000130| 27 65 6d 61 63 73 2d 76 | 65 72 73 69 6f 6e 29 0a |'emacs-v|ersion).|
|00000140| 09 20 28 6f 72 20 28 61 | 6e 64 20 28 62 6f 75 6e |. (or (a|nd (boun|
|00000150| 64 70 20 27 65 70 6f 63 | 68 3a 3a 76 65 72 73 69 |dp 'epoc|h::versi|
|00000160| 6f 6e 29 20 65 70 6f 63 | 68 3a 3a 76 65 72 73 69 |on) epoc|h::versi|
|00000170| 6f 6e 29 0a 09 20 20 20 | 20 20 28 73 74 72 69 6e |on).. | (strin|
|00000180| 67 2d 6c 65 73 73 70 20 | 65 6d 61 63 73 2d 76 65 |g-lessp |emacs-ve|
|00000190| 72 73 69 6f 6e 20 22 31 | 39 22 29 29 29 0a 20 20 |rsion "1|9"))). |
|000001a0| 20 20 28 65 72 72 6f 72 | 20 22 54 68 69 73 20 66 | (error| "This f|
|000001b0| 69 6c 65 20 77 61 73 20 | 63 6f 6d 70 69 6c 65 64 |ile was |compiled|
|000001c0| 20 66 6f 72 20 45 6d 61 | 63 73 31 39 2e 22 29 29 | for Ema|cs19."))|
|000001d0| 0a 0a 28 64 65 66 76 61 | 72 20 62 72 69 64 67 65 |..(defva|r bridge|
|000001e0| 2d 68 6f 6f 6b 20 6e 69 | 6c 20 22 5c 0a 48 6f 6f |-hook ni|l "\.Hoo|
|000001f0| 6b 20 63 61 6c 6c 65 64 | 20 77 68 65 6e 20 61 20 |k called| when a |
|00000200| 62 72 69 64 67 65 20 69 | 73 20 69 6e 73 74 61 6c |bridge i|s instal|
|00000210| 6c 65 64 20 62 79 20 69 | 6e 73 74 61 6c 6c 2d 68 |led by i|nstall-h|
|00000220| 6f 6f 6b 2e 22 29 0a 28 | 64 65 66 76 61 72 20 62 |ook.").(|defvar b|
|00000230| 72 69 64 67 65 2d 73 74 | 61 72 74 2d 72 65 67 65 |ridge-st|art-rege|
|00000240| 78 70 20 22 1b 22 20 22 | 5c 0a 2a 52 65 67 75 6c |xp "." "|\.*Regul|
|00000250| 61 72 20 65 78 70 72 65 | 73 73 69 6f 6e 20 74 6f |ar expre|ssion to|
|00000260| 20 6d 61 74 63 68 20 74 | 68 65 20 73 74 61 72 74 | match t|he start|
|00000270| 20 6f 66 20 61 20 70 72 | 6f 63 65 73 73 20 62 72 | of a pr|ocess br|
|00000280| 69 64 67 65 20 69 6e 0a | 70 72 6f 63 65 73 73 20 |idge in.|process |
|00000290| 6f 75 74 70 75 74 2e 20 | 20 49 74 20 73 68 6f 75 |output. | It shou|
|000002a0| 6c 64 20 62 65 20 66 6f | 6c 6c 6f 77 65 64 20 62 |ld be fo|llowed b|
|000002b0| 79 20 61 20 62 75 66 66 | 65 72 20 6e 61 6d 65 2c |y a buff|er name,|
|000002c0| 20 74 68 65 20 64 61 74 | 61 20 74 6f 0a 62 65 20 | the dat|a to.be |
|000002d0| 73 65 6e 74 20 61 6e 64 | 20 61 20 62 72 69 64 67 |sent and| a bridg|
|000002e0| 65 2d 65 6e 64 2d 72 65 | 67 65 78 70 2e 22 29 0a |e-end-re|gexp.").|
|000002f0| 28 64 65 66 76 61 72 20 | 62 72 69 64 67 65 2d 65 |(defvar |bridge-e|
|00000300| 6e 64 2d 72 65 67 65 78 | 70 20 22 1d 22 20 22 5c |nd-regex|p "." "\|
|00000310| 0a 2a 52 65 67 75 6c 61 | 72 20 65 78 70 72 65 73 |.*Regula|r expres|
|00000320| 73 69 6f 6e 20 74 6f 20 | 6d 61 74 63 68 20 74 68 |sion to |match th|
|00000330| 65 20 65 6e 64 20 6f 66 | 20 61 20 70 72 6f 63 65 |e end of| a proce|
|00000340| 73 73 20 62 72 69 64 67 | 65 20 69 6e 20 70 72 6f |ss bridg|e in pro|
|00000350| 63 65 73 73 0a 6f 75 74 | 70 75 74 2e 22 29 0a 28 |cess.out|put.").(|
|00000360| 64 65 66 76 61 72 20 62 | 72 69 64 67 65 2d 70 72 |defvar b|ridge-pr|
|00000370| 6f 6d 70 74 2d 72 65 67 | 65 78 70 20 6e 69 6c 20 |ompt-reg|exp nil |
|00000380| 22 5c 0a 2a 52 65 67 75 | 6c 61 72 20 65 78 70 72 |"\.*Regu|lar expr|
|00000390| 65 73 73 69 6f 6e 20 66 | 6f 72 20 64 65 74 65 63 |ession f|or detec|
|000003a0| 74 69 6e 67 20 61 20 70 | 72 6f 6d 70 74 2e 20 20 |ting a p|rompt. |
|000003b0| 49 66 20 74 68 65 72 65 | 20 69 73 20 61 0a 63 6f |If there| is a.co|
|000003c0| 6d 69 6e 74 2d 70 72 6f | 6d 70 74 2d 72 65 67 65 |mint-pro|mpt-rege|
|000003d0| 78 70 2c 20 69 74 20 77 | 69 6c 6c 20 62 65 20 69 |xp, it w|ill be i|
|000003e0| 6e 69 74 69 61 6c 69 7a | 65 64 20 74 6f 20 74 68 |nitializ|ed to th|
|000003f0| 61 74 2e 20 20 41 20 70 | 72 6f 6d 70 74 20 62 65 |at. A p|rompt be|
|00000400| 66 6f 72 65 0a 61 20 62 | 72 69 64 67 65 2d 65 6e |fore.a b|ridge-en|
|00000410| 64 2d 72 65 67 65 78 70 | 20 77 69 6c 6c 20 73 74 |d-regexp| will st|
|00000420| 6f 70 20 74 68 65 20 70 | 72 6f 63 65 73 73 20 62 |op the p|rocess b|
|00000430| 72 69 64 67 65 2e 22 29 | 0a 28 64 65 66 76 61 72 |ridge.")|.(defvar|
|00000440| 20 62 72 69 64 67 65 2d | 68 61 6e 64 6c 65 72 73 | bridge-|handlers|
|00000450| 20 6e 69 6c 20 22 5c 0a | 41 6c 69 73 74 20 6f 66 | nil "\.|Alist of|
|00000460| 20 28 72 65 67 65 78 70 | 20 2e 20 68 61 6e 64 6c | (regexp| . handl|
|00000470| 65 72 29 20 66 6f 72 20 | 68 61 6e 64 6c 69 6e 67 |er) for |handling|
|00000480| 20 70 72 6f 63 65 73 73 | 20 6f 75 74 70 75 74 20 | process| output |
|00000490| 64 65 6c 69 6d 69 74 65 | 64 0a 62 79 20 62 72 69 |delimite|d.by bri|
|000004a0| 64 67 65 2d 73 74 61 72 | 74 2d 72 65 67 65 78 70 |dge-star|t-regexp|
|000004b0| 20 61 6e 64 20 62 72 69 | 64 67 65 2d 65 6e 64 2d | and bri|dge-end-|
|000004c0| 72 65 67 65 78 70 2e 20 | 20 54 68 65 20 66 69 72 |regexp. | The fir|
|000004d0| 73 74 20 65 6e 74 72 79 | 20 6f 6e 20 74 68 65 0a |st entry| on the.|
|000004e0| 6c 69 73 74 20 77 68 6f | 73 65 20 72 65 67 65 78 |list who|se regex|
|000004f0| 70 20 6d 61 74 63 68 65 | 73 20 74 68 65 20 6f 75 |p matche|s the ou|
|00000500| 74 70 75 74 20 77 69 6c | 6c 20 62 65 20 63 61 6c |tput wil|l be cal|
|00000510| 6c 65 64 20 6f 6e 20 74 | 68 65 20 70 72 6f 63 65 |led on t|he proce|
|00000520| 73 73 20 61 6e 64 0a 74 | 68 65 20 64 65 6c 69 6d |ss and.t|he delim|
|00000530| 69 74 65 64 20 6f 75 74 | 70 75 74 2e 22 29 0a 28 |ited out|put.").(|
|00000540| 64 65 66 76 61 72 20 62 | 72 69 64 67 65 2d 73 6f |defvar b|ridge-so|
|00000550| 75 72 63 65 2d 69 6e 73 | 65 72 74 20 74 20 22 5c |urce-ins|ert t "\|
|00000560| 0a 2a 54 20 74 6f 20 69 | 6e 73 65 72 74 20 62 72 |.*T to i|nsert br|
|00000570| 69 64 67 65 20 69 6e 70 | 75 74 20 69 6e 20 74 68 |idge inp|ut in th|
|00000580| 65 20 73 6f 75 72 63 65 | 20 62 75 66 66 65 72 20 |e source| buffer |
|00000590| 6d 69 6e 75 73 20 64 65 | 6c 69 6d 69 74 65 72 73 |minus de|limiters|
|000005a0| 2e 22 29 0a 28 64 65 66 | 76 61 72 20 62 72 69 64 |.").(def|var brid|
|000005b0| 67 65 2d 64 65 73 74 69 | 6e 61 74 69 6f 6e 2d 69 |ge-desti|nation-i|
|000005c0| 6e 73 65 72 74 20 74 20 | 22 5c 0a 2a 54 20 66 6f |nsert t |"\.*T fo|
|000005d0| 72 20 62 72 69 64 67 65 | 2d 73 65 6e 64 2d 68 61 |r bridge|-send-ha|
|000005e0| 6e 64 6c 65 72 20 74 6f | 20 69 6e 73 65 72 74 20 |ndler to| insert |
|000005f0| 62 72 69 64 67 65 20 69 | 6e 70 75 74 20 69 6e 74 |bridge i|nput int|
|00000600| 6f 20 74 68 65 0a 64 65 | 73 74 69 6e 61 74 69 6f |o the.de|stinatio|
|00000610| 6e 20 62 75 66 66 65 72 | 20 6d 69 6e 75 73 20 64 |n buffer| minus d|
|00000620| 65 6c 69 6d 69 74 65 72 | 73 2e 22 29 0a 28 64 65 |elimiter|s.").(de|
|00000630| 66 76 61 72 20 62 72 69 | 64 67 65 2d 63 68 75 6e |fvar bri|dge-chun|
|00000640| 6b 2d 73 69 7a 65 20 35 | 31 32 20 22 5c 0a 2a 4c |k-size 5|12 "\.*L|
|00000650| 6f 6e 67 20 69 6e 70 75 | 74 73 20 73 65 6e 64 20 |ong inpu|ts send |
|00000660| 74 6f 20 63 6f 6d 69 6e | 74 20 70 72 6f 63 65 73 |to comin|t proces|
|00000670| 73 65 73 20 61 72 65 20 | 62 72 6f 6b 65 6e 20 75 |ses are |broken u|
|00000680| 70 20 69 6e 74 6f 20 63 | 68 75 6e 6b 73 20 6f 66 |p into c|hunks of|
|00000690| 0a 74 68 69 73 20 73 69 | 7a 65 2e 20 20 49 66 20 |.this si|ze. If |
|000006a0| 79 6f 75 72 20 70 72 6f | 63 65 73 73 20 69 73 20 |your pro|cess is |
|000006b0| 63 68 6f 6b 69 6e 67 20 | 6f 6e 20 62 69 67 20 69 |choking |on big i|
|000006c0| 6e 70 75 74 73 2c 20 74 | 72 79 20 6c 6f 77 65 72 |nputs, t|ry lower|
|000006d0| 69 6e 67 20 74 68 65 0a | 76 61 6c 75 65 2e 22 29 |ing the.|value.")|
|000006e0| 0a 28 64 65 66 76 61 72 | 20 62 72 69 64 67 65 2d |.(defvar| bridge-|
|000006f0| 6f 6c 64 2d 66 69 6c 74 | 65 72 20 6e 69 6c 20 22 |old-filt|er nil "|
|00000700| 5c 0a 4f 6c 64 20 66 69 | 6c 74 65 72 20 66 6f 72 |\.Old fi|lter for|
|00000710| 20 61 20 62 72 69 64 67 | 65 64 20 70 72 6f 63 65 | a bridg|ed proce|
|00000720| 73 73 20 62 75 66 66 65 | 72 2e 22 29 0a 28 64 65 |ss buffe|r.").(de|
|00000730| 66 76 61 72 20 62 72 69 | 64 67 65 2d 73 74 72 69 |fvar bri|dge-stri|
|00000740| 6e 67 20 6e 69 6c 20 22 | 5c 0a 54 68 65 20 63 75 |ng nil "|\.The cu|
|00000750| 72 72 65 6e 74 20 6f 75 | 74 70 75 74 20 69 6e 20 |rrent ou|tput in |
|00000760| 74 68 65 20 70 72 6f 63 | 65 73 73 20 62 72 69 64 |the proc|ess brid|
|00000770| 67 65 2e 22 29 0a 28 64 | 65 66 76 61 72 20 62 72 |ge.").(d|efvar br|
|00000780| 69 64 67 65 2d 69 6e 2d | 70 72 6f 67 72 65 73 73 |idge-in-|progress|
|00000790| 20 6e 69 6c 20 22 5c 0a | 54 68 65 20 63 75 72 72 | nil "\.|The curr|
|000007a0| 65 6e 74 20 68 61 6e 64 | 6c 65 72 20 66 75 6e 63 |ent hand|ler func|
|000007b0| 74 69 6f 6e 2c 20 69 66 | 20 61 6e 79 2c 20 74 68 |tion, if| any, th|
|000007c0| 61 74 20 62 72 69 64 67 | 65 20 70 61 73 73 65 73 |at bridg|e passes|
|000007d0| 20 73 74 72 69 6e 67 73 | 20 6f 6e 20 74 6f 2c 0a | strings| on to,.|
|000007e0| 6f 72 20 6e 69 6c 20 69 | 66 20 6e 6f 6e 65 2e 22 |or nil i|f none."|
|000007f0| 29 0a 28 64 65 66 76 61 | 72 20 62 72 69 64 67 65 |).(defva|r bridge|
|00000800| 2d 73 65 6e 64 2d 74 6f | 2d 62 75 66 66 65 72 20 |-send-to|-buffer |
|00000810| 6e 69 6c 20 22 5c 0a 54 | 68 65 20 62 75 66 66 65 |nil "\.T|he buffe|
|00000820| 72 20 74 68 61 74 20 74 | 68 65 20 64 65 66 61 75 |r that t|he defau|
|00000830| 6c 74 20 62 72 69 64 67 | 65 2d 68 61 6e 64 6c 65 |lt bridg|e-handle|
|00000840| 72 20 28 62 72 69 64 67 | 65 2d 73 65 6e 64 2d 68 |r (bridg|e-send-h|
|00000850| 61 6e 64 6c 65 72 29 20 | 69 73 0a 63 75 72 72 65 |andler) |is.curre|
|00000860| 6e 74 6c 79 20 73 65 6e | 64 69 6e 67 20 74 6f 2c |ntly sen|ding to,|
|00000870| 20 6f 72 20 6e 69 6c 20 | 69 66 20 69 74 20 68 61 | or nil |if it ha|
|00000880| 73 6e 27 74 20 73 74 61 | 72 74 65 64 20 79 65 74 |sn't sta|rted yet|
|00000890| 2e 20 20 59 6f 75 72 20 | 68 61 6e 64 6c 65 72 0a |. Your |handler.|
|000008a0| 66 75 6e 63 74 69 6f 6e | 20 63 61 6e 20 75 73 65 |function| can use|
|000008b0| 20 74 68 69 73 20 76 61 | 72 69 61 62 6c 65 20 61 | this va|riable a|
|000008c0| 6c 73 6f 2e 22 29 0a 28 | 64 65 66 76 61 72 20 62 |lso.").(|defvar b|
|000008d0| 72 69 64 67 65 2d 6c 61 | 73 74 2d 66 61 69 6c 75 |ridge-la|st-failu|
|000008e0| 72 65 20 6e 69 6c 20 22 | 5c 0a 4c 61 73 74 20 74 |re nil "|\.Last t|
|000008f0| 68 69 6e 67 20 74 68 61 | 74 20 62 72 6f 6b 65 20 |hing tha|t broke |
|00000900| 74 68 65 20 62 72 69 64 | 67 65 20 68 61 6e 64 6c |the brid|ge handl|
|00000910| 65 72 2e 20 20 46 69 72 | 73 74 20 69 74 65 6d 20 |er. Fir|st item |
|00000920| 69 73 20 66 75 6e 63 74 | 69 6f 6e 20 63 61 6c 6c |is funct|ion call|
|00000930| 0a 28 65 76 61 6c 27 61 | 62 6c 65 29 3b 20 6c 61 |.(eval'a|ble); la|
|00000940| 73 74 20 69 74 65 6d 20 | 69 73 20 65 72 72 6f 72 |st item |is error|
|00000950| 20 63 6f 6e 64 69 74 69 | 6f 6e 20 77 68 69 63 68 | conditi|on which|
|00000960| 20 72 65 73 75 6c 74 65 | 64 2e 20 20 54 68 69 73 | resulte|d. This|
|00000970| 20 69 73 20 70 72 6f 76 | 69 64 65 64 0a 74 6f 20 | is prov|ided.to |
|00000980| 68 65 6c 70 20 68 61 6e | 64 6c 65 72 2d 77 72 69 |help han|dler-wri|
|00000990| 74 65 72 73 20 69 6e 20 | 74 68 65 69 72 20 64 65 |ters in |their de|
|000009a0| 62 75 67 67 69 6e 67 2e | 22 29 0a 28 66 73 65 74 |bugging.|").(fset|
|000009b0| 20 27 62 72 69 64 67 65 | 2d 69 6e 73 65 72 74 20 | 'bridge|-insert |
|000009c0| 23 5b 28 6f 75 74 70 75 | 74 29 20 22 08 ad d9 70 |#[(outpu|t) "...p|
|000009d0| 19 c2 09 21 1b c4 0b 21 | 1d c6 20 1e 07 c8 1e 09 |...!...!|.. .....|
|000009e0| ca 0e 07 21 09 3d ab 87 | 60 0d 55 16 09 aa 85 cb |...!.=..|`.U.....|
|000009f0| 09 21 16 07 8a 0d 62 88 | 08 63 88 0d 60 c8 93 88 |.!....b.|.c..`...|
|00000a00| 29 0e 07 ad a2 0e 09 ab | 83 0d 62 88 cc 60 0e 07 |).......|..b..`..|
|00000a10| 5c 22 3f ad 93 c6 20 1e | 0d 8a ce 0e 07 21 88 cf |\"?... .|.....!..|
|00000a20| d0 21 88 ce 0e 0d 21 2a | 2d 87 22 20 5b 6f 75 74 |.!....!*|-." [out|
|00000a30| 70 75 74 20 62 75 66 66 | 65 72 20 67 65 74 2d 62 |put buff|er get-b|
|00000a40| 75 66 66 65 72 2d 70 72 | 6f 63 65 73 73 20 70 72 |uffer-pr|ocess pr|
|00000a50| 6f 63 65 73 73 20 70 72 | 6f 63 65 73 73 2d 6d 61 |ocess pr|ocess-ma|
|00000a60| 72 6b 20 6d 61 72 6b 20 | 73 65 6c 65 63 74 65 64 |rk mark |selected|
|00000a70| 2d 77 69 6e 64 6f 77 20 | 77 69 6e 64 6f 77 20 6e |-window |window n|
|00000a80| 69 6c 20 61 74 2d 65 6e | 64 20 77 69 6e 64 6f 77 |il at-en|d window|
|00000a90| 2d 62 75 66 66 65 72 20 | 67 65 74 2d 62 75 66 66 |-buffer |get-buff|
|00000aa0| 65 72 2d 77 69 6e 64 6f | 77 20 70 6f 73 2d 76 69 |er-windo|w pos-vi|
|00000ab0| 73 69 62 6c 65 2d 69 6e | 2d 77 69 6e 64 6f 77 2d |sible-in|-window-|
|00000ac0| 70 20 6f 72 69 67 69 6e | 61 6c 20 73 65 6c 65 63 |p origin|al selec|
|00000ad0| 74 2d 77 69 6e 64 6f 77 | 20 72 65 63 65 6e 74 65 |t-window| recente|
|00000ae0| 72 20 28 63 65 6e 74 65 | 72 29 5d 20 33 20 22 5c |r (cente|r)] 3 "\|
|00000af0| 0a 49 6e 73 65 72 74 20 | 70 72 6f 63 65 73 73 20 |.Insert |process |
|00000b00| 4f 55 54 50 55 54 20 69 | 6e 74 6f 20 74 68 65 20 |OUTPUT i|nto the |
|00000b10| 63 75 72 72 65 6e 74 20 | 62 75 66 66 65 72 2e 22 |current |buffer."|
|00000b20| 5d 29 0a 28 66 73 65 74 | 20 27 62 72 69 64 67 65 |]).(fset| 'bridge|
|00000b30| 2d 73 65 6e 64 2d 73 74 | 72 69 6e 67 20 23 5b 28 |-send-st|ring #[(|
|00000b40| 70 72 6f 63 65 73 73 20 | 73 74 72 69 6e 67 29 20 |process |string) |
|00000b50| 22 08 47 89 19 5c 6e 5e | 1b c4 0d 08 c6 0b 4f 5c |".G..\n^|......O\|
|00000b60| 22 88 0b 09 57 ad 99 0b | 5c 6e 5c 5c 1e 07 c8 20 |"...W...|\n\\... |
|00000b70| 88 c4 0d 08 0b 09 0e 07 | 5e 4f 5c 22 88 0e 07 13 |........|^O\"....|
|00000b80| 29 aa 62 2a 87 22 20 5b | 73 74 72 69 6e 67 20 6c |).b*." [|string l|
|00000b90| 65 6e 20 62 72 69 64 67 | 65 2d 63 68 75 6e 6b 2d |en bridg|e-chunk-|
|00000ba0| 73 69 7a 65 20 69 20 70 | 72 6f 63 65 73 73 2d 73 |size i p|rocess-s|
|00000bb0| 65 6e 64 2d 73 74 72 69 | 6e 67 20 70 72 6f 63 65 |end-stri|ng proce|
|00000bc0| 73 73 20 30 20 6e 65 78 | 74 2d 69 20 61 63 63 65 |ss 0 nex|t-i acce|
|00000bd0| 70 74 2d 70 72 6f 63 65 | 73 73 2d 6f 75 74 70 75 |pt-proce|ss-outpu|
|00000be0| 74 5d 20 37 20 22 5c 0a | 53 65 6e 64 20 50 52 4f |t] 7 "\.|Send PRO|
|00000bf0| 43 45 53 53 20 74 68 65 | 20 63 6f 6e 74 65 6e 74 |CESS the| content|
|00000c00| 73 20 6f 66 20 53 54 52 | 49 4e 47 20 61 73 20 69 |s of STR|ING as i|
|00000c10| 6e 70 75 74 2e 0a 54 68 | 69 73 20 69 73 20 65 71 |nput..Th|is is eq|
|00000c20| 75 69 76 61 6c 65 6e 74 | 20 74 6f 20 70 72 6f 63 |uivalent| to proc|
|00000c30| 65 73 73 2d 73 65 6e 64 | 2d 73 74 72 69 6e 67 2c |ess-send|-string,|
|00000c40| 20 65 78 63 65 70 74 20 | 74 68 61 74 20 6c 6f 6e | except |that lon|
|00000c50| 67 20 69 6e 70 75 74 20 | 73 74 72 69 6e 67 73 0a |g input |strings.|
|00000c60| 61 72 65 20 62 72 6f 6b | 65 6e 20 75 70 20 69 6e |are brok|en up in|
|00000c70| 74 6f 20 63 68 75 6e 6b | 73 20 6f 66 20 73 69 7a |to chunk|s of siz|
|00000c80| 65 20 63 6f 6d 69 6e 74 | 2d 69 6e 70 75 74 2d 63 |e comint|-input-c|
|00000c90| 68 75 6e 6b 2d 73 69 7a | 65 2e 20 50 72 6f 63 65 |hunk-siz|e. Proce|
|00000ca0| 73 73 65 73 0a 61 72 65 | 20 67 69 76 65 6e 20 61 |sses.are| given a|
|00000cb0| 20 63 68 61 6e 63 65 20 | 74 6f 20 6f 75 74 70 75 | chance |to outpu|
|00000cc0| 74 20 62 65 74 77 65 65 | 6e 20 63 68 75 6e 6b 73 |t betwee|n chunks|
|00000cd0| 2e 20 54 68 69 73 20 63 | 61 6e 20 68 65 6c 70 20 |. This c|an help |
|00000ce0| 70 72 65 76 65 6e 74 20 | 70 72 6f 63 65 73 73 65 |prevent |processe|
|00000cf0| 73 0a 66 72 6f 6d 20 68 | 61 6e 67 69 6e 67 20 77 |s.from h|anging w|
|00000d00| 68 65 6e 20 79 6f 75 20 | 73 65 6e 64 20 74 68 65 |hen you |send the|
|00000d10| 6d 20 6c 6f 6e 67 20 69 | 6e 70 75 74 73 20 6f 6e |m long i|nputs on|
|00000d20| 20 73 6f 6d 65 20 4f 53 | 27 73 2e 22 5d 29 0a 28 | some OS|'s."]).(|
|00000d30| 66 73 65 74 20 27 62 72 | 69 64 67 65 2d 63 61 6c |fset 'br|idge-cal|
|00000d40| 6c 2d 68 61 6e 64 6c 65 | 72 20 23 5b 28 68 61 6e |l-handle|r #[(han|
|00000d50| 64 6c 65 72 20 70 72 6f | 63 20 73 74 72 69 6e 67 |dler pro|c string|
|00000d60| 29 20 22 c0 89 19 1a c3 | c4 c5 8f 88 09 2a 3f 87 |) ".....|.....*?.|
|00000d70| 22 20 5b 6e 69 6c 20 66 | 61 69 6c 65 64 20 69 6e |" [nil f|ailed in|
|00000d80| 68 69 62 69 74 2d 71 75 | 69 74 20 65 72 72 20 28 |hibit-qu|it err (|
|00000d90| 66 75 6e 63 61 6c 6c 20 | 68 61 6e 64 6c 65 72 20 |funcall |handler |
|00000da0| 70 72 6f 63 20 73 74 72 | 69 6e 67 29 20 28 28 65 |proc str|ing) ((e|
|00000db0| 72 72 6f 72 20 28 62 79 | 74 65 2d 63 6f 64 65 20 |rror (by|te-code |
|00000dc0| 22 c0 20 88 c1 12 c3 c4 | 0d 0e 06 23 88 c7 c8 0e |". .....|...#....|
|00000dd0| 09 44 c8 0e 5c 6e 44 0e | 0b 46 cc 0e 06 45 16 0d |.D..\nD.|.F...E..|
|00000de0| c0 87 22 20 5b 64 69 6e | 67 20 74 20 66 61 69 6c |.." [din|g t fail|
|00000df0| 65 64 20 6d 65 73 73 61 | 67 65 20 22 62 72 69 64 |ed messa|ge "brid|
|00000e00| 67 65 2d 68 61 6e 64 6c | 65 72 20 5c 22 25 73 5c |ge-handl|er \"%s\|
|00000e10| 22 20 66 61 69 6c 65 64 | 20 25 73 20 28 73 65 65 |" failed| %s (see|
|00000e20| 20 62 72 69 64 67 65 2d | 6c 61 73 74 2d 66 61 69 | bridge-|last-fai|
|00000e30| 6c 75 72 65 29 22 20 66 | 75 6e 63 74 69 6f 6e 20 |lure)" f|unction |
|00000e40| 65 72 72 20 66 75 6e 63 | 61 6c 6c 20 71 75 6f 74 |err func|all quot|
|00000e50| 65 20 68 61 6e 64 6c 65 | 72 20 70 72 6f 63 20 73 |e handle|r proc s|
|00000e60| 74 72 69 6e 67 20 22 43 | 61 75 73 65 64 3a 20 22 |tring "C|aused: "|
|00000e70| 20 62 72 69 64 67 65 2d | 6c 61 73 74 2d 66 61 69 | bridge-|last-fai|
|00000e80| 6c 75 72 65 5d 20 34 29 | 29 29 5d 20 33 20 22 5c |lure] 4)|))] 3 "\|
|00000e90| 0a 46 75 6e 63 61 6c 6c | 20 48 41 4e 44 4c 45 52 |.Funcall| HANDLER|
|00000ea0| 20 6f 6e 20 50 52 4f 43 | 2c 20 53 54 52 49 4e 47 | on PROC|, STRING|
|00000eb0| 20 63 61 72 65 66 75 6c | 6c 79 2e 20 20 45 72 72 | careful|ly. Err|
|00000ec0| 6f 72 20 69 73 20 63 61 | 75 67 68 74 20 69 66 20 |or is ca|ught if |
|00000ed0| 68 61 70 70 65 6e 73 2c | 0a 61 6e 64 20 75 73 65 |happens,|.and use|
|00000ee0| 72 20 69 73 20 73 69 67 | 6e 61 6c 65 64 2e 20 20 |r is sig|naled. |
|00000ef0| 53 74 61 74 65 20 69 73 | 20 70 75 74 20 69 6e 20 |State is| put in |
|00000f00| 62 72 69 64 67 65 2d 6c | 61 73 74 2d 66 61 69 6c |bridge-l|ast-fail|
|00000f10| 75 72 65 2e 20 20 52 65 | 74 75 72 6e 73 20 74 20 |ure. Re|turns t |
|00000f20| 69 66 0a 68 61 6e 64 6c | 65 72 20 65 78 65 63 75 |if.handl|er execu|
|00000f30| 74 65 64 20 77 69 74 68 | 6f 75 74 20 65 72 72 6f |ted with|out erro|
|00000f40| 72 2e 22 5d 29 0a 28 66 | 73 65 74 20 27 62 72 69 |r."]).(f|set 'bri|
|00000f50| 64 67 65 2d 73 65 6e 64 | 2d 68 61 6e 64 6c 65 72 |dge-send|-handler|
|00000f60| 20 23 5b 28 70 72 6f 63 | 65 73 73 20 69 6e 70 75 | #[(proc|ess inpu|
|00000f70| 74 29 20 22 08 ac 84 c1 | 89 12 87 c1 89 89 89 1b |t) "....|........|
|00000f80| 1c 1d 1e 06 5c 6e ac a0 | c7 08 21 16 06 c8 c9 c7 |....\n..|..!.....|
|00000f90| 08 21 40 5c 22 15 ca 0d | 21 14 cb 0c 21 13 08 0e |.!@\"...|!...!...|
|00000fa0| 06 41 c1 4f 10 0c 12 aa | 8a 5c 6e 15 ca 0d 21 14 |.A.O....|.\n...!.|
|00000fb0| cb 0c 21 13 0c ab a6 70 | 1e 0c 0e 0d ab 95 ce 8e |..!....p|........|
|00000fc0| 0c 71 88 0b ab 86 cf 08 | 21 88 aa 86 64 62 88 08 |.q......|!...db..|
|00000fd0| 63 88 29 0b ad 84 d0 0b | 08 5c 22 29 aa 84 d1 d2 |c.).....|.\")....|
|00000fe0| 0d 5c 22 2c 87 22 20 5b | 69 6e 70 75 74 20 6e 69 |.\",." [|input ni|
|00000ff0| 6c 20 62 72 69 64 67 65 | 2d 73 65 6e 64 2d 74 6f |l bridge|-send-to|
|00001000| 2d 62 75 66 66 65 72 20 | 74 6f 20 64 65 73 74 20 |-buffer |to dest |
|00001010| 62 75 66 66 65 72 2d 6e | 61 6d 65 20 62 75 66 66 |buffer-n|ame buff|
|00001020| 65 72 2d 61 6e 64 2d 73 | 74 61 72 74 20 72 65 61 |er-and-s|tart rea|
|00001030| 64 2d 66 72 6f 6d 2d 73 | 74 72 69 6e 67 20 66 6f |d-from-s|tring fo|
|00001040| 72 6d 61 74 20 22 25 73 | 22 20 67 65 74 2d 62 75 |rmat "%s|" get-bu|
|00001050| 66 66 65 72 20 67 65 74 | 2d 62 75 66 66 65 72 2d |ffer get|-buffer-|
|00001060| 70 72 6f 63 65 73 73 20 | 62 75 66 66 65 72 20 62 |process |buffer b|
|00001070| 72 69 64 67 65 2d 64 65 | 73 74 69 6e 61 74 69 6f |ridge-de|stinatio|
|00001080| 6e 2d 69 6e 73 65 72 74 | 20 28 28 73 65 74 2d 62 |n-insert| ((set-b|
|00001090| 75 66 66 65 72 20 62 75 | 66 66 65 72 29 29 20 62 |uffer bu|ffer)) b|
|000010a0| 72 69 64 67 65 2d 69 6e | 73 65 72 74 20 62 72 69 |ridge-in|sert bri|
|000010b0| 64 67 65 2d 73 65 6e 64 | 2d 73 74 72 69 6e 67 20 |dge-send|-string |
|000010c0| 65 72 72 6f 72 20 22 25 | 73 20 69 73 20 6e 6f 74 |error "%|s is not|
|000010d0| 20 61 20 62 75 66 66 65 | 72 22 5d 20 34 20 22 5c | a buffe|r"] 4 "\|
|000010e0| 0a 53 65 6e 64 20 50 52 | 4f 43 45 53 53 20 49 4e |.Send PR|OCESS IN|
|000010f0| 50 55 54 20 74 6f 20 74 | 68 65 20 62 75 66 66 65 |PUT to t|he buffe|
|00001100| 72 20 6e 61 6d 65 20 66 | 6f 75 6e 64 20 61 74 20 |r name f|ound at |
|00001110| 74 68 65 20 73 74 61 72 | 74 20 6f 66 20 74 68 65 |the star|t of the|
|00001120| 0a 69 6e 70 75 74 2e 20 | 20 54 68 65 20 69 6e 70 |.input. | The inp|
|00001130| 75 74 20 61 66 74 65 72 | 20 74 68 65 20 62 75 66 |ut after| the buf|
|00001140| 66 65 72 20 6e 61 6d 65 | 20 69 73 20 73 65 6e 74 |fer name| is sent|
|00001150| 20 74 6f 20 74 68 65 20 | 62 75 66 66 65 72 27 73 | to the |buffer's|
|00001160| 0a 70 72 6f 63 65 73 73 | 20 69 66 20 69 74 20 68 |.process| if it h|
|00001170| 61 73 20 6f 6e 65 2e 20 | 20 49 66 20 62 72 69 64 |as one. | If brid|
|00001180| 67 65 2d 64 65 73 74 69 | 6e 61 74 69 6f 6e 2d 69 |ge-desti|nation-i|
|00001190| 6e 73 65 72 74 20 69 73 | 20 54 2c 20 74 68 65 20 |nsert is| T, the |
|000011a0| 69 6e 70 75 74 0a 77 69 | 6c 6c 20 62 65 20 69 6e |input.wi|ll be in|
|000011b0| 73 65 72 74 65 64 20 69 | 6e 74 6f 20 74 68 65 20 |serted i|nto the |
|000011c0| 62 75 66 66 65 72 2e 20 | 20 49 66 20 69 74 20 64 |buffer. | If it d|
|000011d0| 6f 65 73 20 6e 6f 74 20 | 68 61 76 65 20 61 20 70 |oes not |have a p|
|000011e0| 72 6f 63 65 73 73 2c 20 | 69 74 0a 77 69 6c 6c 20 |rocess, |it.will |
|000011f0| 62 65 20 69 6e 73 65 72 | 74 65 64 20 61 74 20 74 |be inser|ted at t|
|00001200| 68 65 20 65 6e 64 20 6f | 66 20 74 68 65 20 62 75 |he end o|f the bu|
|00001210| 66 66 65 72 2e 22 5d 29 | 0a 28 66 73 65 74 20 27 |ffer."])|.(fset '|
|00001220| 62 72 69 64 67 65 2d 66 | 69 6c 74 65 72 20 23 5b |bridge-f|ilter #[|
|00001230| 28 70 72 6f 63 65 73 73 | 20 6f 75 74 70 75 74 29 |(process| output)|
|00001240| 20 22 c0 c1 20 70 c2 0b | 21 c0 c4 89 c5 89 89 89 | ".. p..|!.......|
|00001250| 1e 06 1e 07 1e 08 1e 09 | 1e 5c 6e 1e 0b 1e 0c 1a |........|.\n.....|
|00001260| 1e 0d 19 1e 0e 5c 6e 71 | 88 0e 0f 16 09 c5 8e 0e |.....\nq|........|
|00001270| 5c 6e 0e 10 47 57 83 7f | 01 0e 0f ab 88 0e 0b 16 |\n..GW..|........|
|00001280| 07 0e 0b aa 93 d1 0e 12 | 0e 10 0e 0b 23 ab 88 c4 |........|....#...|
|00001290| 95 16 07 c4 94 aa 81 c5 | 89 16 08 ad 94 d1 0e 13 |........|........|
|000012a0| 0e 10 0e 07 23 89 1e 14 | ab 84 c4 95 16 5c 6e 0e |....#...|.....\n.|
|000012b0| 14 29 89 16 06 ac 8a 0e | 10 47 16 5c 6e 0e 10 47 |.)......|.G.\n..G|
|000012c0| 16 06 0e 08 ab a3 d1 0e | 15 0e 10 0e 07 23 89 1e |........|.....#..|
|000012d0| 16 ab 95 c4 95 0e 06 58 | ab 8e c5 16 08 0e 0b 16 |.......X|........|
|000012e0| 06 c4 95 16 5c 6e c5 16 | 0f 29 0e 0b 0e 08 ae 82 |....\n..|.)......|
|000012f0| 0e 5c 6e 55 ac bf 0e 10 | 0e 0b 0e 08 ae 82 0e 5c |.\nU....|.......\|
|00001300| 6e 4f 1e 17 0e 18 ab a5 | 0e 18 1e 19 da 09 21 88 |nO......|......!.|
|00001310| 0e 19 0b 0e 17 5c 22 88 | db 0b 21 89 1e 1c dd 3d |.....\".|..!....=|
|00001320| ac 89 0e 1c 16 18 de 0b | dd 5c 22 88 2a aa 88 5c |........|.\".*..\|
|00001330| 6e 71 88 df 0e 17 21 88 | 29 0e 08 ab c5 0e 0f ac |nq....!.|).......|
|00001340| c1 0e 20 1e 21 0e 21 ab | ad 0e 09 ac a9 0e 21 40 |.. .!.!.|......!@|
|00001350| 1e 5c 22 d1 0e 5c 22 40 | 0e 10 0e 07 23 89 1e 23 |.\"..\"@|....#..#|
|00001360| ab 8e 0e 23 0e 06 57 ab | 87 0e 5c 22 41 16 09 aa |...#..W.|..\"A...|
|00001370| 85 0e 21 41 16 21 2a aa | 4f 0e 09 ac 83 e4 16 09 |..!A.!*.|O.......|
|00001380| 0e 09 16 0f 29 0e 09 ab | bf c0 1e 25 0e 07 0e 06 |....)...|...%....|
|00001390| 55 ac 9c 0e 10 0e 07 0e | 06 4f 1e 26 0e 27 ab 85 |U.......|.O.&.'..|
|000013a0| df 0e 26 21 88 e8 0e 09 | 0b 0e 26 23 16 25 29 0e |..&!....|..&#.%).|
|000013b0| 25 ab 87 0e 06 0e 5c 6e | 55 ac 8d e8 0e 09 0b c5 |%.....\n|U.......|
|000013c0| 23 88 c5 16 09 c5 16 0f | 29 0e 5c 6e 16 0b 82 2b |#.......|).\n...+|
|000013d0| 00 29 0e 0d 71 88 da 09 | 21 2e 0b 87 22 20 5b 74 |.)..q...|!..." [t|
|000013e0| 20 6d 61 74 63 68 2d 64 | 61 74 61 20 70 72 6f 63 | match-d|ata proc|
|000013f0| 65 73 73 2d 62 75 66 66 | 65 72 20 70 72 6f 63 65 |ess-buff|er proce|
|00001400| 73 73 20 30 20 6e 69 6c | 20 62 2d 65 6e 64 20 62 |ss 0 nil| b-end b|
|00001410| 2d 73 74 61 72 74 2d 65 | 6e 64 20 62 2d 73 74 61 |-start-e|nd b-sta|
|00001420| 72 74 20 66 75 6e 63 74 | 69 6f 6e 20 65 6e 64 20 |rt funct|ion end |
|00001430| 73 74 61 72 74 20 63 61 | 73 65 2d 66 6f 6c 64 2d |start ca|se-fold-|
|00001440| 73 65 61 72 63 68 20 62 | 75 66 66 65 72 20 69 6e |search b|uffer in|
|00001450| 68 69 62 69 74 2d 71 75 | 69 74 20 62 72 69 64 67 |hibit-qu|it bridg|
|00001460| 65 2d 69 6e 2d 70 72 6f | 67 72 65 73 73 20 6f 75 |e-in-pro|gress ou|
|00001470| 74 70 75 74 20 73 74 72 | 69 6e 67 2d 6d 61 74 63 |tput str|ing-matc|
|00001480| 68 20 62 72 69 64 67 65 | 2d 73 74 61 72 74 2d 72 |h bridge|-start-r|
|00001490| 65 67 65 78 70 20 62 72 | 69 64 67 65 2d 65 6e 64 |egexp br|idge-end|
|000014a0| 2d 72 65 67 65 78 70 20 | 65 6e 64 2d 73 65 65 6e |-regexp |end-seen|
|000014b0| 20 62 72 69 64 67 65 2d | 70 72 6f 6d 70 74 2d 72 | bridge-|prompt-r|
|000014c0| 65 67 65 78 70 20 70 72 | 6f 6d 70 74 20 70 61 73 |egexp pr|ompt pas|
|000014d0| 73 2d 6f 6e 20 62 72 69 | 64 67 65 2d 6f 6c 64 2d |s-on bri|dge-old-|
|000014e0| 66 69 6c 74 65 72 20 6f | 6c 64 20 73 74 6f 72 65 |filter o|ld store|
|000014f0| 2d 6d 61 74 63 68 2d 64 | 61 74 61 20 70 72 6f 63 |-match-d|ata proc|
|00001500| 65 73 73 2d 66 69 6c 74 | 65 72 20 6e 65 77 20 62 |ess-filt|er new b|
|00001510| 72 69 64 67 65 2d 66 69 | 6c 74 65 72 20 73 65 74 |ridge-fi|lter set|
|00001520| 2d 70 72 6f 63 65 73 73 | 2d 66 69 6c 74 65 72 20 |-process|-filter |
|00001530| 62 72 69 64 67 65 2d 69 | 6e 73 65 72 74 20 62 72 |bridge-i|nsert br|
|00001540| 69 64 67 65 2d 68 61 6e | 64 6c 65 72 73 20 68 61 |idge-han|dlers ha|
|00001550| 6e 64 6c 65 72 73 20 68 | 61 6e 64 6c 65 72 20 6d |ndlers h|andler m|
|00001560| 20 62 72 69 64 67 65 2d | 73 65 6e 64 2d 68 61 6e | bridge-|send-han|
|00001570| 64 6c 65 72 20 6f 6b 20 | 73 65 6e 64 20 62 72 69 |dler ok |send bri|
|00001580| 64 67 65 2d 73 6f 75 72 | 63 65 2d 69 6e 73 65 72 |dge-sour|ce-inser|
|00001590| 74 20 62 72 69 64 67 65 | 2d 63 61 6c 6c 2d 68 61 |t bridge|-call-ha|
|000015a0| 6e 64 6c 65 72 5d 20 31 | 32 20 22 5c 0a 47 69 76 |ndler] 1|2 "\.Giv|
|000015b0| 65 6e 20 50 52 4f 43 45 | 53 53 20 61 6e 64 20 73 |en PROCE|SS and s|
|000015c0| 6f 6d 65 20 4f 55 54 50 | 55 54 2c 20 63 68 65 63 |ome OUTP|UT, chec|
|000015d0| 6b 20 66 6f 72 20 74 68 | 65 20 70 72 65 73 65 6e |k for th|e presen|
|000015e0| 63 65 20 6f 66 0a 62 72 | 69 64 67 65 2d 73 74 61 |ce of.br|idge-sta|
|000015f0| 72 74 2d 72 65 67 65 78 | 70 2e 20 20 45 76 65 72 |rt-regex|p. Ever|
|00001600| 79 74 68 69 6e 67 20 70 | 72 69 6f 72 20 74 6f 20 |ything p|rior to |
|00001610| 74 68 69 73 20 77 69 6c | 6c 20 62 65 20 70 61 73 |this wil|l be pas|
|00001620| 73 65 64 20 74 6f 20 74 | 68 65 0a 6e 6f 72 6d 61 |sed to t|he.norma|
|00001630| 6c 20 66 69 6c 74 65 72 | 20 66 75 6e 63 74 69 6f |l filter| functio|
|00001640| 6e 20 6f 72 20 69 6e 73 | 65 72 74 65 64 20 69 6e |n or ins|erted in|
|00001650| 20 74 68 65 20 62 75 66 | 66 65 72 20 69 66 20 69 | the buf|fer if i|
|00001660| 74 20 69 73 20 6e 69 6c | 2e 20 20 54 68 65 0a 6f |t is nil|. The.o|
|00001670| 75 74 70 75 74 20 75 70 | 20 74 6f 20 62 72 69 64 |utput up| to brid|
|00001680| 67 65 2d 65 6e 64 2d 72 | 65 67 65 78 70 20 77 69 |ge-end-r|egexp wi|
|00001690| 6c 6c 20 62 65 20 73 65 | 6e 74 20 74 6f 20 74 68 |ll be se|nt to th|
|000016a0| 65 20 66 69 72 73 74 20 | 68 61 6e 64 6c 65 72 20 |e first |handler |
|000016b0| 6f 6e 0a 62 72 69 64 67 | 65 2d 68 61 6e 64 6c 65 |on.bridg|e-handle|
|000016c0| 72 73 20 74 68 61 74 20 | 6d 61 74 63 68 65 73 20 |rs that |matches |
|000016d0| 74 68 65 20 73 74 72 69 | 6e 67 2e 20 20 49 66 20 |the stri|ng. If |
|000016e0| 6e 6f 20 68 61 6e 64 6c | 65 72 73 20 6d 61 74 63 |no handl|ers matc|
|000016f0| 68 2c 20 74 68 65 0a 69 | 6e 70 75 74 20 77 69 6c |h, the.i|nput wil|
|00001700| 6c 20 62 65 20 73 65 6e | 74 20 74 6f 20 62 72 69 |l be sen|t to bri|
|00001710| 64 67 65 2d 73 65 6e 64 | 2d 68 61 6e 64 6c 65 72 |dge-send|-handler|
|00001720| 2e 20 20 49 66 20 62 72 | 69 64 67 65 2d 70 72 6f |. If br|idge-pro|
|00001730| 6d 70 74 2d 72 65 67 65 | 78 70 20 69 73 0a 65 6e |mpt-rege|xp is.en|
|00001740| 63 6f 75 6e 74 65 72 65 | 64 20 62 65 66 6f 72 65 |countere|d before|
|00001750| 20 74 68 65 20 62 72 69 | 64 67 65 2d 65 6e 64 2d | the bri|dge-end-|
|00001760| 72 65 67 65 78 70 2c 20 | 74 68 65 20 62 72 69 64 |regexp, |the brid|
|00001770| 67 65 20 77 69 6c 6c 20 | 62 65 20 63 61 6e 63 65 |ge will |be cance|
|00001780| 6c 6c 65 64 2e 22 5d 29 | 0a 28 66 73 65 74 20 27 |lled."])|.(fset '|
|00001790| 69 6e 73 74 61 6c 6c 2d | 62 72 69 64 67 65 20 23 |install-|bridge #|
|000017a0| 5b 6e 69 6c 20 22 c0 70 | 21 ac 87 c1 c2 c3 70 21 |[nil ".p|!.....p!|
|000017b0| 5c 22 87 c4 c5 21 88 c4 | c6 21 88 c4 c7 21 88 c4 |\"...!..|.!...!..|
|000017c0| c8 21 88 c4 c9 21 88 c4 | ca 21 88 c4 cb 21 88 c4 |.!...!..|.!...!..|
|000017d0| cc 21 88 c4 cd 21 88 c4 | ce 21 88 c4 cf 21 88 d0 |.!...!..|.!...!..|
|000017e0| 16 0d d0 16 0e d0 16 0f | d1 d2 21 ab 84 0e 12 16 |........|..!.....|
|000017f0| 07 c0 70 21 89 1e 13 ab | 96 d4 0e 13 21 d5 3d ac |..p!....|....!.=.|
|00001800| 95 d4 0e 13 21 16 0c d6 | 0e 13 d5 5c 22 88 aa 87 |....!...|...\"...|
|00001810| c1 c2 c3 70 21 5c 22 88 | 29 d7 d8 21 88 d9 da 21 |...p!\".|)..!...!|
|00001820| 87 22 20 5b 67 65 74 2d | 62 75 66 66 65 72 2d 70 |." [get-|buffer-p|
|00001830| 72 6f 63 65 73 73 20 65 | 72 72 6f 72 20 22 25 73 |rocess e|rror "%s|
|00001840| 20 64 6f 65 73 20 6e 6f | 74 20 68 61 76 65 20 61 | does no|t have a|
|00001850| 20 70 72 6f 63 65 73 73 | 22 20 62 75 66 66 65 72 | process|" buffer|
|00001860| 2d 6e 61 6d 65 20 6d 61 | 6b 65 2d 6c 6f 63 61 6c |-name ma|ke-local|
|00001870| 2d 76 61 72 69 61 62 6c | 65 20 62 72 69 64 67 65 |-variabl|e bridge|
|00001880| 2d 73 74 61 72 74 2d 72 | 65 67 65 78 70 20 62 72 |-start-r|egexp br|
|00001890| 69 64 67 65 2d 65 6e 64 | 2d 72 65 67 65 78 70 20 |idge-end|-regexp |
|000018a0| 62 72 69 64 67 65 2d 70 | 72 6f 6d 70 74 2d 72 65 |bridge-p|rompt-re|
|000018b0| 67 65 78 70 20 62 72 69 | 64 67 65 2d 68 61 6e 64 |gexp bri|dge-hand|
|000018c0| 6c 65 72 73 20 62 72 69 | 64 67 65 2d 73 6f 75 72 |lers bri|dge-sour|
|000018d0| 63 65 2d 69 6e 73 65 72 | 74 20 62 72 69 64 67 65 |ce-inser|t bridge|
|000018e0| 2d 64 65 73 74 69 6e 61 | 74 69 6f 6e 2d 69 6e 73 |-destina|tion-ins|
|000018f0| 65 72 74 20 62 72 69 64 | 67 65 2d 63 68 75 6e 6b |ert brid|ge-chunk|
|00001900| 2d 73 69 7a 65 20 62 72 | 69 64 67 65 2d 6f 6c 64 |-size br|idge-old|
|00001910| 2d 66 69 6c 74 65 72 20 | 62 72 69 64 67 65 2d 73 |-filter |bridge-s|
|00001920| 74 72 69 6e 67 20 62 72 | 69 64 67 65 2d 69 6e 2d |tring br|idge-in-|
|00001930| 70 72 6f 67 72 65 73 73 | 20 62 72 69 64 67 65 2d |progress| bridge-|
|00001940| 73 65 6e 64 2d 74 6f 2d | 62 75 66 66 65 72 20 6e |send-to-|buffer n|
|00001950| 69 6c 20 62 6f 75 6e 64 | 70 20 63 6f 6d 69 6e 74 |il bound|p comint|
|00001960| 2d 70 72 6f 6d 70 74 2d | 72 65 67 65 78 70 20 70 |-prompt-|regexp p|
|00001970| 72 6f 63 65 73 73 20 70 | 72 6f 63 65 73 73 2d 66 |rocess p|rocess-f|
|00001980| 69 6c 74 65 72 20 62 72 | 69 64 67 65 2d 66 69 6c |ilter br|idge-fil|
|00001990| 74 65 72 20 73 65 74 2d | 70 72 6f 63 65 73 73 2d |ter set-|process-|
|000019a0| 66 69 6c 74 65 72 20 72 | 75 6e 2d 68 6f 6f 6b 73 |filter r|un-hooks|
|000019b0| 20 62 72 69 64 67 65 2d | 68 6f 6f 6b 20 6d 65 73 | bridge-|hook mes|
|000019c0| 73 61 67 65 20 22 50 72 | 6f 63 65 73 73 20 62 72 |sage "Pr|ocess br|
|000019d0| 69 64 67 65 20 69 73 20 | 69 6e 73 74 61 6c 6c 65 |idge is |installe|
|000019e0| 64 22 5d 20 35 20 22 5c | 0a 53 65 74 20 75 70 20 |d"] 5 "\|.Set up |
|000019f0| 61 20 70 72 6f 63 65 73 | 73 20 62 72 69 64 67 65 |a proces|s bridge|
|00001a00| 20 69 6e 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 | in the |current |
|00001a10| 62 75 66 66 65 72 2e 22 | 20 6e 69 6c 5d 29 0a 28 |buffer."| nil]).(|
|00001a20| 66 73 65 74 20 27 72 65 | 73 65 74 2d 62 72 69 64 |fset 're|set-brid|
|00001a30| 67 65 20 23 5b 6e 69 6c | 20 22 08 ab 8a c1 8e 08 |ge #[nil| "......|
|00001a40| c2 70 21 c3 5c 22 29 87 | c4 c5 21 87 22 20 5b 62 |.p!.\").|..!." [b|
|00001a50| 72 69 64 67 65 2d 69 6e | 2d 70 72 6f 67 72 65 73 |ridge-in|-progres|
|00001a60| 73 20 28 28 62 79 74 65 | 2d 63 6f 64 65 20 22 c0 |s ((byte|-code ".|
|00001a70| 11 c0 87 22 20 5b 6e 69 | 6c 20 62 72 69 64 67 65 |..." [ni|l bridge|
|00001a80| 2d 69 6e 2d 70 72 6f 67 | 72 65 73 73 5d 20 31 29 |-in-prog|ress] 1)|
|00001a90| 29 20 67 65 74 2d 62 75 | 66 66 65 72 2d 70 72 6f |) get-bu|ffer-pro|
|00001aa0| 63 65 73 73 20 6e 69 6c | 20 6d 65 73 73 61 67 65 |cess nil| message|
|00001ab0| 20 22 4e 6f 20 62 72 69 | 64 67 65 20 69 6e 20 70 | "No bri|dge in p|
|00001ac0| 72 6f 67 72 65 73 73 2e | 22 5d 20 33 20 22 5c 0a |rogress.|"] 3 "\.|
|00001ad0| 4d 75 73 74 20 62 65 20 | 63 61 6c 6c 65 64 20 66 |Must be |called f|
|00001ae0| 72 6f 6d 20 74 68 65 20 | 70 72 6f 63 65 73 73 27 |rom the |process'|
|00001af0| 73 20 62 75 66 66 65 72 | 2e 20 20 52 65 6d 6f 76 |s buffer|. Remov|
|00001b00| 65 73 20 61 6e 79 20 61 | 63 74 69 76 65 20 62 72 |es any a|ctive br|
|00001b10| 69 64 67 65 2e 22 20 6e | 69 6c 5d 29 0a 28 66 73 |idge." n|il]).(fs|
|00001b20| 65 74 20 27 72 65 6d 6f | 76 65 2d 62 72 69 64 67 |et 'remo|ve-bridg|
|00001b30| 65 20 23 5b 6e 69 6c 20 | 22 c0 70 21 89 19 ab 87 |e #[nil |".p!....|
|00001b40| c2 09 21 c3 3d ac 88 c4 | c5 c6 70 21 5c 22 aa 93 |..!.=...|..p!\"..|
|00001b50| c7 20 88 c8 09 0e 09 5c | 22 88 0e 09 09 0e 5c 6e |. .....\|".....\n|
|00001b60| 5c 22 88 cb cc 21 29 87 | 22 20 5b 67 65 74 2d 62 |\"...!).|" [get-b|
|00001b70| 75 66 66 65 72 2d 70 72 | 6f 63 65 73 73 20 70 72 |uffer-pr|ocess pr|
|00001b80| 6f 63 65 73 73 20 70 72 | 6f 63 65 73 73 2d 66 69 |ocess pr|ocess-fi|
|00001b90| 6c 74 65 72 20 62 72 69 | 64 67 65 2d 66 69 6c 74 |lter bri|dge-filt|
|00001ba0| 65 72 20 65 72 72 6f 72 | 20 22 25 73 20 68 61 73 |er error| "%s has|
|00001bb0| 20 6e 6f 20 62 72 69 64 | 67 65 22 20 62 75 66 66 | no brid|ge" buff|
|00001bc0| 65 72 2d 6e 61 6d 65 20 | 72 65 73 65 74 2d 62 72 |er-name |reset-br|
|00001bd0| 69 64 67 65 20 73 65 74 | 2d 70 72 6f 63 65 73 73 |idge set|-process|
|00001be0| 2d 66 69 6c 74 65 72 20 | 62 72 69 64 67 65 2d 6f |-filter |bridge-o|
|00001bf0| 6c 64 2d 66 69 6c 74 65 | 72 20 62 72 69 64 67 65 |ld-filte|r bridge|
|00001c00| 2d 73 74 72 69 6e 67 20 | 6d 65 73 73 61 67 65 20 |-string |message |
|00001c10| 22 50 72 6f 63 65 73 73 | 20 62 72 69 64 67 65 20 |"Process| bridge |
|00001c20| 69 73 20 72 65 6d 6f 76 | 65 64 2e 22 5d 20 35 20 |is remov|ed."] 5 |
|00001c30| 22 5c 0a 52 65 6d 6f 76 | 65 20 62 72 69 64 67 65 |"\.Remov|e bridge|
|00001c40| 20 66 72 6f 6d 20 74 68 | 65 20 63 75 72 72 65 6e | from th|e curren|
|00001c50| 74 20 62 75 66 66 65 72 | 2e 22 20 6e 69 6c 5d 29 |t buffer|." nil])|
|00001c60| 0a 28 66 73 65 74 20 27 | 68 61 6e 64 2d 62 72 69 |.(fset '|hand-bri|
|00001c70| 64 67 65 20 23 5b 28 73 | 74 61 72 74 20 65 6e 64 |dge #[(s|tart end|
|00001c80| 29 20 22 08 ab 85 09 5c | 6e 5e aa 8b c3 0c 21 ab |) "....\|n^....!.|
|00001c90| 83 60 aa 83 c5 c6 21 08 | ab 85 09 5c 6e 5d aa 8e |.`....!.|...\n]..|
|00001ca0| c7 0e 08 c9 ca 23 ab 83 | 60 aa 83 c5 cb 21 1e 0c |.....#..|`....!..|
|00001cb0| 1e 0d ce cf 70 21 0e 0d | 0e 0c 7b 5c 22 2a 87 22 |....p!..|..{\"*."|
|00001cc0| 20 5b 63 75 72 72 65 6e | 74 2d 70 72 65 66 69 78 | [curren|t-prefix|
|00001cd0| 2d 61 72 67 20 73 74 61 | 72 74 20 65 6e 64 20 6c |-arg sta|rt end l|
|00001ce0| 6f 6f 6b 69 6e 67 2d 61 | 74 20 62 72 69 64 67 65 |ooking-a|t bridge|
|00001cf0| 2d 73 74 61 72 74 2d 72 | 65 67 65 78 70 20 65 72 |-start-r|egexp er|
|00001d00| 72 6f 72 20 22 4e 6f 74 | 20 6c 6f 6f 6b 69 6e 67 |ror "Not| looking|
|00001d10| 20 61 74 20 62 72 69 64 | 67 65 2d 73 74 61 72 74 | at brid|ge-start|
|00001d20| 2d 72 65 67 65 78 70 22 | 20 72 65 2d 73 65 61 72 |-regexp"| re-sear|
|00001d30| 63 68 2d 66 6f 72 77 61 | 72 64 20 62 72 69 64 67 |ch-forwa|rd bridg|
|00001d40| 65 2d 65 6e 64 2d 72 65 | 67 65 78 70 20 6e 69 6c |e-end-re|gexp nil|
|00001d50| 20 74 20 22 44 69 64 6e | 27 74 20 73 65 65 20 62 | t "Didn|'t see b|
|00001d60| 72 69 64 67 65 2d 65 6e | 64 2d 72 65 67 65 78 70 |ridge-en|d-regexp|
|00001d70| 22 20 70 31 20 70 30 20 | 62 72 69 64 67 65 2d 66 |" p1 p0 |bridge-f|
|00001d80| 69 6c 74 65 72 20 67 65 | 74 2d 62 75 66 66 65 72 |ilter ge|t-buffer|
|00001d90| 2d 70 72 6f 63 65 73 73 | 5d 20 35 20 22 5c 0a 57 |-process|] 5 "\.W|
|00001da0| 69 74 68 20 70 6f 69 6e | 74 20 61 74 20 62 72 69 |ith poin|t at bri|
|00001db0| 64 67 65 2d 73 74 61 72 | 74 2c 20 73 65 6e 64 73 |dge-star|t, sends|
|00001dc0| 20 62 72 69 64 67 65 2d | 73 74 61 72 74 20 2b 20 | bridge-|start + |
|00001dd0| 73 74 72 69 6e 67 20 2b | 0a 62 72 69 64 67 65 2d |string +|.bridge-|
|00001de0| 65 6e 64 20 74 6f 20 62 | 72 69 64 67 65 2d 66 69 |end to b|ridge-fi|
|00001df0| 6c 74 65 72 2e 20 20 57 | 69 74 68 20 70 72 65 66 |lter. W|ith pref|
|00001e00| 69 78 2c 20 75 73 65 20 | 63 75 72 72 65 6e 74 20 |ix, use |current |
|00001e10| 72 65 67 69 6f 6e 20 74 | 6f 20 73 65 6e 64 2e 22 |region t|o send."|
|00001e20| 20 22 72 22 5d 29 0a 28 | 70 72 6f 76 69 64 65 20 | "r"]).(|provide |
|00001e30| 27 62 72 69 64 67 65 29 | 0a |'bridge)|. |
+--------+-------------------------+-------------------------+--------+--------+