home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.006 / xemacs-1 / lib / xemacs-19.13 / lisp / packages / server.elc < prev    next >
Emacs Compiled Lisp  |  1995-08-29  |  8.1 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
55% TrID Emacs/XEmacs byte-compiled Lisp (generic) default
44% TrID Summation Document Image Information Load File default (weak)
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 63 74 68 6f 6d 70 40 |piled by| cthomp@|
|00000020| 77 69 6c 6c 6f 77 2e 63 | 73 2e 75 69 75 63 2e 65 |willow.c|s.uiuc.e|
|00000030| 64 75 20 6f 6e 20 54 75 | 65 20 41 75 67 20 32 39 |du on Tu|e Aug 29|
|00000040| 20 31 34 3a 31 37 3a 31 | 30 20 31 39 39 35 0a 3b | 14:17:1|0 1995.;|
|00000050| 3b 3b 20 66 72 6f 6d 20 | 66 69 6c 65 20 2f 78 65 |;; from |file /xe|
|00000060| 6d 61 63 73 2f 78 65 6d | 61 63 73 2d 31 39 2e 31 |macs/xem|acs-19.1|
|00000070| 33 2d 72 65 6c 65 61 73 | 65 2f 65 64 69 74 6f 72 |3-releas|e/editor|
|00000080| 2f 6c 69 73 70 2f 70 61 | 63 6b 61 67 65 73 2f 73 |/lisp/pa|ckages/s|
|00000090| 65 72 76 65 72 2e 65 6c | 0a 3b 3b 3b 20 65 6d 61 |erver.el|.;;; ema|
|000000a0| 63 73 20 76 65 72 73 69 | 6f 6e 20 31 39 2e 31 33 |cs versi|on 19.13|
|000000b0| 20 58 45 6d 61 63 73 20 | 4c 75 63 69 64 2e 0a 3b | XEmacs |Lucid..;|
|000000c0| 3b 3b 20 62 79 74 65 63 | 6f 6d 70 20 76 65 72 73 |;; bytec|omp vers|
|000000d0| 69 6f 6e 20 32 2e 32 35 | 3b 20 31 2d 53 65 70 2d |ion 2.25|; 1-Sep-|
|000000e0| 39 34 2e 0a 3b 3b 3b 20 | 6f 70 74 69 6d 69 7a 61 |94..;;; |optimiza|
|000000f0| 74 69 6f 6e 20 69 73 20 | 6f 6e 2e 0a 3b 3b 3b 20 |tion is |on..;;; |
|00000100| 74 68 69 73 20 66 69 6c | 65 20 75 73 65 73 20 6f |this fil|e uses o|
|00000110| 70 63 6f 64 65 73 20 77 | 68 69 63 68 20 64 6f 20 |pcodes w|hich do |
|00000120| 6e 6f 74 20 65 78 69 73 | 74 20 69 6e 20 45 6d 61 |not exis|t in Ema|
|00000130| 63 73 20 31 38 2e 0a 0a | 28 69 66 20 28 61 6e 64 |cs 18...|(if (and|
|00000140| 20 28 62 6f 75 6e 64 70 | 20 27 65 6d 61 63 73 2d | (boundp| 'emacs-|
|00000150| 76 65 72 73 69 6f 6e 29 | 0a 09 20 28 6f 72 20 28 |version)|.. (or (|
|00000160| 61 6e 64 20 28 62 6f 75 | 6e 64 70 20 27 65 70 6f |and (bou|ndp 'epo|
|00000170| 63 68 3a 3a 76 65 72 73 | 69 6f 6e 29 20 65 70 6f |ch::vers|ion) epo|
|00000180| 63 68 3a 3a 76 65 72 73 | 69 6f 6e 29 0a 09 20 20 |ch::vers|ion).. |
|00000190| 20 20 20 28 73 74 72 69 | 6e 67 2d 6c 65 73 73 70 | (stri|ng-lessp|
|000001a0| 20 65 6d 61 63 73 2d 76 | 65 72 73 69 6f 6e 20 22 | emacs-v|ersion "|
|000001b0| 31 39 22 29 29 29 0a 20 | 20 20 20 28 65 72 72 6f |19"))). | (erro|
|000001c0| 72 20 22 54 68 69 73 20 | 66 69 6c 65 20 77 61 73 |r "This |file was|
|000001d0| 20 63 6f 6d 70 69 6c 65 | 64 20 66 6f 72 20 45 6d | compile|d for Em|
|000001e0| 61 63 73 20 31 39 2e 22 | 29 29 0a 0a 28 64 65 66 |acs 19."|))..(def|
|000001f0| 76 61 72 20 73 65 72 76 | 65 72 2d 70 72 6f 67 72 |var serv|er-progr|
|00000200| 61 6d 20 28 65 78 70 61 | 6e 64 2d 66 69 6c 65 2d |am (expa|nd-file-|
|00000210| 6e 61 6d 65 20 22 65 6d | 61 63 73 73 65 72 76 65 |name "em|acsserve|
|00000220| 72 22 20 65 78 65 63 2d | 64 69 72 65 63 74 6f 72 |r" exec-|director|
|00000230| 79 29 20 22 5c 0a 2a 54 | 68 65 20 70 72 6f 67 72 |y) "\.*T|he progr|
|00000240| 61 6d 20 74 6f 20 75 73 | 65 20 61 73 20 74 68 65 |am to us|e as the|
|00000250| 20 65 64 69 74 20 73 65 | 72 76 65 72 2e 22 29 0a | edit se|rver.").|
|00000260| 28 64 65 66 76 61 72 20 | 73 65 72 76 65 72 2d 76 |(defvar |server-v|
|00000270| 69 73 69 74 2d 68 6f 6f | 6b 20 6e 69 6c 20 22 5c |isit-hoo|k nil "\|
|00000280| 0a 2a 4c 69 73 74 20 6f | 66 20 68 6f 6f 6b 73 20 |.*List o|f hooks |
|00000290| 74 6f 20 63 61 6c 6c 20 | 77 68 65 6e 20 76 69 73 |to call |when vis|
|000002a0| 69 74 69 6e 67 20 61 20 | 66 69 6c 65 20 66 6f 72 |iting a |file for|
|000002b0| 20 74 68 65 20 45 6d 61 | 63 73 20 73 65 72 76 65 | the Ema|cs serve|
|000002c0| 72 2e 22 29 0a 28 64 65 | 66 76 61 72 20 73 65 72 |r.").(de|fvar ser|
|000002d0| 76 65 72 2d 73 77 69 74 | 63 68 2d 68 6f 6f 6b 20 |ver-swit|ch-hook |
|000002e0| 6e 69 6c 20 22 5c 0a 2a | 4c 69 73 74 20 6f 66 20 |nil "\.*|List of |
|000002f0| 68 6f 6f 6b 73 20 74 6f | 20 63 61 6c 6c 20 77 68 |hooks to| call wh|
|00000300| 65 6e 20 73 77 69 74 63 | 68 69 6e 67 20 74 6f 20 |en switc|hing to |
|00000310| 61 20 62 75 66 66 65 72 | 20 66 6f 72 20 74 68 65 |a buffer| for the|
|00000320| 20 45 6d 61 63 73 20 73 | 65 72 76 65 72 2e 22 29 | Emacs s|erver.")|
|00000330| 0a 28 64 65 66 76 61 72 | 20 73 65 72 76 65 72 2d |.(defvar| server-|
|00000340| 64 6f 6e 65 2d 68 6f 6f | 6b 20 6e 69 6c 20 22 5c |done-hoo|k nil "\|
|00000350| 0a 2a 4c 69 73 74 20 6f | 66 20 68 6f 6f 6b 73 20 |.*List o|f hooks |
|00000360| 74 6f 20 63 61 6c 6c 20 | 77 68 65 6e 20 64 6f 6e |to call |when don|
|00000370| 65 20 65 64 69 74 69 6e | 67 20 61 20 62 75 66 66 |e editin|g a buff|
|00000380| 65 72 20 66 6f 72 20 74 | 68 65 20 45 6d 61 63 73 |er for t|he Emacs|
|00000390| 20 73 65 72 76 65 72 2e | 22 29 0a 28 64 65 66 76 | server.|").(defv|
|000003a0| 61 72 20 73 65 72 76 65 | 72 2d 70 72 6f 63 65 73 |ar serve|r-proces|
|000003b0| 73 20 6e 69 6c 20 22 5c | 0a 74 68 65 20 63 75 72 |s nil "\|.the cur|
|000003c0| 72 65 6e 74 20 73 65 72 | 76 65 72 20 70 72 6f 63 |rent ser|ver proc|
|000003d0| 65 73 73 22 29 0a 28 62 | 79 74 65 2d 63 6f 64 65 |ess").(b|yte-code|
|000003e0| 20 22 c0 c1 21 ac 82 c2 | 11 c0 87 22 20 5b 62 6f | "..!...|..." [bo|
|000003f0| 75 6e 64 70 20 73 65 72 | 76 65 72 2d 70 72 65 76 |undp ser|ver-prev|
|00000400| 69 6f 75 73 2d 73 74 72 | 69 6e 67 20 22 22 5d 20 |ious-str|ing ""] |
|00000410| 32 29 0a 28 64 65 66 76 | 61 72 20 73 65 72 76 65 |2).(defv|ar serve|
|00000420| 72 2d 63 6c 69 65 6e 74 | 73 20 6e 69 6c 20 22 5c |r-client|s nil "\|
|00000430| 0a 4c 69 73 74 20 6f 66 | 20 63 75 72 72 65 6e 74 |.List of| current|
|00000440| 20 73 65 72 76 65 72 20 | 63 6c 69 65 6e 74 73 2e | server |clients.|
|00000450| 0a 45 61 63 68 20 65 6c | 65 6d 65 6e 74 20 69 73 |.Each el|ement is|
|00000460| 20 28 43 4c 49 45 4e 54 | 49 44 20 42 55 46 46 45 | (CLIENT|ID BUFFE|
|00000470| 52 53 2e 2e 2e 29 20 77 | 68 65 72 65 20 43 4c 49 |RS...) w|here CLI|
|00000480| 45 4e 54 49 44 20 69 73 | 20 61 20 73 74 72 69 6e |ENTID is| a strin|
|00000490| 67 0a 74 68 61 74 20 63 | 61 6e 20 62 65 20 67 69 |g.that c|an be gi|
|000004a0| 76 65 6e 20 74 6f 20 74 | 68 65 20 73 65 72 76 65 |ven to t|he serve|
|000004b0| 72 20 70 72 6f 63 65 73 | 73 20 74 6f 20 69 64 65 |r proces|s to ide|
|000004c0| 6e 74 69 66 79 20 61 20 | 63 6c 69 65 6e 74 2e 0a |ntify a |client..|
|000004d0| 57 68 65 6e 20 61 20 62 | 75 66 66 65 72 20 69 73 |When a b|uffer is|
|000004e0| 20 6d 61 72 6b 65 64 20 | 61 73 20 5c 22 64 6f 6e | marked |as \"don|
|000004f0| 65 5c 22 2c 20 69 74 20 | 69 73 20 72 65 6d 6f 76 |e\", it |is remov|
|00000500| 65 64 20 66 72 6f 6d 20 | 74 68 69 73 20 6c 69 73 |ed from |this lis|
|00000510| 74 2e 22 29 0a 28 64 65 | 66 76 61 72 20 73 65 72 |t.").(de|fvar ser|
|00000520| 76 65 72 2d 62 75 66 66 | 65 72 2d 63 6c 69 65 6e |ver-buff|er-clien|
|00000530| 74 73 20 6e 69 6c 20 22 | 5c 0a 4c 69 73 74 20 6f |ts nil "|\.List o|
|00000540| 66 20 63 6c 69 65 6e 74 | 69 64 73 20 66 6f 72 20 |f client|ids for |
|00000550| 63 6c 69 65 6e 74 73 20 | 72 65 71 75 65 73 74 69 |clients |requesti|
|00000560| 6e 67 20 65 64 69 74 69 | 6e 67 20 6f 66 20 63 75 |ng editi|ng of cu|
|00000570| 72 72 65 6e 74 20 62 75 | 66 66 65 72 2e 22 29 0a |rrent bu|ffer.").|
|00000580| 28 62 79 74 65 2d 63 6f | 64 65 20 22 c0 c1 21 88 |(byte-co|de "..!.|
|00000590| c2 c1 c3 c4 23 87 22 20 | 5b 6d 61 6b 65 2d 76 61 |....#." |[make-va|
|000005a0| 72 69 61 62 6c 65 2d 62 | 75 66 66 65 72 2d 6c 6f |riable-b|uffer-lo|
|000005b0| 63 61 6c 20 73 65 72 76 | 65 72 2d 62 75 66 66 65 |cal serv|er-buffe|
|000005c0| 72 2d 63 6c 69 65 6e 74 | 73 20 70 75 74 20 70 65 |r-client|s put pe|
|000005d0| 72 6d 61 6e 65 6e 74 2d | 6c 6f 63 61 6c 20 74 5d |rmanent-|local t]|
|000005e0| 20 34 29 0a 28 64 65 66 | 76 61 72 20 73 65 72 76 | 4).(def|var serv|
|000005f0| 65 72 2d 77 69 6e 64 6f | 77 20 6e 69 6c 20 22 5c |er-windo|w nil "\|
|00000600| 0a 2a 54 68 65 20 77 69 | 6e 64 6f 77 20 74 6f 20 |.*The wi|ndow to |
|00000610| 75 73 65 20 66 6f 72 20 | 73 65 6c 65 63 74 69 6e |use for |selectin|
|00000620| 67 20 45 6d 61 63 73 20 | 73 65 72 76 65 72 20 62 |g Emacs |server b|
|00000630| 75 66 66 65 72 73 2e 0a | 49 66 20 6e 69 6c 2c 20 |uffers..|If nil, |
|00000640| 75 73 65 20 74 68 65 20 | 73 65 6c 65 63 74 65 64 |use the |selected|
|00000650| 20 77 69 6e 64 6f 77 2e | 0a 49 66 20 69 74 20 69 | window.|.If it i|
|00000660| 73 20 61 20 66 72 61 6d | 65 2c 20 75 73 65 20 74 |s a fram|e, use t|
|00000670| 68 65 20 66 72 61 6d 65 | 27 73 20 73 65 6c 65 63 |he frame|'s selec|
|00000680| 74 65 64 20 77 69 6e 64 | 6f 77 2e 22 29 0a 28 64 |ted wind|ow.").(d|
|00000690| 65 66 76 61 72 20 73 65 | 72 76 65 72 2d 74 65 6d |efvar se|rver-tem|
|000006a0| 70 2d 66 69 6c 65 2d 72 | 65 67 65 78 70 20 22 5e |p-file-r|egexp "^|
|000006b0| 2f 74 6d 70 2f 52 65 5c | 5c 7c 2f 64 72 61 66 74 |/tmp/Re\|\|/draft|
|000006c0| 24 22 20 22 5c 0a 2a 52 | 65 67 65 78 70 20 77 68 |$" "\.*R|egexp wh|
|000006d0| 69 63 68 20 73 68 6f 75 | 6c 64 20 6d 61 74 63 68 |ich shou|ld match|
|000006e0| 20 66 69 6c 65 6e 61 6d | 65 73 20 6f 66 20 74 65 | filenam|es of te|
|000006f0| 6d 70 6f 72 61 72 79 20 | 66 69 6c 65 73 0a 77 68 |mporary |files.wh|
|00000700| 69 63 68 20 61 72 65 20 | 64 65 6c 65 74 65 64 20 |ich are |deleted |
|00000710| 61 6e 64 20 72 65 75 73 | 65 64 20 61 66 74 65 72 |and reus|ed after|
|00000720| 20 65 61 63 68 20 65 64 | 69 74 0a 62 79 20 74 68 | each ed|it.by th|
|00000730| 65 20 70 72 6f 67 72 61 | 6d 73 20 74 68 61 74 20 |e progra|ms that |
|00000740| 69 6e 76 6f 6b 65 20 74 | 68 65 20 65 6d 61 63 73 |invoke t|he emacs|
|00000750| 20 73 65 72 76 65 72 2e | 22 29 0a 28 62 79 74 65 | server.|").(byte|
|00000760| 2d 63 6f 64 65 20 22 c0 | 09 9e ac 84 c2 09 42 11 |-code ".|......B.|
|00000770| c3 c4 4d 88 c5 c6 4d 87 | 22 20 5b 73 65 72 76 65 |..M...M.|" [serve|
|00000780| 72 2d 62 75 66 66 65 72 | 2d 63 6c 69 65 6e 74 73 |r-buffer|-clients|
|00000790| 20 6d 69 6e 6f 72 2d 6d | 6f 64 65 2d 61 6c 69 73 | minor-m|ode-alis|
|000007a0| 74 20 28 73 65 72 76 65 | 72 2d 62 75 66 66 65 72 |t (serve|r-buffer|
|000007b0| 2d 63 6c 69 65 6e 74 73 | 20 22 20 53 65 72 76 65 |-clients| " Serve|
|000007c0| 72 22 29 20 73 65 72 76 | 65 72 2d 6c 6f 67 20 23 |r") serv|er-log #|
|000007d0| 5b 28 73 74 72 69 6e 67 | 29 20 22 c0 c1 21 ad 90 |[(string|) "..!..|
|000007e0| 8a c1 71 88 64 62 88 5c | 6e 63 88 6f ae 82 c3 20 |..q.db.\|nc.o... |
|000007f0| 29 87 22 20 5b 67 65 74 | 2d 62 75 66 66 65 72 20 |)." [get|-buffer |
|00000800| 22 2a 73 65 72 76 65 72 | 2a 22 20 73 74 72 69 6e |"*server|*" strin|
|00000810| 67 20 6e 65 77 6c 69 6e | 65 5d 20 32 5d 20 73 65 |g newlin|e] 2] se|
|00000820| 72 76 65 72 2d 73 65 6e | 74 69 6e 65 6c 20 23 5b |rver-sen|tinel #[|
|00000830| 28 70 72 6f 63 20 6d 73 | 67 29 20 22 c0 09 21 c2 |(proc ms|g) "..!.|
|00000840| 3d ab 86 c3 c4 c5 21 21 | 87 c0 09 21 c6 3d ad 85 |=.....!!|...!.=..|
|00000850| c3 c4 c7 21 21 87 22 20 | 5b 70 72 6f 63 65 73 73 |...!!." |[process|
|00000860| 2d 73 74 61 74 75 73 20 | 70 72 6f 63 20 65 78 69 |-status |proc exi|
|00000870| 74 20 73 65 72 76 65 72 | 2d 6c 6f 67 20 6d 65 73 |t server|-log mes|
|00000880| 73 61 67 65 20 22 53 65 | 72 76 65 72 20 73 75 62 |sage "Se|rver sub|
|00000890| 70 72 6f 63 65 73 73 20 | 65 78 69 74 65 64 22 20 |process |exited" |
|000008a0| 73 69 67 6e 61 6c 20 22 | 53 65 72 76 65 72 20 73 |signal "|Server s|
|000008b0| 75 62 70 72 6f 63 65 73 | 73 20 6b 69 6c 6c 65 64 |ubproces|s killed|
|000008c0| 22 5d 20 33 5d 5d 20 32 | 29 0a 28 66 73 65 74 20 |"] 3]] 2|).(fset |
|000008d0| 27 73 65 72 76 65 72 2d | 73 74 61 72 74 20 23 5b |'server-|start #[|
|000008e0| 28 26 6f 70 74 69 6f 6e | 61 6c 20 6c 65 61 76 65 |(&option|al leave|
|000008f0| 2d 64 65 61 64 29 20 22 | 08 ab 8a c1 08 c2 5c 22 |-dead) "|......\"|
|00000900| 88 c2 c3 c4 8f 88 c2 c5 | c6 8f 88 c2 c7 c8 8f 88 |........|........|
|00000910| 0e 09 ab 8f 0e 09 40 41 | 40 1e 5c 6e cb 0e 5c 6e |......@A|@.\n..\n|
|00000920| 21 88 29 aa 6d 0e 0c 3f | ad a1 08 ab 86 cd ce cf |!.).m..?|........|
|00000930| 21 21 88 c2 1e 10 d1 d2 | c2 0e 13 23 10 29 c1 08 |!!......|...#.)..|
|00000940| d4 5c 22 88 d5 08 d6 5c | 22 88 d7 08 21 87 22 20 |.\"....\|"...!." |
|00000950| 5b 73 65 72 76 65 72 2d | 70 72 6f 63 65 73 73 20 |[server-|process |
|00000960| 73 65 74 2d 70 72 6f 63 | 65 73 73 2d 73 65 6e 74 |set-proc|ess-sent|
|00000970| 69 6e 65 6c 20 6e 69 6c | 20 28 64 65 6c 65 74 65 |inel nil| (delete|
|00000980| 2d 70 72 6f 63 65 73 73 | 20 73 65 72 76 65 72 2d |-process| server-|
|00000990| 70 72 6f 63 65 73 73 29 | 20 28 28 65 72 72 6f 72 |process)| ((error|
|000009a0| 29 29 20 28 64 65 6c 65 | 74 65 2d 66 69 6c 65 20 |)) (dele|te-file |
|000009b0| 22 7e 2f 2e 65 6d 61 63 | 73 5f 73 65 72 76 65 72 |"~/.emac|s_server|
|000009c0| 22 29 20 28 28 65 72 72 | 6f 72 29 29 20 28 62 79 |") ((err|or)) (by|
|000009d0| 74 65 2d 63 6f 64 65 20 | 22 c0 c1 c2 c3 20 c4 20 |te-code |".... . |
|000009e0| 23 21 87 22 20 5b 64 65 | 6c 65 74 65 2d 66 69 6c |#!." [de|lete-fil|
|000009f0| 65 20 66 6f 72 6d 61 74 | 20 22 2f 74 6d 70 2f 65 |e format| "/tmp/e|
|00000a00| 73 72 76 25 64 2d 25 73 | 22 20 75 73 65 72 2d 75 |srv%d-%s|" user-u|
|00000a10| 69 64 20 73 79 73 74 65 | 6d 2d 6e 61 6d 65 5d 20 |id syste|m-name] |
|00000a20| 35 29 20 28 28 65 72 72 | 6f 72 29 29 20 73 65 72 |5) ((err|or)) ser|
|00000a30| 76 65 72 2d 63 6c 69 65 | 6e 74 73 20 62 75 66 66 |ver-clie|nts buff|
|00000a40| 65 72 20 73 65 72 76 65 | 72 2d 62 75 66 66 65 72 |er serve|r-buffer|
|00000a50| 2d 64 6f 6e 65 20 6c 65 | 61 76 65 2d 64 65 61 64 |-done le|ave-dead|
|00000a60| 20 73 65 72 76 65 72 2d | 6c 6f 67 20 6d 65 73 73 | server-|log mess|
|00000a70| 61 67 65 20 22 52 65 73 | 74 61 72 74 69 6e 67 20 |age "Res|tarting |
|00000a80| 73 65 72 76 65 72 22 20 | 70 72 6f 63 65 73 73 2d |server" |process-|
|00000a90| 63 6f 6e 6e 65 63 74 69 | 6f 6e 2d 74 79 70 65 20 |connecti|on-type |
|00000aa0| 73 74 61 72 74 2d 70 72 | 6f 63 65 73 73 20 22 73 |start-pr|ocess "s|
|00000ab0| 65 72 76 65 72 22 20 73 | 65 72 76 65 72 2d 70 72 |erver" s|erver-pr|
|00000ac0| 6f 67 72 61 6d 20 73 65 | 72 76 65 72 2d 73 65 6e |ogram se|rver-sen|
|00000ad0| 74 69 6e 65 6c 20 73 65 | 74 2d 70 72 6f 63 65 73 |tinel se|t-proces|
|00000ae0| 73 2d 66 69 6c 74 65 72 | 20 73 65 72 76 65 72 2d |s-filter| server-|
|00000af0| 70 72 6f 63 65 73 73 2d | 66 69 6c 74 65 72 20 70 |process-|filter p|
|00000b00| 72 6f 63 65 73 73 2d 6b | 69 6c 6c 2d 77 69 74 68 |rocess-k|ill-with|
|00000b10| 6f 75 74 2d 71 75 65 72 | 79 5d 20 34 20 22 5c 0a |out-quer|y] 4 "\.|
|00000b20| 41 6c 6c 6f 77 20 74 68 | 69 73 20 45 6d 61 63 73 |Allow th|is Emacs|
|00000b30| 20 70 72 6f 63 65 73 73 | 20 74 6f 20 62 65 20 61 | process| to be a|
|00000b40| 20 73 65 72 76 65 72 20 | 66 6f 72 20 63 6c 69 65 | server |for clie|
|00000b50| 6e 74 20 70 72 6f 63 65 | 73 73 65 73 2e 0a 54 68 |nt proce|sses..Th|
|00000b60| 69 73 20 73 74 61 72 74 | 73 20 61 20 73 65 72 76 |is start|s a serv|
|00000b70| 65 72 20 63 6f 6d 6d 75 | 6e 69 63 61 74 69 6f 6e |er commu|nication|
|00000b80| 73 20 73 75 62 70 72 6f | 63 65 73 73 20 74 68 72 |s subpro|cess thr|
|00000b90| 6f 75 67 68 20 77 68 69 | 63 68 0a 63 6c 69 65 6e |ough whi|ch.clien|
|00000ba0| 74 20 5c 22 65 64 69 74 | 6f 72 73 5c 22 20 63 61 |t \"edit|ors\" ca|
|00000bb0| 6e 20 73 65 6e 64 20 79 | 6f 75 72 20 65 64 69 74 |n send y|our edit|
|00000bc0| 69 6e 67 20 63 6f 6d 6d | 61 6e 64 73 20 74 6f 20 |ing comm|ands to |
|00000bd0| 74 68 69 73 20 45 6d 61 | 63 73 20 6a 6f 62 2e 0a |this Ema|cs job..|
|00000be0| 54 6f 20 75 73 65 20 74 | 68 65 20 73 65 72 76 65 |To use t|he serve|
|00000bf0| 72 2c 20 73 65 74 20 75 | 70 20 74 68 65 20 70 72 |r, set u|p the pr|
|00000c00| 6f 67 72 61 6d 20 60 65 | 6d 61 63 73 63 6c 69 65 |ogram `e|macsclie|
|00000c10| 6e 74 27 20 69 6e 20 74 | 68 65 0a 45 6d 61 63 73 |nt' in t|he.Emacs|
|00000c20| 20 64 69 73 74 72 69 62 | 75 74 69 6f 6e 20 61 73 | distrib|ution as|
|00000c30| 20 79 6f 75 72 20 73 74 | 61 6e 64 61 72 64 20 5c | your st|andard \|
|00000c40| 22 65 64 69 74 6f 72 5c | 22 2e 0a 0a 50 72 65 66 |"editor\|"...Pref|
|00000c50| 69 78 20 61 72 67 20 6d | 65 61 6e 73 20 6a 75 73 |ix arg m|eans jus|
|00000c60| 74 20 6b 69 6c 6c 20 61 | 6e 79 20 65 78 69 73 74 |t kill a|ny exist|
|00000c70| 69 6e 67 20 73 65 72 76 | 65 72 20 63 6f 6d 6d 75 |ing serv|er commu|
|00000c80| 6e 69 63 61 74 69 6f 6e | 73 20 73 75 62 70 72 6f |nication|s subpro|
|00000c90| 63 65 73 73 2e 22 20 22 | 50 22 5d 29 0a 28 66 73 |cess." "|P"]).(fs|
|00000ca0| 65 74 20 27 73 65 72 76 | 65 72 2d 70 72 6f 63 65 |et 'serv|er-proce|
|00000cb0| 73 73 2d 66 69 6c 74 65 | 72 20 23 5b 28 70 72 6f |ss-filte|r #[(pro|
|00000cc0| 63 20 73 74 72 69 6e 67 | 29 20 22 c0 09 21 88 5c |c string|) "..!.\|
|00000cd0| 6e 09 50 11 c3 c4 09 5c | 22 83 ba 00 09 c5 89 94 |n.P....\|".......|
|00000ce0| 4f c6 89 c7 1e 08 1e 09 | 1e 5c 6e 1e 0b 09 c5 95 |O.......|.\n.....|
|00000cf0| c6 4f 11 c3 cc 0e 0b 5c | 22 ab 8d cd ce 0e 0b c5 |.O.....\|".......|
|00000d00| 95 c6 4f 50 21 88 aa fd | c3 cf 0e 0b 5c 22 ab 88 |..OP!...|....\"..|
|00000d10| 0e 0b c5 95 c6 4f 16 0b | 0e 0b c5 c3 d0 0e 0b 5c |.....O..|.......\|
|00000d20| 22 4f 43 16 5c 6e 0e 0b | c5 95 c6 4f 16 0b c3 d1 |"OC.\n..|...O....|
|00000d30| 0e 0b 5c 22 ab b4 0e 0b | c5 94 c5 95 53 4f 1e 12 |..\"....|....SO..|
|00000d40| 0e 0b c5 95 c6 4f 16 0b | c3 d3 0e 12 5c 22 ab 8b |.....O..|....\"..|
|00000d50| d4 0e 12 c7 c6 4f 21 16 | 08 aa 8d 0e 12 0e 08 44 |.....O!.|.......D|
|00000d60| 0e 09 42 16 09 c7 16 08 | 29 aa 45 d5 0e 09 0e 5c |..B.....|).E....\|
|00000d70| 6e 5c 22 88 0e 5c 6e 0e | 16 42 16 16 d7 0e 5c 6e |n\"..\n.|.B....\n|
|00000d80| 41 40 21 88 d8 d9 21 88 | cd da db 21 21 88 2c 82 |A@!...!.|...!!.,.|
|00000d90| 08 00 09 89 12 87 22 20 | 5b 73 65 72 76 65 72 2d |......" |[server-|
|00000da0| 6c 6f 67 20 73 74 72 69 | 6e 67 20 73 65 72 76 65 |log stri|ng serve|
|00000db0| 72 2d 70 72 65 76 69 6f | 75 73 2d 73 74 72 69 6e |r-previo|us-strin|
|00000dc0| 67 20 73 74 72 69 6e 67 | 2d 6d 61 74 63 68 20 22 |g string|-match "|
|00000dd0| 5c 6e 22 20 30 20 6e 69 | 6c 20 31 20 6c 69 6e 65 |\n" 0 ni|l 1 line|
|00000de0| 6e 6f 20 66 69 6c 65 73 | 20 63 6c 69 65 6e 74 20 |no files| client |
|00000df0| 72 65 71 75 65 73 74 20 | 22 5e 45 72 72 6f 72 3a |request |"^Error:|
|00000e00| 20 22 20 6d 65 73 73 61 | 67 65 20 22 53 65 72 76 | " messa|ge "Serv|
|00000e10| 65 72 20 65 72 72 6f 72 | 3a 20 22 20 22 5e 43 6c |er error|: " "^Cl|
|00000e20| 69 65 6e 74 3a 20 22 20 | 22 20 22 20 22 5b 5e 20 |ient: " |" " "[^ |
|00000e30| 5d 2b 20 22 20 61 72 67 | 20 22 5c 5c 60 5c 5c 2b |]+ " arg| "\\`\\+|
|00000e40| 5b 30 2d 39 5d 2b 5c 5c | 27 22 20 72 65 61 64 20 |[0-9]+\\|'" read |
|00000e50| 73 65 72 76 65 72 2d 76 | 69 73 69 74 2d 66 69 6c |server-v|isit-fil|
|00000e60| 65 73 20 73 65 72 76 65 | 72 2d 63 6c 69 65 6e 74 |es serve|r-client|
|00000e70| 73 20 73 65 72 76 65 72 | 2d 73 77 69 74 63 68 2d |s server|-switch-|
|00000e80| 62 75 66 66 65 72 20 72 | 75 6e 2d 68 6f 6f 6b 73 |buffer r|un-hooks|
|00000e90| 20 73 65 72 76 65 72 2d | 73 77 69 74 63 68 2d 68 | server-|switch-h|
|00000ea0| 6f 6f 6b 20 73 75 62 73 | 74 69 74 75 74 65 2d 63 |ook subs|titute-c|
|00000eb0| 6f 6d 6d 61 6e 64 2d 6b | 65 79 73 20 22 57 68 65 |ommand-k|eys "Whe|
|00000ec0| 6e 20 64 6f 6e 65 20 77 | 69 74 68 20 61 20 62 75 |n done w|ith a bu|
|00000ed0| 66 66 65 72 2c 20 74 79 | 70 65 20 5c 5c 5b 73 65 |ffer, ty|pe \\[se|
|00000ee0| 72 76 65 72 2d 65 64 69 | 74 5d 22 5d 20 35 5d 29 |rver-edi|t]"] 5])|
|00000ef0| 0a 28 66 73 65 74 20 27 | 73 65 72 76 65 72 2d 76 |.(fset '|server-v|
|00000f00| 69 73 69 74 2d 66 69 6c | 65 73 20 23 5b 28 66 69 |isit-fil|es #[(fi|
|00000f10| 6c 65 73 20 63 6c 69 65 | 6e 74 29 20 22 c0 70 19 |les clie|nt) ".p.|
|00000f20| 1a c3 8e 0c ab d6 0c 40 | 40 1d c6 0d 21 89 19 ab |.......@|@...!...|
|00000f30| a8 09 71 ab a4 c7 0d 21 | ab 91 c8 09 21 ab 85 c9 |..q....!|....!...|
|00000f40| 09 21 ab 9e ca cb c0 5c | 22 88 aa 97 cc cd 0d ce |.!.....\|".......|
|00000f50| 51 21 ab 8f cf 0d 21 88 | aa 89 d0 0d 21 71 88 d1 |Q!....!.|....!q..|
|00000f60| d2 21 88 2a d3 0c 40 41 | 40 21 88 0e 14 40 0e 15 |.!.*..@A|@!...@..|
|00000f70| 42 16 15 70 5c 6e 42 12 | 0c 41 89 14 ac 2a 29 0e |B..p\nB.|.A...*).|
|00000f80| 14 5c 6e a4 2a 87 22 20 | 5b 6e 69 6c 20 6f 62 75 |.\n.*." |[nil obu|
|00000f90| 66 20 63 6c 69 65 6e 74 | 2d 72 65 63 6f 72 64 20 |f client|-record |
|00000fa0| 28 28 73 65 74 2d 62 75 | 66 66 65 72 20 6f 62 75 |((set-bu|ffer obu|
|00000fb0| 66 29 29 20 66 69 6c 65 | 73 20 66 69 6c 65 6e 20 |f)) file|s filen |
|00000fc0| 67 65 74 2d 66 69 6c 65 | 2d 62 75 66 66 65 72 20 |get-file|-buffer |
|00000fd0| 66 69 6c 65 2d 65 78 69 | 73 74 73 2d 70 20 76 65 |file-exi|sts-p ve|
|00000fe0| 72 69 66 79 2d 76 69 73 | 69 74 65 64 2d 66 69 6c |rify-vis|ited-fil|
|00000ff0| 65 2d 6d 6f 64 74 69 6d | 65 20 62 75 66 66 65 72 |e-modtim|e buffer|
|00001000| 2d 6d 6f 64 69 66 69 65 | 64 2d 70 20 72 65 76 65 |-modifie|d-p reve|
|00001010| 72 74 2d 62 75 66 66 65 | 72 20 74 20 79 2d 6f 72 |rt-buffe|r t y-or|
|00001020| 2d 6e 2d 70 20 22 46 69 | 6c 65 20 6e 6f 20 6c 6f |-n-p "Fi|le no lo|
|00001030| 6e 67 65 72 20 65 78 69 | 73 74 73 3a 20 22 20 22 |nger exi|sts: " "|
|00001040| 2c 20 77 72 69 74 65 20 | 62 75 66 66 65 72 20 74 |, write |buffer t|
|00001050| 6f 20 66 69 6c 65 3f 20 | 22 20 77 72 69 74 65 2d |o file? |" write-|
|00001060| 66 69 6c 65 20 66 69 6e | 64 2d 66 69 6c 65 2d 6e |file fin|d-file-n|
|00001070| 6f 73 65 6c 65 63 74 20 | 72 75 6e 2d 68 6f 6f 6b |oselect |run-hook|
|00001080| 73 20 73 65 72 76 65 72 | 2d 76 69 73 69 74 2d 68 |s server|-visit-h|
|00001090| 6f 6f 6b 20 67 6f 74 6f | 2d 6c 69 6e 65 20 63 6c |ook goto|-line cl|
|000010a0| 69 65 6e 74 20 73 65 72 | 76 65 72 2d 62 75 66 66 |ient ser|ver-buff|
|000010b0| 65 72 2d 63 6c 69 65 6e | 74 73 5d 20 35 20 22 5c |er-clien|ts] 5 "\|
|000010c0| 0a 46 69 6e 64 73 20 46 | 49 4c 45 53 20 61 6e 64 |.Finds F|ILES and|
|000010d0| 20 72 65 74 75 72 6e 73 | 20 74 68 65 20 6c 69 73 | returns| the lis|
|000010e0| 74 20 43 4c 49 45 4e 54 | 20 77 69 74 68 20 74 68 |t CLIENT| with th|
|000010f0| 65 20 62 75 66 66 65 72 | 73 20 6e 63 6f 6e 63 27 |e buffer|s nconc'|
|00001100| 64 2e 0a 46 49 4c 45 53 | 20 69 73 20 61 6e 20 61 |d..FILES| is an a|
|00001110| 6c 69 73 74 20 77 68 6f | 73 65 20 65 6c 65 6d 65 |list who|se eleme|
|00001120| 6e 74 73 20 61 72 65 20 | 28 46 49 4c 45 4e 41 4d |nts are |(FILENAM|
|00001130| 45 20 4c 49 4e 45 4e 55 | 4d 42 45 52 29 2e 22 5d |E LINENU|MBER)."]|
|00001140| 29 0a 28 66 73 65 74 20 | 27 73 65 72 76 65 72 2d |).(fset |'server-|
|00001150| 62 75 66 66 65 72 2d 64 | 6f 6e 65 20 23 5b 28 62 |buffer-d|one #[(b|
|00001160| 75 66 66 65 72 29 20 22 | c0 09 21 c2 3d c3 89 c4 |uffer) "|..!.=...|
|00001170| 0d 1e 06 1e 07 1e 08 1e | 09 1e 5c 6e 0e 06 ab f5 |........|..\n....|
|00001180| 0e 06 40 1e 0b 0e 09 ac | 89 0e 0c 0e 0b 3e 41 40 |..@.....|.....>A@|
|00001190| 16 09 cd 0e 0c 0e 0b 5c | 22 88 0e 0b 89 1e 0e ab |.......\|".......|
|000011a0| 9e cf 0e 0e 40 21 ab 8f | d0 0e 0e 40 21 ac 88 cd |....@!..|...@!...|
|000011b0| 0e 0e 40 0e 0b 5c 22 88 | 0e 0e 41 89 16 0e ac 62 |..@..\".|..A....b|
|000011c0| 29 0e 0b 41 ac a8 0e 5c | 6e ab 9e 0e 07 ac 84 d1 |)..A...\|n.......|
|000011d0| d2 21 88 c3 16 07 d3 09 | d4 d5 0e 0b 40 5c 22 5c |.!......|....@\"\|
|000011e0| 22 88 d6 d4 d5 0e 0b 40 | 5c 22 21 88 cd 0e 0b 0d |"......@|\"!.....|
|000011f0| 5c 22 15 29 0e 06 41 89 | 16 06 ac 0b cf 0e 0c 21 |\".)..A.|.......!|
|00001200| ab a8 d0 0e 0c 21 ab a2 | 8a 0e 0c 71 88 c3 16 17 |.....!..|...q....|
|00001210| d8 d9 21 88 29 da 0e 0c | 21 ab 8a db 0e 0c 21 88 |..!.)...|!.....!.|
|00001220| c4 16 08 aa 85 dc 0e 0c | 21 88 0e 09 0e 08 2d 44 |........|!.....-D|
|00001230| 87 22 20 5b 70 72 6f 63 | 65 73 73 2d 73 74 61 74 |." [proc|ess-stat|
|00001240| 75 73 20 73 65 72 76 65 | 72 2d 70 72 6f 63 65 73 |us serve|r-proces|
|00001250| 73 20 72 75 6e 20 6e 69 | 6c 20 74 20 73 65 72 76 |s run ni|l t serv|
|00001260| 65 72 2d 63 6c 69 65 6e | 74 73 20 6f 6c 64 2d 63 |er-clien|ts old-c|
|00001270| 6c 69 65 6e 74 73 20 66 | 69 72 73 74 20 6b 69 6c |lients f|irst kil|
|00001280| 6c 65 64 20 6e 65 78 74 | 2d 62 75 66 66 65 72 20 |led next|-buffer |
|00001290| 72 75 6e 6e 69 6e 67 20 | 63 6c 69 65 6e 74 20 62 |running |client b|
|000012a0| 75 66 66 65 72 20 64 65 | 6c 71 20 74 61 69 6c 20 |uffer de|lq tail |
|000012b0| 62 75 66 66 65 72 70 20 | 62 75 66 66 65 72 2d 6e |bufferp |buffer-n|
|000012c0| 61 6d 65 20 73 69 74 2d | 66 6f 72 20 31 20 70 72 |ame sit-|for 1 pr|
|000012d0| 6f 63 65 73 73 2d 73 65 | 6e 64 2d 73 74 72 69 6e |ocess-se|nd-strin|
|000012e0| 67 20 66 6f 72 6d 61 74 | 20 22 43 6c 6f 73 65 3a |g format| "Close:|
|000012f0| 20 25 73 20 44 6f 6e 65 | 5c 6e 22 20 73 65 72 76 | %s Done|\n" serv|
|00001300| 65 72 2d 6c 6f 67 20 73 | 65 72 76 65 72 2d 62 75 |er-log s|erver-bu|
|00001310| 66 66 65 72 2d 63 6c 69 | 65 6e 74 73 20 72 75 6e |ffer-cli|ents run|
|00001320| 2d 68 6f 6f 6b 73 20 73 | 65 72 76 65 72 2d 64 6f |-hooks s|erver-do|
|00001330| 6e 65 2d 68 6f 6f 6b 20 | 73 65 72 76 65 72 2d 74 |ne-hook |server-t|
|00001340| 65 6d 70 2d 66 69 6c 65 | 2d 70 20 6b 69 6c 6c 2d |emp-file|-p kill-|
|00001350| 62 75 66 66 65 72 20 62 | 75 72 79 2d 62 75 66 66 |buffer b|ury-buff|
|00001360| 65 72 5d 20 36 20 22 5c | 0a 4d 61 72 6b 20 42 55 |er] 6 "\|.Mark BU|
|00001370| 46 46 45 52 20 61 73 20 | 5c 22 64 6f 6e 65 5c 22 |FFER as |\"done\"|
|00001380| 20 66 6f 72 20 69 74 73 | 20 63 6c 69 65 6e 74 28 | for its| client(|
|00001390| 73 29 2e 0a 54 68 69 73 | 20 62 75 72 69 65 73 20 |s)..This| buries |
|000013a0| 74 68 65 20 62 75 66 66 | 65 72 2c 20 74 68 65 6e |the buff|er, then|
|000013b0| 20 72 65 74 75 72 6e 73 | 20 61 20 6c 69 73 74 20 | returns| a list |
|000013c0| 6f 66 20 74 68 65 20 66 | 6f 72 6d 20 28 4e 45 58 |of the f|orm (NEX|
|000013d0| 54 2d 42 55 46 46 45 52 | 20 4b 49 4c 4c 45 44 29 |T-BUFFER| KILLED)|
|000013e0| 2e 0a 4e 45 58 54 2d 42 | 55 46 46 45 52 20 69 73 |..NEXT-B|UFFER is|
|000013f0| 20 61 6e 6f 74 68 65 72 | 20 73 65 72 76 65 72 20 | another| server |
|00001400| 62 75 66 66 65 72 2c 20 | 61 73 20 61 20 73 75 67 |buffer, |as a sug|
|00001410| 67 65 73 74 69 6f 6e 20 | 66 6f 72 20 77 68 61 74 |gestion |for what|
|00001420| 20 74 6f 20 73 65 6c 65 | 63 74 20 6e 65 78 74 2c | to sele|ct next,|
|00001430| 0a 6f 72 20 6e 69 6c 2e | 20 20 4b 49 4c 4c 45 44 |.or nil.| KILLED|
|00001440| 20 69 73 20 74 20 69 66 | 20 77 65 20 6b 69 6c 6c | is t if| we kill|
|00001450| 65 64 20 42 55 46 46 45 | 52 20 28 62 65 63 61 75 |ed BUFFE|R (becau|
|00001460| 73 65 20 69 74 20 77 61 | 73 20 61 20 74 65 6d 70 |se it wa|s a temp|
|00001470| 20 66 69 6c 65 29 2e 22 | 5d 29 0a 28 66 73 65 74 | file)."|]).(fset|
|00001480| 20 27 73 65 72 76 65 72 | 2d 74 65 6d 70 2d 66 69 | 'server|-temp-fi|
|00001490| 6c 65 2d 70 20 23 5b 28 | 62 75 66 66 65 72 29 20 |le-p #[(|buffer) |
|000014a0| 22 c0 09 21 ad 86 c2 0b | c0 09 21 5c 22 87 22 20 |"..!....|..!\"." |
|000014b0| 5b 62 75 66 66 65 72 2d | 66 69 6c 65 2d 6e 61 6d |[buffer-|file-nam|
|000014c0| 65 20 62 75 66 66 65 72 | 20 73 74 72 69 6e 67 2d |e buffer| string-|
|000014d0| 6d 61 74 63 68 20 73 65 | 72 76 65 72 2d 74 65 6d |match se|rver-tem|
|000014e0| 70 2d 66 69 6c 65 2d 72 | 65 67 65 78 70 5d 20 34 |p-file-r|egexp] 4|
|000014f0| 20 22 5c 0a 52 65 74 75 | 72 6e 20 6e 6f 6e 2d 6e | "\.Retu|rn non-n|
|00001500| 69 6c 20 69 66 20 42 55 | 46 46 45 52 20 63 6f 6e |il if BU|FFER con|
|00001510| 74 61 69 6e 73 20 61 20 | 66 69 6c 65 20 63 6f 6e |tains a |file con|
|00001520| 73 69 64 65 72 65 64 20 | 74 65 6d 70 6f 72 61 72 |sidered |temporar|
|00001530| 79 2e 0a 54 68 65 73 65 | 20 61 72 65 20 66 69 6c |y..These| are fil|
|00001540| 65 73 20 77 68 6f 73 65 | 20 6e 61 6d 65 73 20 73 |es whose| names s|
|00001550| 75 67 67 65 73 74 20 74 | 68 65 79 20 61 72 65 20 |uggest t|hey are |
|00001560| 72 65 70 65 61 74 65 64 | 6c 79 0a 72 65 75 73 65 |repeated|ly.reuse|
|00001570| 64 20 74 6f 20 70 61 73 | 73 20 69 6e 66 6f 72 6d |d to pas|s inform|
|00001580| 61 74 69 6f 6e 20 74 6f | 20 61 6e 6f 74 68 65 72 |ation to| another|
|00001590| 20 70 72 6f 67 72 61 6d | 2e 0a 0a 54 68 65 20 76 | program|...The v|
|000015a0| 61 72 69 61 62 6c 65 20 | 60 73 65 72 76 65 72 2d |ariable |`server-|
|000015b0| 74 65 6d 70 2d 66 69 6c | 65 2d 72 65 67 65 78 70 |temp-fil|e-regexp|
|000015c0| 27 20 63 6f 6e 74 72 6f | 6c 73 20 77 68 69 63 68 |' contro|ls which|
|000015d0| 20 66 69 6c 65 6e 61 6d | 65 73 0a 61 72 65 20 63 | filenam|es.are c|
|000015e0| 6f 6e 73 69 64 65 72 65 | 64 20 74 65 6d 70 6f 72 |onsidere|d tempor|
|000015f0| 61 72 79 2e 22 5d 29 0a | 28 66 73 65 74 20 27 73 |ary."]).|(fset 's|
|00001600| 65 72 76 65 72 2d 64 6f | 6e 65 20 23 5b 6e 69 6c |erver-do|ne #[nil|
|00001610| 20 22 70 18 09 ad a3 c2 | 08 21 ab 8a c3 89 1c 1d | "p.....|.!......|
|00001620| c6 20 88 2a aa 91 c7 20 | ab 8d c8 c9 0e 5c 6e cb |. .*... |.....\n.|
|00001630| 51 21 ab 84 c6 08 21 88 | cc 08 21 29 87 22 20 5b |Q!....!.|..!)." [|
|00001640| 62 75 66 66 65 72 20 73 | 65 72 76 65 72 2d 62 75 |buffer s|erver-bu|
|00001650| 66 66 65 72 2d 63 6c 69 | 65 6e 74 73 20 73 65 72 |ffer-cli|ents ser|
|00001660| 76 65 72 2d 74 65 6d 70 | 2d 66 69 6c 65 2d 70 20 |ver-temp|-file-p |
|00001670| 6e 69 6c 20 62 75 66 66 | 65 72 2d 62 61 63 6b 65 |nil buff|er-backe|
|00001680| 64 2d 75 70 20 76 65 72 | 73 69 6f 6e 2d 63 6f 6e |d-up ver|sion-con|
|00001690| 74 72 6f 6c 20 73 61 76 | 65 2d 62 75 66 66 65 72 |trol sav|e-buffer|
|000016a0| 20 62 75 66 66 65 72 2d | 6d 6f 64 69 66 69 65 64 | buffer-|modified|
|000016b0| 2d 70 20 79 2d 6f 72 2d | 6e 2d 70 20 22 53 61 76 |-p y-or-|n-p "Sav|
|000016c0| 65 20 66 69 6c 65 20 22 | 20 62 75 66 66 65 72 2d |e file "| buffer-|
|000016d0| 66 69 6c 65 2d 6e 61 6d | 65 20 22 3f 20 22 20 73 |file-nam|e "? " s|
|000016e0| 65 72 76 65 72 2d 62 75 | 66 66 65 72 2d 64 6f 6e |erver-bu|ffer-don|
|000016f0| 65 5d 20 34 20 22 5c 0a | 4f 66 66 65 72 20 74 6f |e] 4 "\.|Offer to|
|00001700| 20 73 61 76 65 20 63 75 | 72 72 65 6e 74 20 62 75 | save cu|rrent bu|
|00001710| 66 66 65 72 2c 20 6d 61 | 72 6b 20 69 74 20 61 73 |ffer, ma|rk it as|
|00001720| 20 5c 22 64 6f 6e 65 5c | 22 20 66 6f 72 20 63 6c | \"done\|" for cl|
|00001730| 69 65 6e 74 73 2e 0a 54 | 68 69 73 20 62 75 72 69 |ients..T|his buri|
|00001740| 65 73 20 74 68 65 20 62 | 75 66 66 65 72 2c 20 74 |es the b|uffer, t|
|00001750| 68 65 6e 20 72 65 74 75 | 72 6e 73 20 61 20 6c 69 |hen retu|rns a li|
|00001760| 73 74 20 6f 66 20 74 68 | 65 20 66 6f 72 6d 20 28 |st of th|e form (|
|00001770| 4e 45 58 54 2d 42 55 46 | 46 45 52 20 4b 49 4c 4c |NEXT-BUF|FER KILL|
|00001780| 45 44 29 2e 0a 4e 45 58 | 54 2d 42 55 46 46 45 52 |ED)..NEX|T-BUFFER|
|00001790| 20 69 73 20 61 6e 6f 74 | 68 65 72 20 73 65 72 76 | is anot|her serv|
|000017a0| 65 72 20 62 75 66 66 65 | 72 2c 20 61 73 20 61 20 |er buffe|r, as a |
|000017b0| 73 75 67 67 65 73 74 69 | 6f 6e 20 66 6f 72 20 77 |suggesti|on for w|
|000017c0| 68 61 74 20 74 6f 20 73 | 65 6c 65 63 74 20 6e 65 |hat to s|elect ne|
|000017d0| 78 74 2c 0a 6f 72 20 6e | 69 6c 2e 20 20 4b 49 4c |xt,.or n|il. KIL|
|000017e0| 4c 45 44 20 69 73 20 74 | 20 69 66 20 77 65 20 6b |LED is t| if we k|
|000017f0| 69 6c 6c 65 64 20 74 68 | 65 20 42 55 46 46 45 52 |illed th|e BUFFER|
|00001800| 20 28 62 65 63 61 75 73 | 65 20 69 74 20 77 61 73 | (becaus|e it was|
|00001810| 20 61 20 74 65 6d 70 20 | 66 69 6c 65 29 2e 22 5d | a temp |file)."]|
|00001820| 29 0a 28 62 79 74 65 2d | 63 6f 64 65 20 22 c0 c1 |).(byte-|code "..|
|00001830| 4d 88 c2 c3 c0 5c 22 88 | c4 c5 4d 88 c2 c6 c4 5c |M....\".|..M....\|
|00001840| 22 87 22 20 5b 73 65 72 | 76 65 72 2d 6b 69 6c 6c |"." [ser|ver-kill|
|00001850| 2d 62 75 66 66 65 72 2d | 71 75 65 72 79 2d 66 75 |-buffer-|query-fu|
|00001860| 6e 63 74 69 6f 6e 20 23 | 5b 6e 69 6c 20 22 08 3f |nction #|[nil ".?|
|00001870| ae 88 c1 c2 c3 c4 70 21 | 5c 22 21 87 22 20 5b 73 |......p!|\"!." [s|
|00001880| 65 72 76 65 72 2d 62 75 | 66 66 65 72 2d 63 6c 69 |erver-bu|ffer-cli|
|00001890| 65 6e 74 73 20 79 65 73 | 2d 6f 72 2d 6e 6f 2d 70 |ents yes|-or-no-p|
|000018a0| 20 66 6f 72 6d 61 74 20 | 22 42 75 66 66 65 72 20 | format |"Buffer |
|000018b0| 60 25 73 27 20 73 74 69 | 6c 6c 20 68 61 73 20 63 |`%s' sti|ll has c|
|000018c0| 6c 69 65 6e 74 73 3b 20 | 6b 69 6c 6c 20 69 74 3f |lients; |kill it?|
|000018d0| 20 22 20 62 75 66 66 65 | 72 2d 6e 61 6d 65 5d 20 | " buffe|r-name] |
|000018e0| 35 5d 20 61 64 64 2d 68 | 6f 6f 6b 20 6b 69 6c 6c |5] add-h|ook kill|
|000018f0| 2d 62 75 66 66 65 72 2d | 71 75 65 72 79 2d 66 75 |-buffer-|query-fu|
|00001900| 6e 63 74 69 6f 6e 73 20 | 73 65 72 76 65 72 2d 6b |nctions |server-k|
|00001910| 69 6c 6c 2d 65 6d 61 63 | 73 2d 71 75 65 72 79 2d |ill-emac|s-query-|
|00001920| 66 75 6e 63 74 69 6f 6e | 20 23 5b 6e 69 6c 20 22 |function| #[nil "|
|00001930| c0 09 1a 1b 5c 6e ab 95 | c4 c5 c6 c5 c7 5c 6e 40 |....\n..|.....\n@|
|00001940| 41 5c 22 5c 22 3e ab 82 | c4 13 5c 6e 41 89 12 ac |A\"\">..|..\nA...|
|00001950| 6b 0b 3f ae 83 c8 c9 21 | 2a 87 22 20 5b 6e 69 6c |k.?....!|*." [nil|
|00001960| 20 73 65 72 76 65 72 2d | 63 6c 69 65 6e 74 73 20 | server-|clients |
|00001970| 74 61 69 6c 20 6c 69 76 | 65 2d 63 6c 69 65 6e 74 |tail liv|e-client|
|00001980| 20 74 20 6d 61 70 63 61 | 72 20 73 74 72 69 6e 67 | t mapca|r string|
|00001990| 70 20 62 75 66 66 65 72 | 2d 6e 61 6d 65 20 79 65 |p buffer|-name ye|
|000019a0| 73 2d 6f 72 2d 6e 6f 2d | 70 20 22 53 65 72 76 65 |s-or-no-|p "Serve|
|000019b0| 72 20 62 75 66 66 65 72 | 73 20 73 74 69 6c 6c 20 |r buffer|s still |
|000019c0| 68 61 76 65 20 63 6c 69 | 65 6e 74 73 3b 20 65 78 |have cli|ents; ex|
|000019d0| 69 74 20 61 6e 79 77 61 | 79 3f 20 22 5d 20 37 5d |it anywa|y? "] 7]|
|000019e0| 20 6b 69 6c 6c 2d 65 6d | 61 63 73 2d 71 75 65 72 | kill-em|acs-quer|
|000019f0| 79 2d 66 75 6e 63 74 69 | 6f 6e 73 5d 20 33 29 0a |y-functi|ons] 3).|
|00001a00| 28 66 73 65 74 20 27 73 | 65 72 76 65 72 2d 65 64 |(fset 's|erver-ed|
|00001a10| 69 74 20 23 5b 28 26 6f | 70 74 69 6f 6e 61 6c 20 |it #[(&o|ptional |
|00001a20| 61 72 67 29 20 22 08 ac | 8a 09 ab 87 c2 09 21 c3 |arg) "..|......!.|
|00001a30| 3e ab 84 c4 c5 21 87 c6 | c7 c8 20 5c 22 87 22 20 |>....!..|.. \"." |
|00001a40| 5b 61 72 67 20 73 65 72 | 76 65 72 2d 70 72 6f 63 |[arg ser|ver-proc|
|00001a50| 65 73 73 20 70 72 6f 63 | 65 73 73 2d 73 74 61 74 |ess proc|ess-stat|
|00001a60| 75 73 20 28 73 69 67 6e | 61 6c 20 65 78 69 74 29 |us (sign|al exit)|
|00001a70| 20 73 65 72 76 65 72 2d | 73 74 61 72 74 20 6e 69 | server-|start ni|
|00001a80| 6c 20 61 70 70 6c 79 20 | 73 65 72 76 65 72 2d 73 |l apply |server-s|
|00001a90| 77 69 74 63 68 2d 62 75 | 66 66 65 72 20 73 65 72 |witch-bu|ffer ser|
|00001aa0| 76 65 72 2d 64 6f 6e 65 | 5d 20 33 20 22 5c 0a 53 |ver-done|] 3 "\.S|
|00001ab0| 77 69 74 63 68 20 74 6f | 20 6e 65 78 74 20 73 65 |witch to| next se|
|00001ac0| 72 76 65 72 20 65 64 69 | 74 69 6e 67 20 62 75 66 |rver edi|ting buf|
|00001ad0| 66 65 72 3b 20 73 61 79 | 20 5c 22 44 6f 6e 65 5c |fer; say| \"Done\|
|00001ae0| 22 20 66 6f 72 20 63 75 | 72 72 65 6e 74 20 62 75 |" for cu|rrent bu|
|00001af0| 66 66 65 72 2e 0a 49 66 | 20 61 20 73 65 72 76 65 |ffer..If| a serve|
|00001b00| 72 20 62 75 66 66 65 72 | 20 69 73 20 63 75 72 72 |r buffer| is curr|
|00001b10| 65 6e 74 2c 20 69 74 20 | 69 73 20 6d 61 72 6b 65 |ent, it |is marke|
|00001b20| 64 20 5c 22 64 6f 6e 65 | 5c 22 20 61 6e 64 20 6f |d \"done|\" and o|
|00001b30| 70 74 69 6f 6e 61 6c 6c | 79 20 73 61 76 65 64 2e |ptionall|y saved.|
|00001b40| 0a 57 68 65 6e 20 61 6c | 6c 20 6f 66 20 61 20 63 |.When al|l of a c|
|00001b50| 6c 69 65 6e 74 27 73 20 | 62 75 66 66 65 72 73 20 |lient's |buffers |
|00001b60| 61 72 65 20 6d 61 72 6b | 65 64 20 61 73 20 5c 22 |are mark|ed as \"|
|00001b70| 64 6f 6e 65 5c 22 2c 20 | 74 68 65 20 63 6c 69 65 |done\", |the clie|
|00001b80| 6e 74 20 69 73 20 6e 6f | 74 69 66 69 65 64 2e 0a |nt is no|tified..|
|00001b90| 0a 54 65 6d 70 6f 72 61 | 72 79 20 66 69 6c 65 73 |.Tempora|ry files|
|00001ba0| 20 73 75 63 68 20 61 73 | 20 4d 48 20 3c 64 72 61 | such as| MH <dra|
|00001bb0| 66 74 3e 20 66 69 6c 65 | 73 20 61 72 65 20 61 6c |ft> file|s are al|
|00001bc0| 77 61 79 73 20 73 61 76 | 65 64 20 61 6e 64 20 62 |ways sav|ed and b|
|00001bd0| 61 63 6b 65 64 20 75 70 | 2c 0a 6e 6f 20 71 75 65 |acked up|,.no que|
|00001be0| 73 74 69 6f 6e 73 20 61 | 73 6b 65 64 2e 20 20 28 |stions a|sked. (|
|00001bf0| 54 68 65 20 76 61 72 69 | 61 62 6c 65 20 60 6d 61 |The vari|able `ma|
|00001c00| 6b 65 2d 62 61 63 6b 75 | 70 2d 66 69 6c 65 73 27 |ke-backu|p-files'|
|00001c10| 2c 20 69 66 20 6e 69 6c | 2c 20 73 74 69 6c 6c 0a |, if nil|, still.|
|00001c20| 69 6e 68 69 62 69 74 73 | 20 61 20 62 61 63 6b 75 |inhibits| a backu|
|00001c30| 70 3b 20 79 6f 75 20 63 | 61 6e 20 73 65 74 20 69 |p; you c|an set i|
|00001c40| 74 20 6c 6f 63 61 6c 6c | 79 20 69 6e 20 61 20 70 |t locall|y in a p|
|00001c50| 61 72 74 69 63 75 6c 61 | 72 20 62 75 66 66 65 72 |articula|r buffer|
|00001c60| 20 74 6f 0a 70 72 65 76 | 65 6e 74 20 61 20 62 61 | to.prev|ent a ba|
|00001c70| 63 6b 75 70 20 66 6f 72 | 20 69 74 2e 29 20 20 54 |ckup for| it.) T|
|00001c80| 68 65 20 76 61 72 69 61 | 62 6c 65 20 60 73 65 72 |he varia|ble `ser|
|00001c90| 76 65 72 2d 74 65 6d 70 | 2d 66 69 6c 65 2d 72 65 |ver-temp|-file-re|
|00001ca0| 67 65 78 70 27 20 63 6f | 6e 74 72 6f 6c 73 0a 77 |gexp' co|ntrols.w|
|00001cb0| 68 69 63 68 20 66 69 6c | 65 6e 61 6d 65 73 20 61 |hich fil|enames a|
|00001cc0| 72 65 20 63 6f 6e 73 69 | 64 65 72 65 64 20 74 65 |re consi|dered te|
|00001cd0| 6d 70 6f 72 61 72 79 2e | 0a 0a 49 66 20 69 6e 76 |mporary.|..If inv|
|00001ce0| 6f 6b 65 64 20 77 69 74 | 68 20 61 20 70 72 65 66 |oked wit|h a pref|
|00001cf0| 69 78 20 61 72 67 75 6d | 65 6e 74 2c 20 6f 72 20 |ix argum|ent, or |
|00001d00| 69 66 20 74 68 65 72 65 | 20 69 73 20 6e 6f 20 73 |if there| is no s|
|00001d10| 65 72 76 65 72 20 70 72 | 6f 63 65 73 73 20 72 75 |erver pr|ocess ru|
|00001d20| 6e 6e 69 6e 67 2c 20 0a | 73 74 61 72 74 73 20 73 |nning, .|starts s|
|00001d30| 65 72 76 65 72 20 70 72 | 6f 63 65 73 73 20 61 6e |erver pr|ocess an|
|00001d40| 64 20 74 68 61 74 20 69 | 73 20 61 6c 6c 2e 20 20 |d that i|s all. |
|00001d50| 49 6e 76 6f 6b 65 64 20 | 62 79 20 5c 5c 5b 73 65 |Invoked |by \\[se|
|00001d60| 72 76 65 72 2d 65 64 69 | 74 5d 2e 22 20 22 50 22 |rver-edi|t]." "P"|
|00001d70| 5d 29 0a 28 66 73 65 74 | 20 27 73 65 72 76 65 72 |]).(fset| 'server|
|00001d80| 2d 73 77 69 74 63 68 2d | 62 75 66 66 65 72 20 23 |-switch-|buffer #|
|00001d90| 5b 28 26 6f 70 74 69 6f | 6e 61 6c 20 6e 65 78 74 |[(&optio|nal next|
|00001da0| 2d 62 75 66 66 65 72 20 | 6b 69 6c 6c 65 64 2d 6f |-buffer |killed-o|
|00001db0| 6e 65 29 20 22 c0 09 21 | ab 8b c2 09 21 ab 86 c3 |ne) "..!|....!...|
|00001dc0| 09 21 88 aa 93 c4 09 21 | ab 8e c5 09 21 ac 83 c6 |.!.....!|....!...|
|00001dd0| 20 11 c3 c7 09 21 21 88 | c8 c9 20 21 ab 88 c3 ca | ....!!.|.. !....|
|00001de0| cb cc cd 23 21 88 ce cb | cc cd 23 1e 0f d0 c9 20 |...#!...|..#.... |
|00001df0| 21 ab 91 0e 0f c9 20 3d | ac 8a c3 ca cb cc cd 23 |!..... =|.......#|
|00001e00| 21 88 aa 69 29 d1 c9 20 | cb 5c 22 88 0e 12 ab 99 |!..i).. |.\".....|
|00001e10| d3 0e 12 21 ab 8b d4 0e | 12 21 ab 85 d5 0e 12 21 |...!....|.!.....!|
|00001e20| 87 d6 d7 d8 0e 12 21 5c | 22 87 0e 19 ab 8a d7 0e |......!\|".......|
|00001e30| 19 40 41 40 0e 1a 5c 22 | 87 0e 1a 3f ad 84 d5 db |.@A@..\"|...?....|
|00001e40| 20 21 87 22 20 5b 77 69 | 6e 64 6f 77 70 20 73 65 | !." [wi|ndowp se|
|00001e50| 72 76 65 72 2d 77 69 6e | 64 6f 77 20 77 69 6e 64 |rver-win|dow wind|
|00001e60| 6f 77 2d 6c 69 76 65 2d | 70 20 73 65 6c 65 63 74 |ow-live-|p select|
|00001e70| 2d 77 69 6e 64 6f 77 20 | 66 72 61 6d 65 70 20 66 |-window |framep f|
|00001e80| 72 61 6d 65 2d 6c 69 76 | 65 2d 70 20 6d 61 6b 65 |rame-liv|e-p make|
|00001e90| 2d 66 72 61 6d 65 20 66 | 72 61 6d 65 2d 73 65 6c |-frame f|rame-sel|
|00001ea0| 65 63 74 65 64 2d 77 69 | 6e 64 6f 77 20 77 69 6e |ected-wi|ndow win|
|00001eb0| 64 6f 77 2d 6d 69 6e 69 | 62 75 66 66 65 72 2d 70 |dow-mini|buffer-p|
|00001ec0| 20 73 65 6c 65 63 74 65 | 64 2d 77 69 6e 64 6f 77 | selecte|d-window|
|00001ed0| 20 6e 65 78 74 2d 77 69 | 6e 64 6f 77 20 6e 69 6c | next-wi|ndow nil|
|00001ee0| 20 6e 6f 6d 69 6e 69 20 | 30 20 70 72 65 76 69 6f | nomini |0 previo|
|00001ef0| 75 73 2d 77 69 6e 64 6f | 77 20 6c 61 73 74 2d 77 |us-windo|w last-w|
|00001f00| 69 6e 64 6f 77 20 77 69 | 6e 64 6f 77 2d 64 65 64 |indow wi|ndow-ded|
|00001f10| 69 63 61 74 65 64 2d 70 | 20 73 65 74 2d 77 69 6e |icated-p| set-win|
|00001f20| 64 6f 77 2d 64 65 64 69 | 63 61 74 65 64 2d 70 20 |dow-dedi|cated-p |
|00001f30| 6e 65 78 74 2d 62 75 66 | 66 65 72 20 62 75 66 66 |next-buf|fer buff|
|00001f40| 65 72 70 20 62 75 66 66 | 65 72 2d 6e 61 6d 65 20 |erp buff|er-name |
|00001f50| 73 77 69 74 63 68 2d 74 | 6f 2d 62 75 66 66 65 72 |switch-t|o-buffer|
|00001f60| 20 61 70 70 6c 79 20 73 | 65 72 76 65 72 2d 73 77 | apply s|erver-sw|
|00001f70| 69 74 63 68 2d 62 75 66 | 66 65 72 20 73 65 72 76 |itch-buf|fer serv|
|00001f80| 65 72 2d 62 75 66 66 65 | 72 2d 64 6f 6e 65 20 73 |er-buffe|r-done s|
|00001f90| 65 72 76 65 72 2d 63 6c | 69 65 6e 74 73 20 6b 69 |erver-cl|ients ki|
|00001fa0| 6c 6c 65 64 2d 6f 6e 65 | 20 6f 74 68 65 72 2d 62 |lled-one| other-b|
|00001fb0| 75 66 66 65 72 5d 20 35 | 20 22 5c 0a 53 77 69 74 |uffer] 5| "\.Swit|
|00001fc0| 63 68 20 74 6f 20 61 6e | 6f 74 68 65 72 20 62 75 |ch to an|other bu|
|00001fd0| 66 66 65 72 2c 20 70 72 | 65 66 65 72 61 62 6c 79 |ffer, pr|eferably|
|00001fe0| 20 6f 6e 65 20 74 68 61 | 74 20 68 61 73 20 61 20 | one tha|t has a |
|00001ff0| 63 6c 69 65 6e 74 2e 0a | 41 72 67 20 4e 45 58 54 |client..|Arg NEXT|
|00002000| 2d 42 55 46 46 45 52 20 | 69 73 20 61 20 73 75 67 |-BUFFER |is a sug|
|00002010| 67 65 73 74 69 6f 6e 3b | 20 69 66 20 69 74 20 69 |gestion;| if it i|
|00002020| 73 20 61 20 6c 69 76 65 | 20 62 75 66 66 65 72 2c |s a live| buffer,|
|00002030| 20 75 73 65 20 69 74 2e | 22 5d 29 0a 28 62 79 74 | use it.|"]).(byt|
|00002040| 65 2d 63 6f 64 65 20 22 | c0 c1 c2 5c 22 88 c3 c4 |e-code "|...\"...|
|00002050| 21 87 22 20 5b 67 6c 6f | 62 61 6c 2d 73 65 74 2d |!." [glo|bal-set-|
|00002060| 6b 65 79 20 22 18 23 22 | 20 73 65 72 76 65 72 2d |key ".#"| server-|
|00002070| 65 64 69 74 20 70 72 6f | 76 69 64 65 20 73 65 72 |edit pro|vide ser|
|00002080| 76 65 72 5d 20 33 29 0a | |ver] 3).| |
+--------+-------------------------+-------------------------+--------+--------+