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 / file-part.elc < prev    next >
Emacs Compiled Lisp  |  1995-08-29  |  7.0 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 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 33 3a 32 | 37 20 31 39 39 35 0a 3b | 14:13:2|7 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 66 |/lisp/pa|ckages/f|
|00000090| 69 6c 65 2d 70 61 72 74 | 2e 65 6c 0a 3b 3b 3b 20 |ile-part|.el.;;; |
|000000a0| 65 6d 61 63 73 20 76 65 | 72 73 69 6f 6e 20 31 39 |emacs ve|rsion 19|
|000000b0| 2e 31 33 20 58 45 6d 61 | 63 73 20 4c 75 63 69 64 |.13 XEma|cs Lucid|
|000000c0| 2e 0a 3b 3b 3b 20 62 79 | 74 65 63 6f 6d 70 20 76 |..;;; by|tecomp v|
|000000d0| 65 72 73 69 6f 6e 20 32 | 2e 32 35 3b 20 31 2d 53 |ersion 2|.25; 1-S|
|000000e0| 65 70 2d 39 34 2e 0a 3b | 3b 3b 20 6f 70 74 69 6d |ep-94..;|;; optim|
|000000f0| 69 7a 61 74 69 6f 6e 20 | 69 73 20 6f 6e 2e 0a 3b |ization |is on..;|
|00000100| 3b 3b 20 74 68 69 73 20 | 66 69 6c 65 20 75 73 65 |;; this |file use|
|00000110| 73 20 6f 70 63 6f 64 65 | 73 20 77 68 69 63 68 20 |s opcode|s which |
|00000120| 64 6f 20 6e 6f 74 20 65 | 78 69 73 74 20 69 6e 20 |do not e|xist in |
|00000130| 45 6d 61 63 73 20 31 38 | 2e 0a 0a 28 69 66 20 28 |Emacs 18|...(if (|
|00000140| 61 6e 64 20 28 62 6f 75 | 6e 64 70 20 27 65 6d 61 |and (bou|ndp 'ema|
|00000150| 63 73 2d 76 65 72 73 69 | 6f 6e 29 0a 09 20 28 6f |cs-versi|on).. (o|
|00000160| 72 20 28 61 6e 64 20 28 | 62 6f 75 6e 64 70 20 27 |r (and (|boundp '|
|00000170| 65 70 6f 63 68 3a 3a 76 | 65 72 73 69 6f 6e 29 20 |epoch::v|ersion) |
|00000180| 65 70 6f 63 68 3a 3a 76 | 65 72 73 69 6f 6e 29 0a |epoch::v|ersion).|
|00000190| 09 20 20 20 20 20 28 73 | 74 72 69 6e 67 2d 6c 65 |. (s|tring-le|
|000001a0| 73 73 70 20 65 6d 61 63 | 73 2d 76 65 72 73 69 6f |ssp emac|s-versio|
|000001b0| 6e 20 22 31 39 22 29 29 | 29 0a 20 20 20 20 28 65 |n "19"))|). (e|
|000001c0| 72 72 6f 72 20 22 54 68 | 69 73 20 66 69 6c 65 20 |rror "Th|is file |
|000001d0| 77 61 73 20 63 6f 6d 70 | 69 6c 65 64 20 66 6f 72 |was comp|iled for|
|000001e0| 20 45 6d 61 63 73 20 31 | 39 2e 22 29 29 0a 0a 28 | Emacs 1|9."))..(|
|000001f0| 62 79 74 65 2d 63 6f 64 | 65 20 22 c0 c1 21 88 c2 |byte-cod|e "..!..|
|00000200| c3 c4 c5 23 88 c2 c3 c6 | c7 23 87 22 20 5b 70 72 |...#....|.#." [pr|
|00000210| 6f 76 69 64 65 20 66 69 | 6c 65 2d 70 61 72 74 20 |ovide fi|le-part |
|00000220| 70 75 74 20 66 69 6c 65 | 2d 70 61 72 74 2d 65 72 |put file|-part-er|
|00000230| 72 6f 72 20 65 72 72 6f | 72 2d 63 6f 6e 64 69 74 |ror erro|r-condit|
|00000240| 69 6f 6e 73 20 28 65 72 | 72 6f 72 20 66 69 6c 65 |ions (er|ror file|
|00000250| 2d 70 61 72 74 2d 65 72 | 72 6f 72 29 20 65 72 72 |-part-er|ror) err|
|00000260| 6f 72 2d 6d 65 73 73 61 | 67 65 20 22 46 69 6c 65 |or-messa|ge "File|
|00000270| 20 70 61 72 74 20 65 72 | 72 6f 72 22 5d 20 34 29 | part er|ror"] 4)|
|00000280| 0a 28 64 65 66 76 61 72 | 20 66 69 6c 65 2d 70 61 |.(defvar| file-pa|
|00000290| 72 74 2d 65 78 74 65 6e | 74 2d 61 6c 69 73 74 20 |rt-exten|t-alist |
|000002a0| 6e 69 6c 20 22 5c 0a 41 | 6c 69 73 74 20 6f 66 20 |nil "\.A|list of |
|000002b0| 66 69 6c 65 20 70 61 72 | 74 73 20 69 6e 20 74 68 |file par|ts in th|
|000002c0| 65 20 63 75 72 72 65 6e | 74 20 62 75 66 66 65 72 |e curren|t buffer|
|000002d0| 2e 0a 45 61 63 68 20 65 | 6c 65 6d 65 6e 74 20 6f |..Each e|lement o|
|000002e0| 66 20 74 68 65 20 61 6c | 69 73 74 20 6d 61 70 73 |f the al|ist maps|
|000002f0| 20 61 6e 20 65 78 74 65 | 6e 74 20 64 65 73 63 72 | an exte|nt descr|
|00000300| 69 62 69 6e 67 20 74 68 | 65 20 66 69 6c 65 20 70 |ibing th|e file p|
|00000310| 61 72 74 0a 74 6f 20 74 | 68 65 20 62 75 66 66 65 |art.to t|he buffe|
|00000320| 72 20 63 6f 6e 74 61 69 | 6e 69 6e 67 20 74 68 65 |r contai|ning the|
|00000330| 20 66 69 6c 65 20 70 61 | 72 74 2e 20 20 44 4f 4e | file pa|rt. DON|
|00000340| 27 54 20 4d 4f 44 49 46 | 59 20 54 48 49 53 2e 22 |'T MODIF|Y THIS."|
|00000350| 29 0a 28 62 79 74 65 2d | 63 6f 64 65 20 22 c0 c1 |).(byte-|code "..|
|00000360| 21 88 c2 c1 c3 5c 22 87 | 22 20 5b 6d 61 6b 65 2d |!....\".|" [make-|
|00000370| 76 61 72 69 61 62 6c 65 | 2d 62 75 66 66 65 72 2d |variable|-buffer-|
|00000380| 6c 6f 63 61 6c 20 66 69 | 6c 65 2d 70 61 72 74 2d |local fi|le-part-|
|00000390| 65 78 74 65 6e 74 2d 61 | 6c 69 73 74 20 73 65 74 |extent-a|list set|
|000003a0| 2d 64 65 66 61 75 6c 74 | 20 6e 69 6c 5d 20 33 29 |-default| nil] 3)|
|000003b0| 0a 28 64 65 66 76 61 72 | 20 66 69 6c 65 2d 70 61 |.(defvar| file-pa|
|000003c0| 72 74 2d 6d 61 73 74 65 | 72 2d 65 78 74 65 6e 74 |rt-maste|r-extent|
|000003d0| 20 6e 69 6c 20 22 5c 0a | 45 78 74 65 6e 74 20 74 | nil "\.|Extent t|
|000003e0| 68 69 73 20 66 69 6c 65 | 20 70 61 72 74 20 72 65 |his file| part re|
|000003f0| 66 65 72 73 20 74 6f 20 | 69 6e 20 74 68 65 20 6d |fers to |in the m|
|00000400| 61 73 74 65 72 20 62 75 | 66 66 65 72 2e 0a 4e 49 |aster bu|ffer..NI|
|00000410| 4c 20 69 66 20 74 68 69 | 73 20 62 75 66 66 65 72 |L if thi|s buffer|
|00000420| 20 69 73 20 6e 6f 74 20 | 61 20 66 69 6c 65 20 70 | is not |a file p|
|00000430| 61 72 74 2e 20 20 54 68 | 65 20 6d 61 73 74 65 72 |art. Th|e master|
|00000440| 20 62 75 66 66 65 72 20 | 69 74 73 65 6c 66 0a 63 | buffer |itself.c|
|00000450| 61 6e 20 62 65 20 66 6f | 75 6e 64 20 62 79 20 63 |an be fo|und by c|
|00000460| 61 6c 6c 69 6e 67 20 60 | 65 78 74 65 6e 74 2d 62 |alling `|extent-b|
|00000470| 75 66 66 65 72 27 20 6f | 6e 20 74 68 69 73 20 65 |uffer' o|n this e|
|00000480| 78 74 65 6e 74 2e 0a 44 | 4f 4e 27 54 20 4d 4f 44 |xtent..D|ON'T MOD|
|00000490| 49 46 59 20 54 48 49 53 | 2e 22 29 0a 28 62 79 74 |IFY THIS|.").(byt|
|000004a0| 65 2d 63 6f 64 65 20 22 | c0 c1 21 88 c2 c1 c3 5c |e-code "|..!....\|
|000004b0| 22 88 c1 0c 9e ac 84 0c | c5 42 14 c6 c7 4d 88 c8 |".......|.B...M..|
|000004c0| c9 4d 87 22 20 5b 6d 61 | 6b 65 2d 76 61 72 69 61 |.M." [ma|ke-varia|
|000004d0| 62 6c 65 2d 62 75 66 66 | 65 72 2d 6c 6f 63 61 6c |ble-buff|er-local|
|000004e0| 20 66 69 6c 65 2d 70 61 | 72 74 2d 6d 61 73 74 65 | file-pa|rt-maste|
|000004f0| 72 2d 65 78 74 65 6e 74 | 20 73 65 74 2d 64 65 66 |r-extent| set-def|
|00000500| 61 75 6c 74 20 6e 69 6c | 20 6d 69 6e 6f 72 2d 6d |ault nil| minor-m|
|00000510| 6f 64 65 2d 61 6c 69 73 | 74 20 28 28 66 69 6c 65 |ode-alis|t ((file|
|00000520| 2d 70 61 72 74 2d 6d 61 | 73 74 65 72 2d 65 78 74 |-part-ma|ster-ext|
|00000530| 65 6e 74 20 22 20 46 69 | 6c 65 2d 70 61 72 74 22 |ent " Fi|le-part"|
|00000540| 29 29 20 66 69 6c 65 2d | 70 61 72 74 2d 6d 61 70 |)) file-|part-map|
|00000550| 74 72 75 65 20 23 5b 28 | 66 6e 20 6c 69 73 74 29 |true #[(|fn list)|
|00000560| 20 22 08 ac 82 c1 87 5c | 6e 08 40 21 ae 85 c3 5c | ".....\|n.@!...\|
|00000570| 6e 08 41 5c 22 87 22 20 | 5b 6c 69 73 74 20 6e 69 |n.A\"." |[list ni|
|00000580| 6c 20 66 6e 20 66 69 6c | 65 2d 70 61 72 74 2d 6d |l fn fil|e-part-m|
|00000590| 61 70 74 72 75 65 5d 20 | 33 5d 20 66 69 6c 65 2d |aptrue] |3] file-|
|000005a0| 70 61 72 74 2d 62 75 66 | 66 65 72 2d 66 72 6f 6d |part-buf|fer-from|
|000005b0| 2d 61 72 67 20 23 5b 28 | 61 72 67 29 20 22 c0 09 |-arg #[(|arg) "..|
|000005c0| ae 81 70 21 87 22 20 5b | 67 65 74 2d 62 75 66 66 |..p!." [|get-buff|
|000005d0| 65 72 20 61 72 67 5d 20 | 32 5d 5d 20 33 29 0a 28 |er arg] |2]] 3).(|
|000005e0| 66 73 65 74 20 27 6d 61 | 6b 65 2d 66 69 6c 65 2d |fset 'ma|ke-file-|
|000005f0| 70 61 72 74 20 23 5b 28 | 26 6f 70 74 69 6f 6e 61 |part #[(|&optiona|
|00000600| 6c 20 73 74 61 72 74 20 | 65 6e 64 20 6e 61 6d 65 |l start |end name|
|00000610| 20 62 75 66 66 65 72 29 | 20 22 c0 09 21 11 5c 6e | buffer)| "..!.\n|
|00000620| ac 82 65 12 0b ac 82 64 | 13 0c ac 86 c5 09 21 c6 |..e....d|......!.|
|00000630| 50 14 5c 6e 0b 56 3f 85 | a3 00 09 71 88 c7 c8 21 |P.\n.V?.|...q...!|
|00000640| 88 c7 c9 21 88 c7 ca 21 | 88 cb c8 cc 5c 22 88 cb |...!...!|....\"..|
|00000650| c9 cd 5c 22 88 ce 16 5c | 6e cf d0 0e 11 5c 22 ab |..\"...\|n....\".|
|00000660| 87 d2 d3 d4 09 44 5c 22 | 87 d5 5c 6e 0b 5c 22 d6 |.....D\"|..\n.\".|
|00000670| 0c 21 1e 17 1e 18 d9 0e | 18 da db 23 88 0e 18 0e |.!......|...#....|
|00000680| 17 42 0e 11 42 16 11 dc | 0e 17 21 88 dd c5 09 21 |.B..B...|..!....!|
|00000690| 50 16 1e c7 df 21 88 c7 | c9 21 88 c7 ca 21 88 c7 |P....!..|.!...!..|
|000006a0| e0 21 88 cb df e1 5c 22 | 88 cb c9 e2 5c 22 88 e3 |.!....\"|....\"..|
|000006b0| 16 5c 6e 0e 18 16 24 e5 | 09 5c 6e 0b 23 88 cb e0 |.\n...$.|.\n.#...|
|000006c0| e6 5c 22 88 e7 e8 21 88 | 0e 17 2a 87 22 20 5b 66 |.\"...!.|..*." [f|
|000006d0| 69 6c 65 2d 70 61 72 74 | 2d 62 75 66 66 65 72 2d |ile-part|-buffer-|
|000006e0| 66 72 6f 6d 2d 61 72 67 | 20 62 75 66 66 65 72 20 |from-arg| buffer |
|000006f0| 73 74 61 72 74 20 65 6e | 64 20 6e 61 6d 65 20 62 |start en|d name b|
|00000700| 75 66 66 65 72 2d 6e 61 | 6d 65 20 22 2d 70 61 72 |uffer-na|me "-par|
|00000710| 74 22 20 6d 61 6b 65 2d | 6c 6f 63 61 6c 2d 76 61 |t" make-|local-va|
|00000720| 72 69 61 62 6c 65 20 77 | 72 69 74 65 2d 63 6f 6e |riable w|rite-con|
|00000730| 74 65 6e 74 73 2d 68 6f | 6f 6b 73 20 6b 69 6c 6c |tents-ho|oks kill|
|00000740| 2d 62 75 66 66 65 72 2d | 68 6f 6f 6b 20 72 65 76 |-buffer-|hook rev|
|00000750| 65 72 74 2d 62 75 66 66 | 65 72 2d 66 75 6e 63 74 |ert-buff|er-funct|
|00000760| 69 6f 6e 20 61 64 64 2d | 68 6f 6f 6b 20 77 72 69 |ion add-|hook wri|
|00000770| 74 65 2d 6d 61 73 74 65 | 72 2d 62 75 66 66 65 72 |te-maste|r-buffer|
|00000780| 2d 68 6f 6f 6b 20 6b 69 | 6c 6c 2d 6d 61 73 74 65 |-hook ki|ll-maste|
|00000790| 72 2d 62 75 66 66 65 72 | 2d 68 6f 6f 6b 20 72 65 |r-buffer|-hook re|
|000007a0| 76 65 72 74 2d 6d 61 73 | 74 65 72 2d 62 75 66 66 |vert-mas|ter-buff|
|000007b0| 65 72 2d 66 75 6e 63 74 | 69 6f 6e 20 66 69 6c 65 |er-funct|ion file|
|000007c0| 2d 70 61 72 74 2d 6d 61 | 70 74 72 75 65 20 23 5b |-part-ma|ptrue #[|
|000007d0| 28 78 29 20 22 c0 09 40 | 21 c2 09 40 21 1b 89 1c |(x) "..@|!..@!...|
|000007e0| a7 ad 99 0b a7 ad 95 0c | 0d 58 ab 85 0b 0d 58 ae |........|.X....X.|
|000007f0| 8a 0c 0e 06 59 ad 84 0b | 0e 06 59 3f 2a 87 22 20 |....Y...|..Y?*." |
|00000800| 5b 65 78 74 65 6e 74 2d | 73 74 61 72 74 2d 70 6f |[extent-|start-po|
|00000810| 73 69 74 69 6f 6e 20 78 | 20 65 78 74 65 6e 74 2d |sition x| extent-|
|00000820| 65 6e 64 2d 70 6f 73 69 | 74 69 6f 6e 20 65 20 62 |end-posi|tion e b|
|00000830| 20 73 74 61 72 74 20 65 | 6e 64 5d 20 34 5d 20 66 | start e|nd] 4] f|
|00000840| 69 6c 65 2d 70 61 72 74 | 2d 65 78 74 65 6e 74 2d |ile-part|-extent-|
|00000850| 61 6c 69 73 74 20 73 69 | 67 6e 61 6c 20 66 69 6c |alist si|gnal fil|
|00000860| 65 2d 70 61 72 74 2d 65 | 72 72 6f 72 20 22 4f 76 |e-part-e|rror "Ov|
|00000870| 65 72 6c 61 70 70 69 6e | 67 20 66 69 6c 65 20 70 |erlappin|g file p|
|00000880| 61 72 74 73 20 6e 6f 74 | 20 61 6c 6c 6f 77 65 64 |arts not| allowed|
|00000890| 22 20 6d 61 6b 65 2d 65 | 78 74 65 6e 74 20 67 65 |" make-e|xtent ge|
|000008a0| 6e 65 72 61 74 65 2d 6e | 65 77 2d 62 75 66 66 65 |nerate-n|ew-buffe|
|000008b0| 72 20 66 69 6c 65 62 75 | 66 20 78 20 73 65 74 2d |r filebu|f x set-|
|000008c0| 65 78 74 65 6e 74 2d 70 | 72 6f 70 65 72 74 79 20 |extent-p|roperty |
|000008d0| 72 65 61 64 2d 6f 6e 6c | 79 20 74 20 73 77 69 74 |read-onl|y t swit|
|000008e0| 63 68 2d 74 6f 2d 62 75 | 66 66 65 72 20 22 46 69 |ch-to-bu|ffer "Fi|
|000008f0| 6c 65 20 70 61 72 74 20 | 6f 6e 20 22 20 62 75 66 |le part |on " buf|
|00000900| 66 65 72 2d 66 69 6c 65 | 2d 6e 61 6d 65 20 77 72 |fer-file|-name wr|
|00000910| 69 74 65 2d 66 69 6c 65 | 2d 68 6f 6f 6b 73 20 66 |ite-file|-hooks f|
|00000920| 69 72 73 74 2d 63 68 61 | 6e 67 65 2d 68 6f 6f 6b |irst-cha|nge-hook|
|00000930| 20 77 72 69 74 65 2d 66 | 69 6c 65 2d 70 61 72 74 | write-f|ile-part|
|00000940| 2d 68 6f 6f 6b 20 6b 69 | 6c 6c 2d 66 69 6c 65 2d |-hook ki|ll-file-|
|00000950| 70 61 72 74 2d 68 6f 6f | 6b 20 72 65 76 65 72 74 |part-hoo|k revert|
|00000960| 2d 66 69 6c 65 2d 70 61 | 72 74 2d 66 75 6e 63 74 |-file-pa|rt-funct|
|00000970| 69 6f 6e 20 66 69 6c 65 | 2d 70 61 72 74 2d 6d 61 |ion file|-part-ma|
|00000980| 73 74 65 72 2d 65 78 74 | 65 6e 74 20 69 6e 73 65 |ster-ext|ent inse|
|00000990| 72 74 2d 62 75 66 66 65 | 72 2d 73 75 62 73 74 72 |rt-buffe|r-substr|
|000009a0| 69 6e 67 20 66 69 6c 65 | 2d 70 61 72 74 2d 66 69 |ing file|-part-fi|
|000009b0| 72 73 74 2d 63 68 61 6e | 67 65 2d 68 6f 6f 6b 20 |rst-chan|ge-hook |
|000009c0| 73 65 74 2d 62 75 66 66 | 65 72 2d 6d 6f 64 69 66 |set-buff|er-modif|
|000009d0| 69 65 64 2d 70 20 6e 69 | 6c 5d 20 34 20 22 5c 0a |ied-p ni|l] 4 "\.|
|000009e0| 4d 61 6b 65 20 61 20 66 | 69 6c 65 20 70 61 72 74 |Make a f|ile part|
|000009f0| 20 6f 6e 20 62 75 66 66 | 65 72 20 42 55 46 46 45 | on buff|er BUFFE|
|00000a00| 52 20 6f 75 74 20 6f 66 | 20 74 68 65 20 72 65 67 |R out of| the reg|
|00000a10| 69 6f 6e 2e 20 20 43 61 | 6c 6c 20 69 74 20 4e 41 |ion. Ca|ll it NA|
|00000a20| 4d 45 2e 0a 54 68 69 73 | 20 63 6f 6d 6d 61 6e 64 |ME..This| command|
|00000a30| 20 63 72 65 61 74 65 73 | 20 61 20 6e 65 77 20 62 | creates| a new b|
|00000a40| 75 66 66 65 72 20 63 6f | 6e 74 61 69 6e 69 6e 67 |uffer co|ntaining|
|00000a50| 20 74 68 65 20 63 6f 6e | 74 65 6e 74 73 20 6f 66 | the con|tents of|
|00000a60| 20 74 68 65 0a 72 65 67 | 69 6f 6e 20 61 6e 64 20 | the.reg|ion and |
|00000a70| 6d 61 72 6b 73 20 74 68 | 65 20 62 75 66 66 65 72 |marks th|e buffer|
|00000a80| 20 61 73 20 72 65 66 65 | 72 72 69 6e 67 20 74 6f | as refe|rring to|
|00000a90| 20 74 68 65 20 73 70 65 | 63 69 66 69 65 64 20 62 | the spe|cified b|
|00000aa0| 75 66 66 65 72 2c 0a 63 | 61 6c 6c 65 64 20 74 68 |uffer,.c|alled th|
|00000ab0| 65 20 60 6d 61 73 74 65 | 72 20 62 75 66 66 65 72 |e `maste|r buffer|
|00000ac0| 27 2e 20 20 57 68 65 6e | 20 74 68 65 20 66 69 6c |'. When| the fil|
|00000ad0| 65 2d 70 61 72 74 20 62 | 75 66 66 65 72 20 69 73 |e-part b|uffer is|
|00000ae0| 20 73 61 76 65 64 2c 0a | 69 74 73 20 63 68 61 6e | saved,.|its chan|
|00000af0| 67 65 73 20 61 72 65 20 | 69 6e 74 65 67 72 61 74 |ges are |integrat|
|00000b00| 65 64 20 62 61 63 6b 20 | 69 6e 74 6f 20 74 68 65 |ed back |into the|
|00000b10| 20 6d 61 73 74 65 72 20 | 62 75 66 66 65 72 2e 20 | master |buffer. |
|00000b20| 20 57 68 65 6e 20 74 68 | 65 0a 6d 61 73 74 65 72 | When th|e.master|
|00000b30| 20 62 75 66 66 65 72 20 | 69 73 20 64 65 6c 65 74 | buffer |is delet|
|00000b40| 65 64 2c 20 61 6c 6c 20 | 66 69 6c 65 20 70 61 72 |ed, all |file par|
|00000b50| 74 73 20 61 72 65 20 64 | 65 6c 65 74 65 64 20 77 |ts are d|eleted w|
|00000b60| 69 74 68 20 69 74 2e 0a | 0a 57 68 65 6e 20 63 61 |ith it..|.When ca|
|00000b70| 6c 6c 65 64 20 66 72 6f | 6d 20 61 20 66 75 6e 63 |lled fro|m a func|
|00000b80| 74 69 6f 6e 2c 20 65 78 | 70 65 63 74 73 20 66 6f |tion, ex|pects fo|
|00000b90| 75 72 20 61 72 67 75 6d | 65 6e 74 73 2c 20 53 54 |ur argum|ents, ST|
|00000ba0| 41 52 54 2c 20 45 4e 44 | 2c 0a 4e 41 4d 45 2c 20 |ART, END|,.NAME, |
|00000bb0| 61 6e 64 20 42 55 46 46 | 45 52 2c 20 61 6c 6c 20 |and BUFF|ER, all |
|00000bc0| 6f 66 20 77 68 69 63 68 | 20 61 72 65 20 6f 70 74 |of which| are opt|
|00000bd0| 69 6f 6e 61 6c 20 61 6e | 64 20 64 65 66 61 75 6c |ional an|d defaul|
|00000be0| 74 20 74 6f 20 74 68 65 | 0a 62 65 67 69 6e 6e 69 |t to the|.beginni|
|00000bf0| 6e 67 20 6f 66 20 42 55 | 46 46 45 52 2c 20 74 68 |ng of BU|FFER, th|
|00000c00| 65 20 65 6e 64 20 6f 66 | 20 42 55 46 46 45 52 2c |e end of| BUFFER,|
|00000c10| 20 61 20 6e 61 6d 65 20 | 67 65 6e 65 72 61 74 65 | a name |generate|
|00000c20| 64 20 66 72 6f 6d 0a 42 | 55 46 46 45 52 27 73 20 |d from.B|UFFER's |
|00000c30| 6e 61 6d 65 2c 20 61 6e | 64 20 74 68 65 20 63 75 |name, an|d the cu|
|00000c40| 72 72 65 6e 74 20 62 75 | 66 66 65 72 2c 20 72 65 |rrent bu|ffer, re|
|00000c50| 73 70 65 63 74 69 76 65 | 6c 79 2e 22 20 22 72 5c |spective|ly." "r\|
|00000c60| 6e 73 4e 61 6d 65 20 6f | 66 20 66 69 6c 65 20 70 |nsName o|f file p|
|00000c70| 61 72 74 3a 20 22 5d 29 | 0a 28 66 73 65 74 20 27 |art: "])|.(fset '|
|00000c80| 6b 69 6c 6c 2d 66 69 6c | 65 2d 70 61 72 74 2d 68 |kill-fil|e-part-h|
|00000c90| 6f 6f 6b 20 23 5b 6e 69 | 6c 20 22 08 70 19 89 1a |ook #[ni|l ".p...|
|00000ca0| ad 91 8a c3 5c 6e 21 71 | 88 c4 5c 6e 09 42 0d 5c |....\n!q|..\n.B.\|
|00000cb0| 22 15 c6 5c 6e 21 29 2a | 87 22 20 5b 66 69 6c 65 |"..\n!)*|." [file|
|00000cc0| 2d 70 61 72 74 2d 6d 61 | 73 74 65 72 2d 65 78 74 |-part-ma|ster-ext|
|00000cd0| 65 6e 74 20 62 75 66 20 | 78 20 65 78 74 65 6e 74 |ent buf |x extent|
|00000ce0| 2d 62 75 66 66 65 72 20 | 64 65 6c 65 74 65 20 66 |-buffer |delete f|
|00000cf0| 69 6c 65 2d 70 61 72 74 | 2d 65 78 74 65 6e 74 2d |ile-part|-extent-|
|00000d00| 61 6c 69 73 74 20 64 65 | 6c 65 74 65 2d 65 78 74 |alist de|lete-ext|
|00000d10| 65 6e 74 5d 20 34 20 22 | 5c 0a 48 6f 6f 6b 20 74 |ent] 4 "|\.Hook t|
|00000d20| 6f 20 62 65 20 63 61 6c | 6c 65 64 20 77 68 65 6e |o be cal|led when|
|00000d30| 20 61 20 66 69 6c 65 2d | 70 61 72 74 20 62 75 66 | a file-|part buf|
|00000d40| 66 65 72 20 69 73 20 6b | 69 6c 6c 65 64 2e 0a 52 |fer is k|illed..R|
|00000d50| 65 6d 6f 76 65 73 20 74 | 68 65 20 66 69 6c 65 20 |emoves t|he file |
|00000d60| 70 61 72 74 20 66 72 6f | 6d 20 74 68 65 20 6d 61 |part fro|m the ma|
|00000d70| 73 74 65 72 20 62 75 66 | 66 65 72 27 73 20 6c 69 |ster buf|fer's li|
|00000d80| 73 74 20 6f 66 20 66 69 | 6c 65 20 70 61 72 74 73 |st of fi|le parts|
|00000d90| 2e 22 5d 29 0a 28 66 73 | 65 74 20 27 6b 69 6c 6c |."]).(fs|et 'kill|
|00000da0| 2d 61 6c 6c 2d 66 69 6c | 65 2d 70 61 72 74 73 20 |-all-fil|e-parts |
|00000db0| 23 5b 28 26 6f 70 74 69 | 6f 6e 61 6c 20 62 75 66 |#[(&opti|onal buf|
|00000dc0| 6e 61 6d 65 20 6e 6f 2d | 61 73 6b 29 20 22 c0 09 |name no-|ask) "..|
|00000dd0| 21 11 8a 09 71 88 5c 6e | ac 8a c3 09 21 ab 85 c4 |!...q.\n|....!...|
|00000de0| c5 21 ad 85 c6 c7 0e 08 | 5c 22 29 87 22 20 5b 66 |.!......|\")." [f|
|00000df0| 69 6c 65 2d 70 61 72 74 | 2d 62 75 66 66 65 72 2d |ile-part|-buffer-|
|00000e00| 66 72 6f 6d 2d 61 72 67 | 20 62 75 66 6e 61 6d 65 |from-arg| bufname|
|00000e10| 20 6e 6f 2d 61 73 6b 20 | 66 69 6c 65 2d 70 61 72 | no-ask |file-par|
|00000e20| 74 73 2d 6d 6f 64 69 66 | 69 65 64 2d 70 20 79 2d |ts-modif|ied-p y-|
|00000e30| 6f 72 2d 6e 2d 70 20 22 | 42 75 66 66 65 72 20 68 |or-n-p "|Buffer h|
|00000e40| 61 73 20 6d 6f 64 69 66 | 69 65 64 20 66 69 6c 65 |as modif|ied file|
|00000e50| 20 70 61 72 74 73 3b 20 | 6b 69 6c 6c 20 61 6e 79 | parts; |kill any|
|00000e60| 77 61 79 3f 20 22 20 6d | 61 70 63 61 72 20 23 5b |way? " m|apcar #[|
|00000e70| 28 78 29 20 22 08 41 71 | 88 c1 c2 21 88 c3 08 41 |(x) ".Aq|...!...A|
|00000e80| 21 87 22 20 5b 78 20 73 | 65 74 2d 62 75 66 66 65 |!." [x s|et-buffe|
|00000e90| 72 2d 6d 6f 64 69 66 69 | 65 64 2d 70 20 6e 69 6c |r-modifi|ed-p nil|
|00000ea0| 20 6b 69 6c 6c 2d 62 75 | 66 66 65 72 5d 20 32 5d | kill-bu|ffer] 2]|
|00000eb0| 20 66 69 6c 65 2d 70 61 | 72 74 2d 65 78 74 65 6e | file-pa|rt-exten|
|00000ec0| 74 2d 61 6c 69 73 74 5d | 20 33 20 22 5c 0a 4b 69 |t-alist]| 3 "\.Ki|
|00000ed0| 6c 6c 20 61 6c 6c 20 66 | 69 6c 65 20 70 61 72 74 |ll all f|ile part|
|00000ee0| 73 20 6f 6e 20 62 75 66 | 66 65 72 20 42 55 46 4e |s on buf|fer BUFN|
|00000ef0| 41 4d 45 2e 0a 54 68 65 | 20 61 72 67 75 6d 65 6e |AME..The| argumen|
|00000f00| 74 20 6d 61 79 20 62 65 | 20 61 20 62 75 66 66 65 |t may be| a buffe|
|00000f10| 72 20 6f 72 20 74 68 65 | 20 6e 61 6d 65 20 6f 66 |r or the| name of|
|00000f20| 20 61 20 62 75 66 66 65 | 72 2e 0a 49 66 20 6f 6e | a buffe|r..If on|
|00000f30| 65 20 6f 72 20 6d 6f 72 | 65 20 6f 66 20 74 68 65 |e or mor|e of the|
|00000f40| 20 66 69 6c 65 20 70 61 | 72 74 73 20 6e 65 65 64 | file pa|rts need|
|00000f50| 73 20 73 61 76 69 6e 67 | 2c 20 70 72 6f 6d 70 74 |s saving|, prompt|
|00000f60| 73 20 66 6f 72 0a 63 6f | 6e 66 69 72 6d 61 74 69 |s for.co|nfirmati|
|00000f70| 6f 6e 20 75 6e 6c 65 73 | 73 20 6f 70 74 69 6f 6e |on unles|s option|
|00000f80| 61 6c 20 73 65 63 6f 6e | 64 20 61 72 67 75 6d 65 |al secon|d argume|
|00000f90| 6e 74 20 4e 4f 2d 41 53 | 4b 20 69 73 20 6e 6f 6e |nt NO-AS|K is non|
|00000fa0| 2d 6e 69 6c 2e 0a 42 55 | 46 46 45 52 20 64 65 66 |-nil..BU|FFER def|
|00000fb0| 61 75 6c 74 73 20 74 6f | 20 74 68 65 20 63 75 72 |aults to| the cur|
|00000fc0| 72 65 6e 74 20 62 75 66 | 66 65 72 20 69 66 20 6e |rent buf|fer if n|
|00000fd0| 6f 74 20 73 70 65 63 69 | 66 69 65 64 2e 22 20 22 |ot speci|fied." "|
|00000fe0| 62 22 5d 29 0a 28 66 73 | 65 74 20 27 6b 69 6c 6c |b"]).(fs|et 'kill|
|00000ff0| 2d 6d 61 73 74 65 72 2d | 62 75 66 66 65 72 2d 68 |-master-|buffer-h|
|00001000| 6f 6f 6b 20 23 5b 6e 69 | 6c 20 22 c0 70 c1 5c 22 |ook #[ni|l ".p.\"|
|00001010| 87 22 20 5b 6b 69 6c 6c | 2d 61 6c 6c 2d 66 69 6c |." [kill|-all-fil|
|00001020| 65 2d 70 61 72 74 73 20 | 74 5d 20 33 20 22 5c 0a |e-parts |t] 3 "\.|
|00001030| 48 6f 6f 6b 20 74 6f 20 | 62 65 20 63 61 6c 6c 65 |Hook to |be calle|
|00001040| 64 20 77 68 65 6e 20 61 | 20 6d 61 73 74 65 72 20 |d when a| master |
|00001050| 62 75 66 66 65 72 20 69 | 73 20 6b 69 6c 6c 65 64 |buffer i|s killed|
|00001060| 2e 0a 4b 69 6c 6c 73 20 | 74 68 65 20 61 73 73 6f |..Kills |the asso|
|00001070| 63 69 61 74 65 64 20 66 | 69 6c 65 20 70 61 72 74 |ciated f|ile part|
|00001080| 73 2e 22 5d 29 0a 28 66 | 73 65 74 20 27 66 69 6c |s."]).(f|set 'fil|
|00001090| 65 2d 70 61 72 74 2d 63 | 68 65 63 6b 2d 61 74 74 |e-part-c|heck-att|
|000010a0| 61 63 68 65 64 20 23 5b | 28 78 29 20 22 08 ac 82 |ached #[|(x) "...|
|000010b0| c1 87 c2 08 c3 5c 22 ab | 8e c4 20 88 c1 15 c1 16 |.....\".|.. .....|
|000010c0| 06 c7 c8 21 88 c1 87 c9 | 87 22 20 5b 78 20 6e 69 |...!....|." [x ni|
|000010d0| 6c 20 65 78 74 65 6e 74 | 2d 70 72 6f 70 65 72 74 |l extent|-propert|
|000010e0| 79 20 64 65 74 61 63 68 | 65 64 20 6b 69 6c 6c 2d |y detach|ed kill-|
|000010f0| 66 69 6c 65 2d 70 61 72 | 74 2d 68 6f 6f 6b 20 62 |file-par|t-hook b|
|00001100| 75 66 66 65 72 2d 66 69 | 6c 65 2d 6e 61 6d 65 20 |uffer-fi|le-name |
|00001110| 66 69 6c 65 2d 70 61 72 | 74 2d 6d 61 73 74 65 72 |file-par|t-master|
|00001120| 2d 65 78 74 65 6e 74 20 | 6d 65 73 73 61 67 65 20 |-extent |message |
|00001130| 22 46 69 6c 65 20 70 61 | 72 74 20 68 61 73 20 62 |"File pa|rt has b|
|00001140| 65 63 6f 6d 65 20 64 65 | 74 61 63 68 65 64 2e 22 |ecome de|tached."|
|00001150| 20 74 5d 20 33 5d 29 0a | 28 66 73 65 74 20 27 77 | t] 3]).|(fset 'w|
|00001160| 72 69 74 65 2d 66 69 6c | 65 2d 70 61 72 74 2d 68 |rite-fil|e-part-h|
|00001170| 6f 6f 6b 20 23 5b 6e 69 | 6c 20 22 08 70 64 65 5a |ook #[ni|l ".pdeZ|
|00001180| 08 3f 3f 19 1a 1b 1c c5 | 0c 21 ab c4 c6 0c 21 c7 |.??.....|.!....!.|
|00001190| 0c 21 1e 08 1e 09 8a ca | 0c 21 71 88 cb 0c cc cd |.!......|.!q.....|
|000011a0| 23 88 0e 09 62 88 ce 0b | 21 88 5c 6e 0e 09 5c 5c |#...b...|!.\n..\\|
|000011b0| 5c 6e 0e 08 5c 5c 7c 88 | cb 0c cc cf 23 88 0b 71 |\n..\\|.|....#..q|
|000011c0| 88 d0 cd 21 88 d1 d2 d3 | d4 0b 21 d4 ca 0c 21 21 |...!....|..!...!!|
|000011d0| 23 21 88 2b 09 2c 87 22 | 20 5b 66 69 6c 65 2d 70 |#!.+.,."| [file-p|
|000011e0| 61 72 74 2d 6d 61 73 74 | 65 72 2d 65 78 74 65 6e |art-mast|er-exten|
|000011f0| 74 20 72 65 74 76 61 6c | 20 6c 65 6e 20 62 75 66 |t retval| len buf|
|00001200| 20 78 20 66 69 6c 65 2d | 70 61 72 74 2d 63 68 65 | x file-|part-che|
|00001210| 63 6b 2d 61 74 74 61 63 | 68 65 64 20 65 78 74 65 |ck-attac|hed exte|
|00001220| 6e 74 2d 73 74 61 72 74 | 2d 70 6f 73 69 74 69 6f |nt-start|-positio|
|00001230| 6e 20 65 78 74 65 6e 74 | 2d 65 6e 64 2d 70 6f 73 |n extent|-end-pos|
|00001240| 69 74 69 6f 6e 20 65 20 | 62 20 65 78 74 65 6e 74 |ition e |b extent|
|00001250| 2d 62 75 66 66 65 72 20 | 73 65 74 2d 65 78 74 65 |-buffer |set-exte|
|00001260| 6e 74 2d 70 72 6f 70 65 | 72 74 79 20 72 65 61 64 |nt-prope|rty read|
|00001270| 2d 6f 6e 6c 79 20 6e 69 | 6c 20 69 6e 73 65 72 74 |-only ni|l insert|
|00001280| 2d 62 75 66 66 65 72 2d | 73 75 62 73 74 72 69 6e |-buffer-|substrin|
|00001290| 67 20 74 20 73 65 74 2d | 62 75 66 66 65 72 2d 6d |g t set-|buffer-m|
|000012a0| 6f 64 69 66 69 65 64 2d | 70 20 6d 65 73 73 61 67 |odified-|p messag|
|000012b0| 65 20 66 6f 72 6d 61 74 | 20 22 57 72 6f 74 65 20 |e format| "Wrote |
|000012c0| 66 69 6c 65 20 70 61 72 | 74 20 25 73 20 6f 6e 20 |file par|t %s on |
|000012d0| 25 73 22 20 62 75 66 66 | 65 72 2d 6e 61 6d 65 5d |%s" buff|er-name]|
|000012e0| 20 37 20 22 5c 0a 48 6f | 6f 6b 20 74 6f 20 62 65 | 7 "\.Ho|ok to be|
|000012f0| 20 63 61 6c 6c 65 64 20 | 77 68 65 6e 20 61 20 66 | called |when a f|
|00001300| 69 6c 65 20 70 61 72 74 | 20 69 73 20 73 61 76 65 |ile part| is save|
|00001310| 64 2e 0a 53 61 76 65 73 | 20 74 68 65 20 66 69 6c |d..Saves| the fil|
|00001320| 65 20 70 61 72 74 20 69 | 6e 74 6f 20 74 68 65 20 |e part i|nto the |
|00001330| 6d 61 73 74 65 72 20 62 | 75 66 66 65 72 2e 22 5d |master b|uffer."]|
|00001340| 29 0a 28 66 73 65 74 20 | 27 77 72 69 74 65 2d 6d |).(fset |'write-m|
|00001350| 61 73 74 65 72 2d 62 75 | 66 66 65 72 2d 68 6f 6f |aster-bu|ffer-hoo|
|00001360| 6b 20 23 5b 6e 69 6c 20 | 22 c0 20 88 c1 87 22 20 |k #[nil |". ..." |
|00001370| 5b 73 61 76 65 2d 73 6f | 6d 65 2d 66 69 6c 65 2d |[save-so|me-file-|
|00001380| 70 61 72 74 2d 62 75 66 | 66 65 72 73 20 6e 69 6c |part-buf|fers nil|
|00001390| 5d 20 31 20 22 5c 0a 48 | 6f 6f 6b 20 74 6f 20 62 |] 1 "\.H|ook to b|
|000013a0| 65 20 63 61 6c 6c 65 64 | 20 77 68 65 6e 20 61 20 |e called| when a |
|000013b0| 6d 61 73 74 65 72 20 62 | 75 66 66 65 72 20 69 73 |master b|uffer is|
|000013c0| 20 73 61 76 65 64 2e 0a | 49 66 20 74 68 65 72 65 | saved..|If there|
|000013d0| 20 61 72 65 20 6d 6f 64 | 69 66 69 65 64 20 66 69 | are mod|ified fi|
|000013e0| 6c 65 20 70 61 72 74 73 | 20 6f 6e 20 74 68 65 20 |le parts| on the |
|000013f0| 62 75 66 66 65 72 2c 20 | 6f 70 74 69 6f 6e 61 6c |buffer, |optional|
|00001400| 6c 79 0a 73 61 76 65 73 | 20 74 68 65 20 66 69 6c |ly.saves| the fil|
|00001410| 65 20 70 61 72 74 73 20 | 62 61 63 6b 20 69 6e 74 |e parts |back int|
|00001420| 6f 20 74 68 65 20 62 75 | 66 66 65 72 2e 22 5d 29 |o the bu|ffer."])|
|00001430| 0a 28 66 73 65 74 20 27 | 73 61 76 65 2d 73 6f 6d |.(fset '|save-som|
|00001440| 65 2d 66 69 6c 65 2d 70 | 61 72 74 2d 62 75 66 66 |e-file-p|art-buff|
|00001450| 65 72 73 20 23 5b 28 26 | 6f 70 74 69 6f 6e 61 6c |ers #[(&|optional|
|00001460| 20 61 72 67 20 62 75 66 | 66 65 72 29 20 22 c0 09 | arg buf|fer) "..|
|00001470| 21 11 5c 6e c3 09 21 1c | 89 1d ad aa 0d 40 41 1e |!.\n..!.|.....@A.|
|00001480| 06 c7 0e 06 21 ab 97 0e | 08 ac 8e c9 ca cb c3 0e |....!...|........|
|00001490| 06 21 c3 09 21 23 21 ab | 85 cc cd ce 8f 88 29 0d |.!..!#!.|......).|
|000014a0| 41 89 15 ac 57 cc 2a 87 | 22 20 5b 66 69 6c 65 2d |A...W.*.|" [file-|
|000014b0| 70 61 72 74 2d 62 75 66 | 66 65 72 2d 66 72 6f 6d |part-buf|fer-from|
|000014c0| 2d 61 72 67 20 62 75 66 | 66 65 72 20 66 69 6c 65 |-arg buf|fer file|
|000014d0| 2d 70 61 72 74 2d 65 78 | 74 65 6e 74 2d 61 6c 69 |-part-ex|tent-ali|
|000014e0| 73 74 20 62 75 66 66 65 | 72 2d 6e 61 6d 65 20 6e |st buffe|r-name n|
|000014f0| 61 6d 65 20 61 6c 69 73 | 74 20 62 75 66 20 62 75 |ame alis|t buf bu|
|00001500| 66 66 65 72 2d 6d 6f 64 | 69 66 69 65 64 2d 70 20 |ffer-mod|ified-p |
|00001510| 61 72 67 20 79 2d 6f 72 | 2d 6e 2d 70 20 66 6f 72 |arg y-or|-n-p for|
|00001520| 6d 61 74 20 22 53 61 76 | 65 20 66 69 6c 65 20 70 |mat "Sav|e file p|
|00001530| 61 72 74 20 25 73 20 6f | 6e 20 25 73 3f 20 22 20 |art %s o|n %s? " |
|00001540| 6e 69 6c 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |nil (byt|e-code "|
|00001550| 8a 08 71 88 c1 20 88 29 | c1 87 22 20 5b 62 75 66 |..q.. .)|.." [buf|
|00001560| 20 73 61 76 65 2d 62 75 | 66 66 65 72 5d 20 31 29 | save-bu|ffer] 1)|
|00001570| 20 28 28 65 72 72 6f 72 | 29 29 5d 20 37 20 22 5c | ((error|))] 7 "\|
|00001580| 0a 53 61 76 65 20 73 6f | 6d 65 20 6d 6f 64 69 66 |.Save so|me modif|
|00001590| 69 65 64 20 66 69 6c 65 | 2d 70 61 72 74 20 62 75 |ied file|-part bu|
|000015a0| 66 66 65 72 73 20 6f 6e | 20 42 55 46 46 45 52 2e |ffers on| BUFFER.|
|000015b0| 20 20 41 73 6b 73 20 75 | 73 65 72 20 61 62 6f 75 | Asks u|ser abou|
|000015c0| 74 20 65 61 63 68 20 6f | 6e 65 2e 0a 4f 70 74 69 |t each o|ne..Opti|
|000015d0| 6f 6e 61 6c 20 61 72 67 | 75 6d 65 6e 74 20 28 74 |onal arg|ument (t|
|000015e0| 68 65 20 70 72 65 66 69 | 78 29 20 6e 6f 6e 2d 6e |he prefi|x) non-n|
|000015f0| 69 6c 20 6d 65 61 6e 73 | 20 73 61 76 65 20 61 6c |il means| save al|
|00001600| 6c 20 77 69 74 68 20 6e | 6f 20 71 75 65 73 74 69 |l with n|o questi|
|00001610| 6f 6e 73 2e 0a 42 55 46 | 46 45 52 20 64 65 66 61 |ons..BUF|FER defa|
|00001620| 75 6c 74 73 20 74 6f 20 | 74 68 65 20 63 75 72 72 |ults to |the curr|
|00001630| 65 6e 74 20 62 75 66 66 | 65 72 20 69 66 20 6e 6f |ent buff|er if no|
|00001640| 74 20 73 70 65 63 69 66 | 69 65 64 2e 22 20 22 70 |t specif|ied." "p|
|00001650| 22 5d 29 0a 28 66 73 65 | 74 20 27 66 69 6c 65 2d |"]).(fse|t 'file-|
|00001660| 70 61 72 74 73 2d 6d 6f | 64 69 66 69 65 64 2d 70 |parts-mo|dified-p|
|00001670| 20 23 5b 28 26 6f 70 74 | 69 6f 6e 61 6c 20 62 75 | #[(&opt|ional bu|
|00001680| 66 66 65 72 29 20 22 8a | 08 ab 83 08 71 88 c1 c2 |ffer) ".|....q...|
|00001690| 0b 5c 22 29 87 22 20 5b | 62 75 66 66 65 72 20 66 |.\")." [|buffer f|
|000016a0| 69 6c 65 2d 70 61 72 74 | 2d 6d 61 70 74 72 75 65 |ile-part|-maptrue|
|000016b0| 20 23 5b 28 78 29 20 22 | c0 09 41 21 87 22 20 5b | #[(x) "|..A!." [|
|000016c0| 62 75 66 66 65 72 2d 6d | 6f 64 69 66 69 65 64 2d |buffer-m|odified-|
|000016d0| 70 20 78 5d 20 32 5d 20 | 66 69 6c 65 2d 70 61 72 |p x] 2] |file-par|
|000016e0| 74 2d 65 78 74 65 6e 74 | 2d 61 6c 69 73 74 5d 20 |t-extent|-alist] |
|000016f0| 33 20 22 5c 0a 52 65 74 | 75 72 6e 20 74 72 75 65 |3 "\.Ret|urn true|
|00001700| 20 69 66 20 42 55 46 46 | 45 52 20 68 61 73 20 61 | if BUFF|ER has a|
|00001710| 6e 79 20 6d 6f 64 69 66 | 69 65 64 20 66 69 6c 65 |ny modif|ied file|
|00001720| 20 70 61 72 74 73 20 6f | 6e 20 69 74 2e 0a 42 55 | parts o|n it..BU|
|00001730| 46 46 45 52 20 64 65 66 | 61 75 6c 74 73 20 74 6f |FFER def|aults to|
|00001740| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 62 75 66 | the cur|rent buf|
|00001750| 66 65 72 20 69 66 20 6e | 6f 74 20 73 70 65 63 69 |fer if n|ot speci|
|00001760| 66 69 65 64 2e 22 5d 29 | 0a 28 66 73 65 74 20 27 |fied."])|.(fset '|
|00001770| 72 65 76 65 72 74 2d 66 | 69 6c 65 2d 70 61 72 74 |revert-f|ile-part|
|00001780| 2d 66 75 6e 63 74 69 6f | 6e 20 23 5b 28 26 6f 70 |-functio|n #[(&op|
|00001790| 74 69 6f 6e 61 6c 20 63 | 68 65 63 6b 2d 61 75 74 |tional c|heck-aut|
|000017a0| 6f 20 6e 6f 63 6f 6e 66 | 69 72 6d 29 20 22 08 19 |o noconf|irm) "..|
|000017b0| c2 09 21 ad b1 c3 09 21 | 1c 0d ac 8a c6 c7 c8 c9 |..!....!|........|
|000017c0| 0c 21 5c 22 21 ad 9f ca | 20 88 cb 0c 21 1e 0c cd |.!\"!...| ...!...|
|000017d0| 0c ce 09 21 cf 09 21 23 | 88 d0 d1 21 88 8a 0c 71 |...!..!#|...!...q|
|000017e0| 88 d0 0e 0c 21 2a 29 29 | 87 22 20 5b 66 69 6c 65 |....!*))|." [file|
|000017f0| 2d 70 61 72 74 2d 6d 61 | 73 74 65 72 2d 65 78 74 |-part-ma|ster-ext|
|00001800| 65 6e 74 20 78 20 66 69 | 6c 65 2d 70 61 72 74 2d |ent x fi|le-part-|
|00001810| 63 68 65 63 6b 2d 61 74 | 74 61 63 68 65 64 20 65 |check-at|tached e|
|00001820| 78 74 65 6e 74 2d 62 75 | 66 66 65 72 20 6d 61 73 |xtent-bu|ffer mas|
|00001830| 74 65 72 20 6e 6f 63 6f | 6e 66 69 72 6d 20 79 65 |ter noco|nfirm ye|
|00001840| 73 2d 6f 72 2d 6e 6f 2d | 70 20 66 6f 72 6d 61 74 |s-or-no-|p format|
|00001850| 20 22 52 65 76 65 72 74 | 20 66 69 6c 65 20 70 61 | "Revert| file pa|
|00001860| 72 74 20 66 72 6f 6d 20 | 6d 61 73 74 65 72 20 62 |rt from |master b|
|00001870| 75 66 66 65 72 20 25 73 | 3f 20 22 20 62 75 66 66 |uffer %s|? " buff|
|00001880| 65 72 2d 6e 61 6d 65 20 | 65 72 61 73 65 2d 62 75 |er-name |erase-bu|
|00001890| 66 66 65 72 20 62 75 66 | 66 65 72 2d 6d 6f 64 69 |ffer buf|fer-modi|
|000018a0| 66 69 65 64 2d 70 20 6d | 6f 64 20 69 6e 73 65 72 |fied-p m|od inser|
|000018b0| 74 2d 62 75 66 66 65 72 | 2d 73 75 62 73 74 72 69 |t-buffer|-substri|
|000018c0| 6e 67 20 65 78 74 65 6e | 74 2d 73 74 61 72 74 2d |ng exten|t-start-|
|000018d0| 70 6f 73 69 74 69 6f 6e | 20 65 78 74 65 6e 74 2d |position| extent-|
|000018e0| 65 6e 64 2d 70 6f 73 69 | 74 69 6f 6e 20 73 65 74 |end-posi|tion set|
|000018f0| 2d 62 75 66 66 65 72 2d | 6d 6f 64 69 66 69 65 64 |-buffer-|modified|
|00001900| 2d 70 20 6e 69 6c 5d 20 | 35 20 22 5c 0a 48 6f 6f |-p nil] |5 "\.Hoo|
|00001910| 6b 20 74 6f 20 62 65 20 | 63 61 6c 6c 65 64 20 77 |k to be |called w|
|00001920| 68 65 6e 20 61 20 66 69 | 6c 65 20 70 61 72 74 20 |hen a fi|le part |
|00001930| 69 73 20 72 65 76 65 72 | 74 65 64 2e 0a 52 65 76 |is rever|ted..Rev|
|00001940| 65 72 74 73 20 74 68 65 | 20 66 69 6c 65 20 70 61 |erts the| file pa|
|00001950| 72 74 20 66 72 6f 6d 20 | 74 68 65 20 6d 61 73 74 |rt from |the mast|
|00001960| 65 72 20 62 75 66 66 65 | 72 2e 22 5d 29 0a 28 66 |er buffe|r."]).(f|
|00001970| 73 65 74 20 27 72 65 76 | 65 72 74 2d 6d 61 73 74 |set 'rev|ert-mast|
|00001980| 65 72 2d 62 75 66 66 65 | 72 2d 66 75 6e 63 74 69 |er-buffe|r-functi|
|00001990| 6f 6e 20 23 5b 28 26 6f | 70 74 69 6f 6e 61 6c 20 |on #[(&o|ptional |
|000019a0| 63 68 65 63 6b 2d 61 75 | 74 6f 20 6e 6f 63 6f 6e |check-au|to nocon|
|000019b0| 66 69 72 6d 29 20 22 08 | ac 8b 09 ab 88 c2 c3 21 |firm) ".|.......!|
|000019c0| 88 c4 c5 21 88 c6 1e 07 | c8 0e 09 3f 08 5c 22 29 |...!....|...?.\")|
|000019d0| 87 22 20 5b 6e 6f 63 6f | 6e 66 69 72 6d 20 66 69 |." [noco|nfirm fi|
|000019e0| 6c 65 2d 70 61 72 74 2d | 65 78 74 65 6e 74 2d 61 |le-part-|extent-a|
|000019f0| 6c 69 73 74 20 6d 65 73 | 73 61 67 65 20 22 57 61 |list mes|sage "Wa|
|00001a00| 72 6e 69 6e 67 3a 20 66 | 69 6c 65 20 70 61 72 74 |rning: f|ile part|
|00001a10| 73 20 77 69 6c 6c 20 62 | 65 63 6f 6d 65 20 64 65 |s will b|ecome de|
|00001a20| 74 61 63 68 65 64 2e 22 | 20 73 6c 65 65 70 2d 66 |tached."| sleep-f|
|00001a30| 6f 72 20 32 20 6e 69 6c | 20 72 65 76 65 72 74 2d |or 2 nil| revert-|
|00001a40| 62 75 66 66 65 72 2d 66 | 75 6e 63 74 69 6f 6e 20 |buffer-f|unction |
|00001a50| 72 65 76 65 72 74 2d 62 | 75 66 66 65 72 20 63 68 |revert-b|uffer ch|
|00001a60| 65 63 6b 2d 61 75 74 6f | 5d 20 33 20 22 5c 0a 48 |eck-auto|] 3 "\.H|
|00001a70| 6f 6f 6b 20 74 6f 20 62 | 65 20 63 61 6c 6c 65 64 |ook to b|e called|
|00001a80| 20 77 68 65 6e 20 61 20 | 6d 61 73 74 65 72 2d 62 | when a |master-b|
|00001a90| 75 66 66 65 72 20 69 73 | 20 72 65 76 65 72 74 65 |uffer is| reverte|
|00001aa0| 64 2e 0a 4d 61 6b 65 73 | 20 73 75 72 65 20 74 68 |d..Makes| sure th|
|00001ab0| 65 20 75 73 65 72 20 69 | 73 20 61 77 61 72 65 20 |e user i|s aware |
|00001ac0| 74 68 61 74 20 74 68 65 | 20 66 69 6c 65 20 70 61 |that the| file pa|
|00001ad0| 72 74 73 20 77 69 6c 6c | 20 62 65 63 6f 6d 65 20 |rts will| become |
|00001ae0| 64 65 74 61 63 68 65 64 | 2c 0a 74 68 65 6e 20 70 |detached|,.then p|
|00001af0| 72 6f 63 65 65 64 73 20 | 61 73 20 6e 6f 72 6d 61 |roceeds |as norma|
|00001b00| 6c 2e 22 5d 29 0a 28 66 | 73 65 74 20 27 66 69 6c |l."]).(f|set 'fil|
|00001b10| 65 2d 70 61 72 74 2d 66 | 69 72 73 74 2d 63 68 61 |e-part-f|irst-cha|
|00001b20| 6e 67 65 2d 68 6f 6f 6b | 20 23 5b 6e 69 6c 20 22 |nge-hook| #[nil "|
|00001b30| 08 19 c2 09 21 ad 8a 8a | c3 09 21 71 88 c4 c5 21 |....!...|..!q...!|
|00001b40| 29 29 87 22 20 5b 66 69 | 6c 65 2d 70 61 72 74 2d |))." [fi|le-part-|
|00001b50| 6d 61 73 74 65 72 2d 65 | 78 74 65 6e 74 20 78 20 |master-e|xtent x |
|00001b60| 66 69 6c 65 2d 70 61 72 | 74 2d 63 68 65 63 6b 2d |file-par|t-check-|
|00001b70| 61 74 74 61 63 68 65 64 | 20 65 78 74 65 6e 74 2d |attached| extent-|
|00001b80| 62 75 66 66 65 72 20 73 | 65 74 2d 62 75 66 66 65 |buffer s|et-buffe|
|00001b90| 72 2d 6d 6f 64 69 66 69 | 65 64 2d 70 20 74 5d 20 |r-modifi|ed-p t] |
|00001ba0| 32 20 22 5c 0a 48 6f 6f | 6b 20 74 6f 20 62 65 20 |2 "\.Hoo|k to be |
|00001bb0| 63 61 6c 6c 65 64 20 77 | 68 65 6e 20 61 20 66 69 |called w|hen a fi|
|00001bc0| 6c 65 20 70 61 72 74 20 | 69 73 20 66 69 72 73 74 |le part |is first|
|00001bd0| 20 6d 6f 64 69 66 69 65 | 64 2e 0a 4d 61 72 6b 73 | modifie|d..Marks|
|00001be0| 20 74 68 65 20 6d 61 73 | 74 65 72 20 62 75 66 66 | the mas|ter buff|
|00001bf0| 65 72 20 61 73 20 6d 6f | 64 69 66 69 65 64 2e 22 |er as mo|dified."|
|00001c00| 5d 29 0a | |]). | |
+--------+-------------------------+-------------------------+--------+--------+