home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / source / a2.0bemacs-src.lha / Emacs-19.25 / lisp / compare-w.elc < prev    next >
Emacs Compiled Lisp  |  1994-05-28  |  2.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
100% file Emacs/XEmacs v19 byte-compiled Lisp data default
99% file data default
100% TrID Emacs/XEmacs byte-compiled Lisp (generic) default



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 72 6d 73 40 6d 6f 6c |piled by| rms@mol|
|00000020| 65 2e 67 6e 75 2e 61 69 | 2e 6d 69 74 2e 65 64 75 |e.gnu.ai|.mit.edu|
|00000030| 20 6f 6e 20 53 61 74 20 | 4d 61 79 20 32 38 20 30 | on Sat |May 28 0|
|00000040| 34 3a 34 34 3a 30 34 20 | 31 39 39 34 0a 3b 3b 3b |4:44:04 |1994.;;;|
|00000050| 20 66 72 6f 6d 20 66 69 | 6c 65 20 2f 68 6f 6d 65 | from fi|le /home|
|00000060| 2f 66 73 66 2f 72 6d 73 | 2f 65 31 39 2f 6c 69 73 |/fsf/rms|/e19/lis|
|00000070| 70 2f 63 6f 6d 70 61 72 | 65 2d 77 2e 65 6c 0a 3b |p/compar|e-w.el.;|
|00000080| 3b 3b 20 65 6d 61 63 73 | 20 76 65 72 73 69 6f 6e |;; emacs| version|
|00000090| 20 31 39 2e 32 33 2e 39 | 30 2e 31 2e 0a 3b 3b 3b | 19.23.9|0.1..;;;|
|000000a0| 20 62 79 74 65 63 6f 6d | 70 20 76 65 72 73 69 6f | bytecom|p versio|
|000000b0| 6e 20 46 53 46 20 32 2e | 31 30 0a 3b 3b 3b 20 6f |n FSF 2.|10.;;; o|
|000000c0| 70 74 69 6d 69 7a 61 74 | 69 6f 6e 20 69 73 20 6f |ptimizat|ion is o|
|000000d0| 6e 2e 0a 3b 3b 3b 20 74 | 68 69 73 20 66 69 6c 65 |n..;;; t|his file|
|000000e0| 20 75 73 65 73 20 6f 70 | 63 6f 64 65 73 20 77 68 | uses op|codes wh|
|000000f0| 69 63 68 20 64 6f 20 6e | 6f 74 20 65 78 69 73 74 |ich do n|ot exist|
|00000100| 20 69 6e 20 45 6d 61 63 | 73 20 31 38 2e 0a 0a 28 | in Emac|s 18...(|
|00000110| 69 66 20 28 61 6e 64 20 | 28 62 6f 75 6e 64 70 20 |if (and |(boundp |
|00000120| 27 65 6d 61 63 73 2d 76 | 65 72 73 69 6f 6e 29 0a |'emacs-v|ersion).|
|00000130| 09 20 28 6f 72 20 28 61 | 6e 64 20 28 62 6f 75 6e |. (or (a|nd (boun|
|00000140| 64 70 20 27 65 70 6f 63 | 68 3a 3a 76 65 72 73 69 |dp 'epoc|h::versi|
|00000150| 6f 6e 29 20 65 70 6f 63 | 68 3a 3a 76 65 72 73 69 |on) epoc|h::versi|
|00000160| 6f 6e 29 0a 09 20 20 20 | 20 20 28 73 74 72 69 6e |on).. | (strin|
|00000170| 67 2d 6c 65 73 73 70 20 | 65 6d 61 63 73 2d 76 65 |g-lessp |emacs-ve|
|00000180| 72 73 69 6f 6e 20 22 31 | 39 22 29 29 29 0a 20 20 |rsion "1|9"))). |
|00000190| 20 20 28 65 72 72 6f 72 | 20 22 60 2f 68 6f 6d 65 | (error| "`/home|
|000001a0| 2f 66 73 66 2f 72 6d 73 | 2f 65 31 39 2f 6c 69 73 |/fsf/rms|/e19/lis|
|000001b0| 70 2f 63 6f 6d 70 61 72 | 65 2d 77 2e 65 6c 27 20 |p/compar|e-w.el' |
|000001c0| 77 61 73 20 63 6f 6d 70 | 69 6c 65 64 20 66 6f 72 |was comp|iled for|
|000001d0| 20 45 6d 61 63 73 20 31 | 39 22 29 29 0a 0a 28 64 | Emacs 1|9"))..(d|
|000001e0| 65 66 76 61 72 20 63 6f | 6d 70 61 72 65 2d 77 69 |efvar co|mpare-wi|
|000001f0| 6e 64 6f 77 73 2d 77 68 | 69 74 65 73 70 61 63 65 |ndows-wh|itespace|
|00000200| 20 22 5b 20 09 5c 6e 5d | 2b 22 20 22 5c 0a 2a 52 | "[ .\n]|+" "\.*R|
|00000210| 65 67 65 78 70 20 74 68 | 61 74 20 64 65 66 69 6e |egexp th|at defin|
|00000220| 65 73 20 77 68 69 74 65 | 73 70 61 63 65 20 73 65 |es white|space se|
|00000230| 71 75 65 6e 63 65 73 20 | 66 6f 72 20 5c 5c 5b 63 |quences |for \\[c|
|00000240| 6f 6d 70 61 72 65 2d 77 | 69 6e 64 6f 77 73 5d 2e |ompare-w|indows].|
|00000250| 0a 43 68 61 6e 67 65 73 | 20 69 6e 20 77 68 69 74 |.Changes| in whit|
|00000260| 65 73 70 61 63 65 20 61 | 72 65 20 6f 70 74 69 6f |espace a|re optio|
|00000270| 6e 61 6c 6c 79 20 69 67 | 6e 6f 72 65 64 2e 0a 0a |nally ig|nored...|
|00000280| 54 68 65 20 76 61 6c 75 | 65 20 6f 66 20 60 63 6f |The valu|e of `co|
|00000290| 6d 70 61 72 65 2d 77 69 | 6e 64 6f 77 73 2d 77 68 |mpare-wi|ndows-wh|
|000002a0| 69 74 65 73 70 61 63 65 | 27 20 6d 61 79 20 69 6e |itespace|' may in|
|000002b0| 73 74 65 61 64 20 62 65 | 20 61 20 66 75 6e 63 74 |stead be| a funct|
|000002c0| 69 6f 6e 3b 20 74 68 69 | 73 0a 66 75 6e 63 74 69 |ion; thi|s.functi|
|000002d0| 6f 6e 20 69 73 20 63 61 | 6c 6c 65 64 20 69 6e 20 |on is ca|lled in |
|000002e0| 65 61 63 68 20 62 75 66 | 66 65 72 2c 20 77 69 74 |each buf|fer, wit|
|000002f0| 68 20 70 6f 69 6e 74 20 | 61 74 20 74 68 65 20 63 |h point |at the c|
|00000300| 75 72 72 65 6e 74 20 73 | 63 61 6e 6e 69 6e 67 20 |urrent s|canning |
|00000310| 70 6f 69 6e 74 2e 0a 54 | 68 65 20 66 75 6e 63 74 |point..T|he funct|
|00000320| 69 6f 6e 27 73 20 6a 6f | 62 20 69 73 20 74 6f 20 |ion's jo|b is to |
|00000330| 63 61 74 65 67 6f 72 69 | 7a 65 20 61 6e 79 20 77 |categori|ze any w|
|00000340| 68 69 74 65 73 70 61 63 | 65 20 61 72 6f 75 6e 64 |hitespac|e around|
|00000350| 20 28 69 6e 63 6c 75 64 | 69 6e 67 20 62 65 66 6f | (includ|ing befo|
|00000360| 72 65 29 0a 70 6f 69 6e | 74 3b 20 69 74 20 73 68 |re).poin|t; it sh|
|00000370| 6f 75 6c 64 20 61 6c 73 | 6f 20 61 64 76 61 6e 63 |ould als|o advanc|
|00000380| 65 20 70 61 73 74 20 61 | 6e 79 20 77 68 69 74 65 |e past a|ny white|
|00000390| 73 70 61 63 65 2e 0a 0a | 54 68 65 20 66 75 6e 63 |space...|The func|
|000003a0| 74 69 6f 6e 20 69 73 20 | 70 61 73 73 65 64 20 6f |tion is |passed o|
|000003b0| 6e 65 20 61 72 67 75 6d | 65 6e 74 2c 20 74 68 65 |ne argum|ent, the|
|000003c0| 20 70 6f 69 6e 74 20 77 | 68 65 72 65 20 60 63 6f | point w|here `co|
|000003d0| 6d 70 61 72 65 2d 77 69 | 6e 64 6f 77 73 27 0a 77 |mpare-wi|ndows'.w|
|000003e0| 61 73 20 6f 72 69 67 69 | 6e 61 6c 6c 79 20 63 61 |as origi|nally ca|
|000003f0| 6c 6c 65 64 3b 20 69 74 | 20 73 68 6f 75 6c 64 20 |lled; it| should |
|00000400| 6e 6f 74 20 63 6f 6e 73 | 69 64 65 72 20 61 6e 79 |not cons|ider any|
|00000410| 20 74 65 78 74 20 62 65 | 66 6f 72 65 20 74 68 61 | text be|fore tha|
|00000420| 74 20 70 6f 69 6e 74 2e | 0a 49 66 20 74 68 65 20 |t point.|.If the |
|00000430| 66 75 6e 63 74 69 6f 6e | 20 72 65 74 75 72 6e 73 |function| returns|
|00000440| 20 74 68 65 20 73 61 6d | 65 20 76 61 6c 75 65 20 | the sam|e value |
|00000450| 66 6f 72 20 62 6f 74 68 | 20 62 75 66 66 65 72 73 |for both| buffers|
|00000460| 2c 20 74 68 65 6e 20 74 | 68 65 0a 77 68 69 74 65 |, then t|he.white|
|00000470| 73 70 61 63 65 20 69 73 | 20 63 6f 6e 73 69 64 65 |space is| conside|
|00000480| 72 65 64 20 74 6f 20 6d | 61 74 63 68 2c 20 61 6e |red to m|atch, an|
|00000490| 64 20 69 73 20 73 6b 69 | 70 70 65 64 2e 22 29 0a |d is ski|pped.").|
|000004a0| 28 64 65 66 76 61 72 20 | 63 6f 6d 70 61 72 65 2d |(defvar |compare-|
|000004b0| 69 67 6e 6f 72 65 2d 63 | 61 73 65 20 6e 69 6c 20 |ignore-c|ase nil |
|000004c0| 22 5c 0a 2a 4e 6f 6e 2d | 6e 69 6c 20 6d 65 61 6e |"\.*Non-|nil mean|
|000004d0| 73 20 5c 5c 5b 63 6f 6d | 70 61 72 65 2d 77 69 6e |s \\[com|pare-win|
|000004e0| 64 6f 77 73 5d 20 69 67 | 6e 6f 72 65 73 20 63 61 |dows] ig|nores ca|
|000004f0| 73 65 20 64 69 66 66 65 | 72 65 6e 63 65 73 2e 22 |se diffe|rences."|
|00000500| 29 0a 28 64 65 66 61 6c | 69 61 73 20 27 63 6f 6d |).(defal|ias 'com|
|00000510| 70 61 72 65 2d 77 69 6e | 64 6f 77 73 20 23 5b 28 |pare-win|dows #[(|
|00000520| 69 67 6e 6f 72 65 2d 77 | 68 69 74 65 73 70 61 63 |ignore-w|hitespac|
|00000530| 65 29 20 22 c0 19 c0 1a | c0 1b c0 1c c0 1d c0 1e |e) "....|........|
|00000540| 06 c0 1e 07 c0 1e 08 c0 | 1e 09 60 1e 5c 6e c0 1e |........|..`.\n..|
|00000550| 0b 0e 5c 66 85 23 00 0e | 0d 1e 0e 60 11 70 15 cf |..\f.#..|...`.p..|
|00000560| d0 20 21 89 16 07 d0 20 | 3d 83 3a 00 d1 d2 21 88 |. !.... |=.:...!.|
|00000570| d3 0e 07 21 12 d4 0e 07 | 21 16 06 5c 6e 16 0b 64 |...!....|!..\n..d|
|00000580| 13 8a 0e 06 71 88 64 14 | 29 d5 16 08 0e 08 83 33 |....q.d.|)......3|
|00000590| 01 c0 16 08 09 62 88 d6 | 0e 07 5c 6e 5c 22 88 0e |.....b..|..\n\"..|
|000005a0| 0e 83 d3 00 8a c0 89 89 | 89 89 89 1e 17 1e 18 1e |........|........|
|000005b0| 07 1e 19 1e 1a 1e 1b 0e | 0e 3b 83 8b 00 dc 0e 5c |........|.;.....\|
|000005c0| 6e 21 82 90 00 0e 0e 0e | 5c 6e 21 16 18 60 16 1b |n!......|\n!..`..|
|000005d0| 0e 06 71 88 5c 6e 62 88 | 0e 0e 3b 83 a9 00 dc 0e |..q.\nb.|..;.....|
|000005e0| 0b 21 82 ae 00 0e 0e 0e | 0b 21 16 17 60 16 1a 0e |.!......|.!..`...|
|000005f0| 0e 3b 84 cb 00 0e 18 83 | d1 00 0e 17 83 d1 00 0e |.;......|........|
|00000600| 18 0e 17 3d 83 d1 00 0e | 1b 11 0e 1a 12 2e 07 dd |...=....|........|
|00000610| c0 0e 1e 1e 1f 1e 20 89 | 1e 09 e1 56 83 2f 01 d5 |...... .|...V./..|
|00000620| 16 20 0e 20 83 25 01 0e | 09 0b 09 5a 5c 66 5c 6e |. . .%..|...Z\f\n|
|00000630| 5a 5e 5e 89 16 09 e1 56 | 85 0f 01 e2 0e 06 5c 6e |Z^^....V|......\n|
|00000640| 0e 09 5c 6e 5c 5c 0d 09 | 0e 09 09 5c 5c 26 06 e1 |..\n\\..|...\\&..|
|00000650| 55 89 16 20 83 e6 00 09 | 0e 09 5c 5c 11 5c 6e 0e |U.. ....|..\\.\n.|
|00000660| 09 5c 5c 12 d5 16 08 82 | e6 00 0e 09 e3 a5 89 16 |.\\.....|........|
|00000670| 09 82 de 00 2b 82 55 00 | 09 62 88 d6 0e 07 5c 6e |....+.U.|.b....\n|
|00000680| 5c 22 88 60 0e 5c 6e 55 | 85 45 01 e4 20 2e 5c 66 |\".`.\nU|.E.. .\f|
|00000690| 87 22 20 5b 6e 69 6c 20 | 70 31 20 70 32 20 6d 61 |." [nil |p1 p2 ma|
|000006a0| 78 70 31 20 6d 61 78 70 | 32 20 62 31 20 62 32 20 |xp1 maxp|2 b1 b2 |
|000006b0| 77 32 20 73 75 63 63 65 | 73 73 20 73 69 7a 65 20 |w2 succe|ss size |
|000006c0| 6f 70 6f 69 6e 74 31 20 | 6f 70 6f 69 6e 74 32 20 |opoint1 |opoint2 |
|000006d0| 69 67 6e 6f 72 65 2d 77 | 68 69 74 65 73 70 61 63 |ignore-w|hitespac|
|000006e0| 65 20 63 6f 6d 70 61 72 | 65 2d 77 69 6e 64 6f 77 |e compar|e-window|
|000006f0| 73 2d 77 68 69 74 65 73 | 70 61 63 65 20 73 6b 69 |s-whites|pace ski|
|00000700| 70 2d 77 68 69 74 65 73 | 70 61 63 65 20 6e 65 78 |p-whites|pace nex|
|00000710| 74 2d 77 69 6e 64 6f 77 | 20 73 65 6c 65 63 74 65 |t-window| selecte|
|00000720| 64 2d 77 69 6e 64 6f 77 | 20 65 72 72 6f 72 20 22 |d-window| error "|
|00000730| 4e 6f 20 6f 74 68 65 72 | 20 77 69 6e 64 6f 77 22 |No other| window"|
|00000740| 20 77 69 6e 64 6f 77 2d | 70 6f 69 6e 74 20 77 69 | window-|point wi|
|00000750| 6e 64 6f 77 2d 62 75 66 | 66 65 72 20 74 20 73 65 |ndow-buf|fer t se|
|00000760| 74 2d 77 69 6e 64 6f 77 | 2d 70 6f 69 6e 74 20 72 |t-window|-point r|
|00000770| 65 73 75 6c 74 32 20 72 | 65 73 75 6c 74 31 20 77 |esult2 r|esult1 w|
|00000780| 31 20 70 32 61 20 70 31 | 61 20 63 6f 6d 70 61 72 |1 p2a p1|a compar|
|00000790| 65 2d 77 69 6e 64 6f 77 | 73 2d 73 6b 69 70 2d 77 |e-window|s-skip-w|
|000007a0| 68 69 74 65 73 70 61 63 | 65 20 31 30 30 30 20 63 |hitespac|e 1000 c|
|000007b0| 6f 6d 70 61 72 65 2d 69 | 67 6e 6f 72 65 2d 63 61 |ompare-i|gnore-ca|
|000007c0| 73 65 20 63 61 73 65 2d | 66 6f 6c 64 2d 73 65 61 |se case-|fold-sea|
|000007d0| 72 63 68 20 73 75 63 63 | 65 73 73 2d 31 20 30 20 |rch succ|ess-1 0 |
|000007e0| 63 6f 6d 70 61 72 65 2d | 62 75 66 66 65 72 2d 73 |compare-|buffer-s|
|000007f0| 75 62 73 74 72 69 6e 67 | 73 20 32 20 64 69 6e 67 |ubstring|s 2 ding|
|00000800| 5d 20 39 20 22 5c 0a 43 | 6f 6d 70 61 72 65 20 74 |] 9 "\.C|ompare t|
|00000810| 65 78 74 20 69 6e 20 63 | 75 72 72 65 6e 74 20 77 |ext in c|urrent w|
|00000820| 69 6e 64 6f 77 20 77 69 | 74 68 20 74 65 78 74 20 |indow wi|th text |
|00000830| 69 6e 20 6e 65 78 74 20 | 77 69 6e 64 6f 77 2e 0a |in next |window..|
|00000840| 43 6f 6d 70 61 72 65 73 | 20 74 68 65 20 74 65 78 |Compares| the tex|
|00000850| 74 20 73 74 61 72 74 69 | 6e 67 20 61 74 20 70 6f |t starti|ng at po|
|00000860| 69 6e 74 20 69 6e 20 65 | 61 63 68 20 77 69 6e 64 |int in e|ach wind|
|00000870| 6f 77 2c 0a 6d 6f 76 69 | 6e 67 20 6f 76 65 72 20 |ow,.movi|ng over |
|00000880| 74 65 78 74 20 69 6e 20 | 65 61 63 68 20 6f 6e 65 |text in |each one|
|00000890| 20 61 73 20 66 61 72 20 | 61 73 20 74 68 65 79 20 | as far |as they |
|000008a0| 6d 61 74 63 68 2e 0a 0a | 41 20 70 72 65 66 69 78 |match...|A prefix|
|000008b0| 20 61 72 67 20 6d 65 61 | 6e 73 20 69 67 6e 6f 72 | arg mea|ns ignor|
|000008c0| 65 20 63 68 61 6e 67 65 | 73 20 69 6e 20 77 68 69 |e change|s in whi|
|000008d0| 74 65 73 70 61 63 65 2e | 0a 54 68 65 20 76 61 72 |tespace.|.The var|
|000008e0| 69 61 62 6c 65 20 60 63 | 6f 6d 70 61 72 65 2d 77 |iable `c|ompare-w|
|000008f0| 69 6e 64 6f 77 73 2d 77 | 68 69 74 65 73 70 61 63 |indows-w|hitespac|
|00000900| 65 27 20 63 6f 6e 74 72 | 6f 6c 73 20 68 6f 77 20 |e' contr|ols how |
|00000910| 77 68 69 74 65 73 70 61 | 63 65 20 69 73 20 73 6b |whitespa|ce is sk|
|00000920| 69 70 70 65 64 2e 0a 49 | 66 20 60 63 6f 6d 70 61 |ipped..I|f `compa|
|00000930| 72 65 2d 69 67 6e 6f 72 | 65 2d 63 61 73 65 27 20 |re-ignor|e-case' |
|00000940| 69 73 20 6e 6f 6e 2d 6e | 69 6c 2c 20 63 68 61 6e |is non-n|il, chan|
|00000950| 67 65 73 20 69 6e 20 63 | 61 73 65 20 61 72 65 20 |ges in c|ase are |
|00000960| 61 6c 73 6f 20 69 67 6e | 6f 72 65 64 2e 22 20 22 |also ign|ored." "|
|00000970| 50 22 5d 29 0a 28 62 79 | 74 65 2d 63 6f 64 65 20 |P"]).(by|te-code |
|00000980| 22 c0 c1 c2 5c 22 88 c3 | c4 21 87 22 20 5b 64 65 |"...\"..|.!." [de|
|00000990| 66 61 6c 69 61 73 20 63 | 6f 6d 70 61 72 65 2d 77 |falias c|ompare-w|
|000009a0| 69 6e 64 6f 77 73 2d 73 | 6b 69 70 2d 77 68 69 74 |indows-s|kip-whit|
|000009b0| 65 73 70 61 63 65 20 23 | 5b 28 73 74 61 72 74 29 |espace #|[(start)|
|000009c0| 20 22 60 60 60 18 19 1a | c3 5c 66 21 83 1d 00 5c | "```...|.\f!...\|
|000009d0| 6e c5 95 58 83 1d 00 c5 | 95 12 60 0e 06 56 84 2a |n..X....|..`..V.*|
|000009e0| 00 60 0e 06 55 84 30 00 | 60 08 55 83 30 00 c7 75 |.`..U.0.|`.U.0..u|
|000009f0| 88 82 06 00 60 11 5c 6e | 62 88 09 08 55 3f 86 40 |....`.\n|b...U?.@|
|00000a00| 00 5c 6e 08 55 3f 2b 87 | 22 20 5b 6f 70 6f 69 6e |.\n.U?+.|" [opoin|
|00000a10| 74 20 62 65 67 20 65 6e | 64 20 6c 6f 6f 6b 69 6e |t beg en|d lookin|
|00000a20| 67 2d 61 74 20 63 6f 6d | 70 61 72 65 2d 77 69 6e |g-at com|pare-win|
|00000a30| 64 6f 77 73 2d 77 68 69 | 74 65 73 70 61 63 65 20 |dows-whi|tespace |
|00000a40| 30 20 73 74 61 72 74 20 | 2d 31 5d 20 33 5d 20 70 |0 start |-1] 3] p|
|00000a50| 72 6f 76 69 64 65 20 63 | 6f 6d 70 61 72 65 2d 77 |rovide c|ompare-w|
|00000a60| 5d 20 33 29 0a | |] 3). | |
+--------+-------------------------+-------------------------+--------+--------+