home *** CD-ROM | disk | FTP | other *** search
Emacs Compiled Lisp | 1993-07-05 | 12.7 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.
Confidence | Program | Detection | Match Type | Support
|
---|
1%
| dexvert
| Emacs Compiled Lisp (other/emacsCompiledLisp)
| magic
| Unsupported |
1%
| dexvert
| Combustion 2 Particle Library (other/combustion2ParticleLibrary)
| ext
| Unsupported |
100%
| file
| Emacs/XEmacs v19 byte-compiled Lisp data
| default
| |
99%
| file
| data
| default
| |
100%
| TrID
| Emacs/XEmacs byte-compiled Lisp (generic)
| default
| |
100%
| xdgMime
| text/x-emacs-lisp
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3b 45 4c 43 13 00 00 00 | 0a 3b 3b 3b 20 63 6f 6d |;ELC....|.;;; com|
|00000010| 70 69 6c 65 64 20 62 79 | 20 6a 69 6d 62 40 67 65 |piled by| jimb@ge|
|00000020| 65 63 68 2e 67 6e 75 2e | 61 69 2e 6d 69 74 2e 65 |ech.gnu.|ai.mit.e|
|00000030| 64 75 20 6f 6e 20 4d 6f | 6e 20 4a 75 6c 20 20 35 |du on Mo|n Jul 5|
|00000040| 20 32 33 3a 34 38 3a 31 | 39 20 31 39 39 33 0a 3b | 23:48:1|9 1993.;|
|00000050| 3b 3b 20 66 72 6f 6d 20 | 66 69 6c 65 20 2f 67 64 |;; from |file /gd|
|00000060| 2f 67 6e 75 2f 65 6d 61 | 63 73 2f 31 39 2e 30 2f |/gnu/ema|cs/19.0/|
|00000070| 6c 69 73 70 2f 72 65 70 | 6c 61 63 65 2e 65 6c 0a |lisp/rep|lace.el.|
|00000080| 3b 3b 3b 20 65 6d 61 63 | 73 20 76 65 72 73 69 6f |;;; emac|s versio|
|00000090| 6e 20 31 39 2e 31 35 2e | 31 36 2e 0a 3b 3b 3b 20 |n 19.15.|16..;;; |
|000000a0| 62 79 74 65 63 6f 6d 70 | 20 76 65 72 73 69 6f 6e |bytecomp| version|
|000000b0| 20 46 53 46 20 32 2e 31 | 30 0a 3b 3b 3b 20 6f 70 | FSF 2.1|0.;;; op|
|000000c0| 74 69 6d 69 7a 61 74 69 | 6f 6e 20 69 73 20 6f 6e |timizati|on is on|
|000000d0| 2e 0a 3b 3b 3b 20 74 68 | 69 73 20 66 69 6c 65 20 |..;;; th|is file |
|000000e0| 75 73 65 73 20 6f 70 63 | 6f 64 65 73 20 77 68 69 |uses opc|odes whi|
|000000f0| 63 68 20 64 6f 20 6e 6f | 74 20 65 78 69 73 74 20 |ch do no|t exist |
|00000100| 69 6e 20 45 6d 61 63 73 | 20 31 38 2e 0a 0a 28 69 |in Emacs| 18...(i|
|00000110| 66 20 28 61 6e 64 20 28 | 62 6f 75 6e 64 70 20 27 |f (and (|boundp '|
|00000120| 65 6d 61 63 73 2d 76 65 | 72 73 69 6f 6e 29 0a 09 |emacs-ve|rsion)..|
|00000130| 20 28 6f 72 20 28 61 6e | 64 20 28 62 6f 75 6e 64 | (or (an|d (bound|
|00000140| 70 20 27 65 70 6f 63 68 | 3a 3a 76 65 72 73 69 6f |p 'epoch|::versio|
|00000150| 6e 29 20 65 70 6f 63 68 | 3a 3a 76 65 72 73 69 6f |n) epoch|::versio|
|00000160| 6e 29 0a 09 20 20 20 20 | 20 28 73 74 72 69 6e 67 |n).. | (string|
|00000170| 2d 6c 65 73 73 70 20 65 | 6d 61 63 73 2d 76 65 72 |-lessp e|macs-ver|
|00000180| 73 69 6f 6e 20 22 31 39 | 22 29 29 29 0a 20 20 20 |sion "19|"))). |
|00000190| 20 28 65 72 72 6f 72 20 | 22 54 68 69 73 20 66 69 | (error |"This fi|
|000001a0| 6c 65 20 77 61 73 20 63 | 6f 6d 70 69 6c 65 64 20 |le was c|ompiled |
|000001b0| 66 6f 72 20 45 6d 61 63 | 73 20 31 39 22 29 29 0a |for Emac|s 19")).|
|000001c0| 0a 28 64 65 66 63 6f 6e | 73 74 20 63 61 73 65 2d |.(defcon|st case-|
|000001d0| 72 65 70 6c 61 63 65 20 | 74 20 22 5c 0a 2a 4e 6f |replace |t "\.*No|
|000001e0| 6e 2d 6e 69 6c 20 6d 65 | 61 6e 73 20 71 75 65 72 |n-nil me|ans quer|
|000001f0| 79 2d 72 65 70 6c 61 63 | 65 20 73 68 6f 75 6c 64 |y-replac|e should|
|00000200| 20 70 72 65 73 65 72 76 | 65 20 63 61 73 65 20 69 | preserv|e case i|
|00000210| 6e 20 72 65 70 6c 61 63 | 65 6d 65 6e 74 73 2e 22 |n replac|ements."|
|00000220| 29 0a 28 62 79 74 65 2d | 63 6f 64 65 20 22 c0 c1 |).(byte-|code "..|
|00000230| 21 84 08 00 c2 11 c3 c4 | c5 5c 22 87 22 20 5b 62 |!.......|.\"." [b|
|00000240| 6f 75 6e 64 70 20 71 75 | 65 72 79 2d 72 65 70 6c |oundp qu|ery-repl|
|00000250| 61 63 65 2d 68 69 73 74 | 6f 72 79 20 6e 69 6c 20 |ace-hist|ory nil |
|00000260| 64 65 66 61 6c 69 61 73 | 20 71 75 65 72 79 2d 72 |defalias| query-r|
|00000270| 65 70 6c 61 63 65 2d 72 | 65 61 64 2d 61 72 67 73 |eplace-r|ead-args|
|00000280| 20 23 5b 28 73 74 72 69 | 6e 67 29 20 22 c0 89 19 | #[(stri|ng) "...|
|00000290| 1a c3 c4 c5 0e 06 5c 22 | c0 89 89 c7 25 12 c3 c4 |......\"|....%...|
|000002a0| c8 0e 06 5c 6e 23 c0 89 | 89 c7 25 11 5c 6e 09 0e |...\n#..|..%.\n..|
|000002b0| 09 45 2a 87 22 20 5b 6e | 69 6c 20 74 6f 20 66 72 |.E*." [n|il to fr|
|000002c0| 6f 6d 20 72 65 61 64 2d | 66 72 6f 6d 2d 6d 69 6e |om read-|from-min|
|000002d0| 69 62 75 66 66 65 72 20 | 66 6f 72 6d 61 74 20 22 |ibuffer |format "|
|000002e0| 25 73 3a 20 22 20 73 74 | 72 69 6e 67 20 71 75 65 |%s: " st|ring que|
|000002f0| 72 79 2d 72 65 70 6c 61 | 63 65 2d 68 69 73 74 6f |ry-repla|ce-histo|
|00000300| 72 79 20 22 25 73 20 25 | 73 20 77 69 74 68 3a 20 |ry "%s %|s with: |
|00000310| 22 20 63 75 72 72 65 6e | 74 2d 70 72 65 66 69 78 |" curren|t-prefix|
|00000320| 2d 61 72 67 5d 20 36 5d | 5d 20 33 29 0a 28 64 65 |-arg] 6]|] 3).(de|
|00000330| 66 61 6c 69 61 73 20 27 | 71 75 65 72 79 2d 72 65 |falias '|query-re|
|00000340| 70 6c 61 63 65 20 23 5b | 28 66 72 6f 6d 2d 73 74 |place #[|(from-st|
|00000350| 72 69 6e 67 20 74 6f 2d | 73 74 72 69 6e 67 20 26 |ring to-|string &|
|00000360| 6f 70 74 69 6f 6e 61 6c | 20 61 72 67 29 20 22 c0 |optional| arg) ".|
|00000370| 09 5c 6e c3 c4 0d 25 88 | 0e 06 86 10 00 c7 c8 21 |.\n...%.|.......!|
|00000380| 87 22 20 5b 70 65 72 66 | 6f 72 6d 2d 72 65 70 6c |." [perf|orm-repl|
|00000390| 61 63 65 20 66 72 6f 6d | 2d 73 74 72 69 6e 67 20 |ace from|-string |
|000003a0| 74 6f 2d 73 74 72 69 6e | 67 20 74 20 6e 69 6c 20 |to-strin|g t nil |
|000003b0| 61 72 67 20 75 6e 72 65 | 61 64 2d 63 6f 6d 6d 61 |arg unre|ad-comma|
|000003c0| 6e 64 2d 65 76 65 6e 74 | 73 20 6d 65 73 73 61 67 |nd-event|s messag|
|000003d0| 65 20 22 44 6f 6e 65 22 | 5d 20 36 20 22 5c 0a 52 |e "Done"|] 6 "\.R|
|000003e0| 65 70 6c 61 63 65 20 73 | 6f 6d 65 20 6f 63 63 75 |eplace s|ome occu|
|000003f0| 72 72 65 6e 63 65 73 20 | 6f 66 20 46 52 4f 4d 2d |rrences |of FROM-|
|00000400| 53 54 52 49 4e 47 20 77 | 69 74 68 20 54 4f 2d 53 |STRING w|ith TO-S|
|00000410| 54 52 49 4e 47 2e 0a 41 | 73 20 65 61 63 68 20 6d |TRING..A|s each m|
|00000420| 61 74 63 68 20 69 73 20 | 66 6f 75 6e 64 2c 20 74 |atch is |found, t|
|00000430| 68 65 20 75 73 65 72 20 | 6d 75 73 74 20 74 79 70 |he user |must typ|
|00000440| 65 20 61 20 63 68 61 72 | 61 63 74 65 72 20 73 61 |e a char|acter sa|
|00000450| 79 69 6e 67 0a 77 68 61 | 74 20 74 6f 20 64 6f 20 |ying.wha|t to do |
|00000460| 77 69 74 68 20 69 74 2e | 20 20 46 6f 72 20 64 69 |with it.| For di|
|00000470| 72 65 63 74 69 6f 6e 73 | 2c 20 74 79 70 65 20 5c |rections|, type \|
|00000480| 5c 5b 68 65 6c 70 2d 63 | 6f 6d 6d 61 6e 64 5d 20 |\[help-c|ommand] |
|00000490| 61 74 20 74 68 61 74 20 | 74 69 6d 65 2e 0a 0a 50 |at that |time...P|
|000004a0| 72 65 73 65 72 76 65 73 | 20 63 61 73 65 20 69 6e |reserves| case in|
|000004b0| 20 65 61 63 68 20 72 65 | 70 6c 61 63 65 6d 65 6e | each re|placemen|
|000004c0| 74 20 69 66 20 20 63 61 | 73 65 2d 72 65 70 6c 61 |t if ca|se-repla|
|000004d0| 63 65 20 20 61 6e 64 20 | 20 63 61 73 65 2d 66 6f |ce and | case-fo|
|000004e0| 6c 64 2d 73 65 61 72 63 | 68 0a 61 72 65 20 6e 6f |ld-searc|h.are no|
|000004f0| 6e 2d 6e 69 6c 20 61 6e | 64 20 46 52 4f 4d 2d 53 |n-nil an|d FROM-S|
|00000500| 54 52 49 4e 47 20 68 61 | 73 20 6e 6f 20 75 70 70 |TRING ha|s no upp|
|00000510| 65 72 63 61 73 65 20 6c | 65 74 74 65 72 73 2e 0a |ercase l|etters..|
|00000520| 54 68 69 72 64 20 61 72 | 67 20 44 45 4c 49 4d 49 |Third ar|g DELIMI|
|00000530| 54 45 44 20 28 70 72 65 | 66 69 78 20 61 72 67 20 |TED (pre|fix arg |
|00000540| 69 66 20 69 6e 74 65 72 | 61 63 74 69 76 65 29 20 |if inter|active) |
|00000550| 6e 6f 6e 2d 6e 69 6c 20 | 6d 65 61 6e 73 20 72 65 |non-nil |means re|
|00000560| 70 6c 61 63 65 0a 6f 6e | 6c 79 20 6d 61 74 63 68 |place.on|ly match|
|00000570| 65 73 20 73 75 72 72 6f | 75 6e 64 65 64 20 62 79 |es surro|unded by|
|00000580| 20 77 6f 72 64 20 62 6f | 75 6e 64 61 72 69 65 73 | word bo|undaries|
|00000590| 2e 0a 0a 54 6f 20 63 75 | 73 74 6f 6d 69 7a 65 20 |...To cu|stomize |
|000005a0| 70 6f 73 73 69 62 6c 65 | 20 72 65 73 70 6f 6e 73 |possible| respons|
|000005b0| 65 73 2c 20 63 68 61 6e | 67 65 20 74 68 65 20 5c |es, chan|ge the \|
|000005c0| 22 62 69 6e 64 69 6e 67 | 73 5c 22 20 69 6e 20 60 |"binding|s\" in `|
|000005d0| 71 75 65 72 79 2d 72 65 | 70 6c 61 63 65 2d 6d 61 |query-re|place-ma|
|000005e0| 70 27 2e 22 20 28 71 75 | 65 72 79 2d 72 65 70 6c |p'." (qu|ery-repl|
|000005f0| 61 63 65 2d 72 65 61 64 | 2d 61 72 67 73 20 22 51 |ace-read|-args "Q|
|00000600| 75 65 72 79 20 72 65 70 | 6c 61 63 65 22 29 5d 29 |uery rep|lace")])|
|00000610| 0a 28 64 65 66 69 6e 65 | 2d 6b 65 79 20 65 73 63 |.(define|-key esc|
|00000620| 2d 6d 61 70 20 22 25 22 | 20 28 71 75 6f 74 65 20 |-map "%"| (quote |
|00000630| 71 75 65 72 79 2d 72 65 | 70 6c 61 63 65 29 29 0a |query-re|place)).|
|00000640| 28 64 65 66 61 6c 69 61 | 73 20 27 71 75 65 72 79 |(defalia|s 'query|
|00000650| 2d 72 65 70 6c 61 63 65 | 2d 72 65 67 65 78 70 20 |-replace|-regexp |
|00000660| 23 5b 28 72 65 67 65 78 | 70 20 74 6f 2d 73 74 72 |#[(regex|p to-str|
|00000670| 69 6e 67 20 26 6f 70 74 | 69 6f 6e 61 6c 20 61 72 |ing &opt|ional ar|
|00000680| 67 29 20 22 c0 09 5c 6e | c3 89 0c 25 88 0d 86 0f |g) "..\n|...%....|
|00000690| 00 c6 c7 21 87 22 20 5b | 70 65 72 66 6f 72 6d 2d |...!." [|perform-|
|000006a0| 72 65 70 6c 61 63 65 20 | 72 65 67 65 78 70 20 74 |replace |regexp t|
|000006b0| 6f 2d 73 74 72 69 6e 67 | 20 74 20 61 72 67 20 75 |o-string| t arg u|
|000006c0| 6e 72 65 61 64 2d 63 6f | 6d 6d 61 6e 64 2d 65 76 |nread-co|mmand-ev|
|000006d0| 65 6e 74 73 20 6d 65 73 | 73 61 67 65 20 22 44 6f |ents mes|sage "Do|
|000006e0| 6e 65 22 5d 20 36 20 22 | 5c 0a 52 65 70 6c 61 63 |ne"] 6 "|\.Replac|
|000006f0| 65 20 73 6f 6d 65 20 74 | 68 69 6e 67 73 20 61 66 |e some t|hings af|
|00000700| 74 65 72 20 70 6f 69 6e | 74 20 6d 61 74 63 68 69 |ter poin|t matchi|
|00000710| 6e 67 20 52 45 47 45 58 | 50 20 77 69 74 68 20 54 |ng REGEX|P with T|
|00000720| 4f 2d 53 54 52 49 4e 47 | 2e 0a 41 73 20 65 61 63 |O-STRING|..As eac|
|00000730| 68 20 6d 61 74 63 68 20 | 69 73 20 66 6f 75 6e 64 |h match |is found|
|00000740| 2c 20 74 68 65 20 75 73 | 65 72 20 6d 75 73 74 20 |, the us|er must |
|00000750| 74 79 70 65 20 61 20 63 | 68 61 72 61 63 74 65 72 |type a c|haracter|
|00000760| 20 73 61 79 69 6e 67 0a | 77 68 61 74 20 74 6f 20 | saying.|what to |
|00000770| 64 6f 20 77 69 74 68 20 | 69 74 2e 20 20 46 6f 72 |do with |it. For|
|00000780| 20 64 69 72 65 63 74 69 | 6f 6e 73 2c 20 74 79 70 | directi|ons, typ|
|00000790| 65 20 5c 5c 5b 68 65 6c | 70 2d 63 6f 6d 6d 61 6e |e \\[hel|p-comman|
|000007a0| 64 5d 20 61 74 20 74 68 | 61 74 20 74 69 6d 65 2e |d] at th|at time.|
|000007b0| 0a 0a 50 72 65 73 65 72 | 76 65 73 20 63 61 73 65 |..Preser|ves case|
|000007c0| 20 69 6e 20 65 61 63 68 | 20 72 65 70 6c 61 63 65 | in each| replace|
|000007d0| 6d 65 6e 74 20 69 66 20 | 20 63 61 73 65 2d 72 65 |ment if | case-re|
|000007e0| 70 6c 61 63 65 20 20 61 | 6e 64 20 20 63 61 73 65 |place a|nd case|
|000007f0| 2d 66 6f 6c 64 2d 73 65 | 61 72 63 68 0a 61 72 65 |-fold-se|arch.are|
|00000800| 20 6e 6f 6e 2d 6e 69 6c | 20 61 6e 64 20 52 45 47 | non-nil| and REG|
|00000810| 45 58 50 20 68 61 73 20 | 6e 6f 20 75 70 70 65 72 |EXP has |no upper|
|00000820| 63 61 73 65 20 6c 65 74 | 74 65 72 73 2e 0a 54 68 |case let|ters..Th|
|00000830| 69 72 64 20 61 72 67 20 | 44 45 4c 49 4d 49 54 45 |ird arg |DELIMITE|
|00000840| 44 20 28 70 72 65 66 69 | 78 20 61 72 67 20 69 66 |D (prefi|x arg if|
|00000850| 20 69 6e 74 65 72 61 63 | 74 69 76 65 29 20 6e 6f | interac|tive) no|
|00000860| 6e 2d 6e 69 6c 20 6d 65 | 61 6e 73 20 72 65 70 6c |n-nil me|ans repl|
|00000870| 61 63 65 0a 6f 6e 6c 79 | 20 6d 61 74 63 68 65 73 |ace.only| matches|
|00000880| 20 73 75 72 72 6f 75 6e | 64 65 64 20 62 79 20 77 | surroun|ded by w|
|00000890| 6f 72 64 20 62 6f 75 6e | 64 61 72 69 65 73 2e 0a |ord boun|daries..|
|000008a0| 49 6e 20 54 4f 2d 53 54 | 52 49 4e 47 2c 20 5c 5c |In TO-ST|RING, \\|
|000008b0| 26 20 6d 65 61 6e 73 20 | 69 6e 73 65 72 74 20 77 |& means |insert w|
|000008c0| 68 61 74 20 6d 61 74 63 | 68 65 64 20 52 45 47 45 |hat matc|hed REGE|
|000008d0| 58 50 2c 0a 61 6e 64 20 | 5c 5c 3d 5c 5c 3c 6e 3e |XP,.and |\\=\\<n>|
|000008e0| 20 6d 65 61 6e 73 20 69 | 6e 73 65 72 74 20 77 68 | means i|nsert wh|
|000008f0| 61 74 20 6d 61 74 63 68 | 65 64 20 3c 6e 3e 74 68 |at match|ed <n>th|
|00000900| 20 5c 5c 28 2e 2e 2e 5c | 5c 29 20 69 6e 20 52 45 | \\(...\|\) in RE|
|00000910| 47 45 58 50 2e 22 20 28 | 71 75 65 72 79 2d 72 65 |GEXP." (|query-re|
|00000920| 70 6c 61 63 65 2d 72 65 | 61 64 2d 61 72 67 73 20 |place-re|ad-args |
|00000930| 22 51 75 65 72 79 20 72 | 65 70 6c 61 63 65 20 72 |"Query r|eplace r|
|00000940| 65 67 65 78 70 22 29 5d | 29 0a 28 64 65 66 61 6c |egexp")]|).(defal|
|00000950| 69 61 73 20 27 6d 61 70 | 2d 71 75 65 72 79 2d 72 |ias 'map|-query-r|
|00000960| 65 70 6c 61 63 65 2d 72 | 65 67 65 78 70 20 23 5b |eplace-r|egexp #[|
|00000970| 28 72 65 67 65 78 70 20 | 74 6f 2d 73 74 72 69 6e |(regexp |to-strin|
|00000980| 67 73 20 26 6f 70 74 69 | 6f 6e 61 6c 20 61 72 67 |gs &opti|onal arg|
|00000990| 29 20 22 c0 19 5c 6e 3c | 83 0c 00 5c 6e 11 82 3f |) "..\n<|...\n..?|
|000009a0| 00 5c 6e 47 c3 55 84 3f | 00 c4 c5 5c 6e 5c 22 83 |.\nG.U.?|...\n\".|
|000009b0| 33 00 c6 09 5c 6e c3 c4 | c5 5c 6e 5c 22 4f 43 5c |3...\n..|.\n\"OC\|
|000009c0| 22 11 5c 6e c4 c5 5c 6e | 5c 22 54 c0 4f 89 12 82 |".\n..\n|\"T.O...|
|000009d0| 0d 00 c6 09 5c 6e 43 5c | 22 11 c7 89 12 82 0d 00 |....\nC\|".......|
|000009e0| c8 0e 09 09 ca 89 c0 0e | 0b 26 06 88 29 0e 0c 86 |........|.&..)...|
|000009f0| 54 00 cd ce 21 87 22 20 | 5b 6e 69 6c 20 72 65 70 |T...!." |[nil rep|
|00000a00| 6c 61 63 65 6d 65 6e 74 | 73 20 74 6f 2d 73 74 72 |lacement|s to-str|
|00000a10| 69 6e 67 73 20 30 20 73 | 74 72 69 6e 67 2d 6d 61 |ings 0 s|tring-ma|
|00000a20| 74 63 68 20 22 20 22 20 | 61 70 70 65 6e 64 20 22 |tch " " |append "|
|00000a30| 22 20 70 65 72 66 6f 72 | 6d 2d 72 65 70 6c 61 63 |" perfor|m-replac|
|00000a40| 65 20 72 65 67 65 78 70 | 20 74 20 61 72 67 20 75 |e regexp| t arg u|
|00000a50| 6e 72 65 61 64 2d 63 6f | 6d 6d 61 6e 64 2d 65 76 |nread-co|mmand-ev|
|00000a60| 65 6e 74 73 20 6d 65 73 | 73 61 67 65 20 22 44 6f |ents mes|sage "Do|
|00000a70| 6e 65 22 5d 20 38 20 22 | 5c 0a 52 65 70 6c 61 63 |ne"] 8 "|\.Replac|
|00000a80| 65 20 73 6f 6d 65 20 6d | 61 74 63 68 65 73 20 66 |e some m|atches f|
|00000a90| 6f 72 20 52 45 47 45 58 | 50 20 77 69 74 68 20 76 |or REGEX|P with v|
|00000aa0| 61 72 69 6f 75 73 20 73 | 74 72 69 6e 67 73 2c 20 |arious s|trings, |
|00000ab0| 69 6e 20 72 6f 74 61 74 | 69 6f 6e 2e 0a 54 68 65 |in rotat|ion..The|
|00000ac0| 20 73 65 63 6f 6e 64 20 | 61 72 67 75 6d 65 6e 74 | second |argument|
|00000ad0| 20 54 4f 2d 53 54 52 49 | 4e 47 53 20 63 6f 6e 74 | TO-STRI|NGS cont|
|00000ae0| 61 69 6e 73 20 74 68 65 | 20 72 65 70 6c 61 63 65 |ains the| replace|
|00000af0| 6d 65 6e 74 20 73 74 72 | 69 6e 67 73 2c 20 73 65 |ment str|ings, se|
|00000b00| 70 61 72 61 74 65 64 0a | 62 79 20 73 70 61 63 65 |parated.|by space|
|00000b10| 73 2e 20 20 54 68 69 73 | 20 63 6f 6d 6d 61 6e 64 |s. This| command|
|00000b20| 20 77 6f 72 6b 73 20 6c | 69 6b 65 20 60 71 75 65 | works l|ike `que|
|00000b30| 72 79 2d 72 65 70 6c 61 | 63 65 2d 72 65 67 65 78 |ry-repla|ce-regex|
|00000b40| 70 27 20 65 78 63 65 70 | 74 0a 74 68 61 74 20 65 |p' excep|t.that e|
|00000b50| 61 63 68 20 73 75 63 63 | 65 73 73 69 76 65 20 72 |ach succ|essive r|
|00000b60| 65 70 6c 61 63 65 6d 65 | 6e 74 20 75 73 65 73 20 |eplaceme|nt uses |
|00000b70| 74 68 65 20 6e 65 78 74 | 20 73 75 63 63 65 73 73 |the next| success|
|00000b80| 69 76 65 20 72 65 70 6c | 61 63 65 6d 65 6e 74 20 |ive repl|acement |
|00000b90| 73 74 72 69 6e 67 2c 0a | 77 72 61 70 70 69 6e 67 |string,.|wrapping|
|00000ba0| 20 61 72 6f 75 6e 64 20 | 66 72 6f 6d 20 74 68 65 | around |from the|
|00000bb0| 20 6c 61 73 74 20 73 75 | 63 68 20 73 74 72 69 6e | last su|ch strin|
|00000bc0| 67 20 74 6f 20 74 68 65 | 20 66 69 72 73 74 2e 0a |g to the| first..|
|00000bd0| 0a 4e 6f 6e 2d 69 6e 74 | 65 72 61 63 74 69 76 65 |.Non-int|eractive|
|00000be0| 6c 79 2c 20 54 4f 2d 53 | 54 52 49 4e 47 53 20 6d |ly, TO-S|TRINGS m|
|00000bf0| 61 79 20 62 65 20 61 20 | 6c 69 73 74 20 6f 66 20 |ay be a |list of |
|00000c00| 72 65 70 6c 61 63 65 6d | 65 6e 74 20 73 74 72 69 |replacem|ent stri|
|00000c10| 6e 67 73 2e 0a 0a 41 20 | 70 72 65 66 69 78 20 61 |ngs...A |prefix a|
|00000c20| 72 67 75 6d 65 6e 74 20 | 4e 20 73 61 79 73 20 74 |rgument |N says t|
|00000c30| 6f 20 75 73 65 20 65 61 | 63 68 20 72 65 70 6c 61 |o use ea|ch repla|
|00000c40| 63 65 6d 65 6e 74 20 73 | 74 72 69 6e 67 20 4e 20 |cement s|tring N |
|00000c50| 74 69 6d 65 73 0a 62 65 | 66 6f 72 65 20 72 6f 74 |times.be|fore rot|
|00000c60| 61 74 69 6e 67 20 74 6f | 20 74 68 65 20 6e 65 78 |ating to| the nex|
|00000c70| 74 2e 22 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |t." (byt|e-code "|
|00000c80| c0 89 19 1a c3 c4 c0 89 | 89 c5 25 12 c3 c6 c7 5c |........|..%....\|
|00000c90| 6e 5c 22 c0 89 89 c5 25 | 11 5c 6e 09 0e 08 45 2a |n\"....%|.\n...E*|
|00000ca0| 87 22 20 5b 6e 69 6c 20 | 74 6f 20 66 72 6f 6d 20 |." [nil |to from |
|00000cb0| 72 65 61 64 2d 66 72 6f | 6d 2d 6d 69 6e 69 62 75 |read-fro|m-minibu|
|00000cc0| 66 66 65 72 20 22 4d 61 | 70 20 71 75 65 72 79 20 |ffer "Ma|p query |
|00000cd0| 72 65 70 6c 61 63 65 20 | 28 72 65 67 65 78 70 29 |replace |(regexp)|
|00000ce0| 3a 20 22 20 71 75 65 72 | 79 2d 72 65 70 6c 61 63 |: " quer|y-replac|
|00000cf0| 65 2d 68 69 73 74 6f 72 | 79 20 66 6f 72 6d 61 74 |e-histor|y format|
|00000d00| 20 22 51 75 65 72 79 20 | 72 65 70 6c 61 63 65 20 | "Query |replace |
|00000d10| 25 73 20 77 69 74 68 20 | 28 73 70 61 63 65 2d 73 |%s with |(space-s|
|00000d20| 65 70 61 72 61 74 65 64 | 20 73 74 72 69 6e 67 73 |eparated| strings|
|00000d30| 29 3a 20 22 20 63 75 72 | 72 65 6e 74 2d 70 72 65 |): " cur|rent-pre|
|00000d40| 66 69 78 2d 61 72 67 5d | 20 36 29 5d 29 0a 28 64 |fix-arg]| 6)]).(d|
|00000d50| 65 66 61 6c 69 61 73 20 | 27 72 65 70 6c 61 63 65 |efalias |'replace|
|00000d60| 2d 73 74 72 69 6e 67 20 | 23 5b 28 66 72 6f 6d 2d |-string |#[(from-|
|00000d70| 73 74 72 69 6e 67 20 74 | 6f 2d 73 74 72 69 6e 67 |string t|o-string|
|00000d80| 20 26 6f 70 74 69 6f 6e | 61 6c 20 64 65 6c 69 6d | &option|al delim|
|00000d90| 69 74 65 64 29 20 22 c0 | 09 5c 6e c3 89 0c 25 88 |ited) ".|.\n...%.|
|00000da0| 0d 86 0f 00 c6 c7 21 87 | 22 20 5b 70 65 72 66 6f |......!.|" [perfo|
|00000db0| 72 6d 2d 72 65 70 6c 61 | 63 65 20 66 72 6f 6d 2d |rm-repla|ce from-|
|00000dc0| 73 74 72 69 6e 67 20 74 | 6f 2d 73 74 72 69 6e 67 |string t|o-string|
|00000dd0| 20 6e 69 6c 20 64 65 6c | 69 6d 69 74 65 64 20 75 | nil del|imited u|
|00000de0| 6e 72 65 61 64 2d 63 6f | 6d 6d 61 6e 64 2d 65 76 |nread-co|mmand-ev|
|00000df0| 65 6e 74 73 20 6d 65 73 | 73 61 67 65 20 22 44 6f |ents mes|sage "Do|
|00000e00| 6e 65 22 5d 20 36 20 22 | 5c 0a 52 65 70 6c 61 63 |ne"] 6 "|\.Replac|
|00000e10| 65 20 6f 63 63 75 72 72 | 65 6e 63 65 73 20 6f 66 |e occurr|ences of|
|00000e20| 20 46 52 4f 4d 2d 53 54 | 52 49 4e 47 20 77 69 74 | FROM-ST|RING wit|
|00000e30| 68 20 54 4f 2d 53 54 52 | 49 4e 47 2e 0a 50 72 65 |h TO-STR|ING..Pre|
|00000e40| 73 65 72 76 65 20 63 61 | 73 65 20 69 6e 20 65 61 |serve ca|se in ea|
|00000e50| 63 68 20 6d 61 74 63 68 | 20 69 66 20 60 63 61 73 |ch match| if `cas|
|00000e60| 65 2d 72 65 70 6c 61 63 | 65 27 20 61 6e 64 20 60 |e-replac|e' and `|
|00000e70| 63 61 73 65 2d 66 6f 6c | 64 2d 73 65 61 72 63 68 |case-fol|d-search|
|00000e80| 27 0a 61 72 65 20 6e 6f | 6e 2d 6e 69 6c 20 61 6e |'.are no|n-nil an|
|00000e90| 64 20 46 52 4f 4d 2d 53 | 54 52 49 4e 47 20 68 61 |d FROM-S|TRING ha|
|00000ea0| 73 20 6e 6f 20 75 70 70 | 65 72 63 61 73 65 20 6c |s no upp|ercase l|
|00000eb0| 65 74 74 65 72 73 2e 0a | 54 68 69 72 64 20 61 72 |etters..|Third ar|
|00000ec0| 67 20 44 45 4c 49 4d 49 | 54 45 44 20 28 70 72 65 |g DELIMI|TED (pre|
|00000ed0| 66 69 78 20 61 72 67 20 | 69 66 20 69 6e 74 65 72 |fix arg |if inter|
|00000ee0| 61 63 74 69 76 65 29 20 | 6e 6f 6e 2d 6e 69 6c 20 |active) |non-nil |
|00000ef0| 6d 65 61 6e 73 20 72 65 | 70 6c 61 63 65 0a 6f 6e |means re|place.on|
|00000f00| 6c 79 20 6d 61 74 63 68 | 65 73 20 73 75 72 72 6f |ly match|es surro|
|00000f10| 75 6e 64 65 64 20 62 79 | 20 77 6f 72 64 20 62 6f |unded by| word bo|
|00000f20| 75 6e 64 61 72 69 65 73 | 2e 0a 0a 54 68 69 73 20 |undaries|...This |
|00000f30| 66 75 6e 63 74 69 6f 6e | 20 69 73 20 75 73 75 61 |function| is usua|
|00000f40| 6c 6c 79 20 74 68 65 20 | 77 72 6f 6e 67 20 74 68 |lly the |wrong th|
|00000f50| 69 6e 67 20 74 6f 20 75 | 73 65 20 69 6e 20 61 20 |ing to u|se in a |
|00000f60| 4c 69 73 70 20 70 72 6f | 67 72 61 6d 2e 0a 57 68 |Lisp pro|gram..Wh|
|00000f70| 61 74 20 79 6f 75 20 70 | 72 6f 62 61 62 6c 79 20 |at you p|robably |
|00000f80| 77 61 6e 74 20 69 73 20 | 61 20 6c 6f 6f 70 20 6c |want is |a loop l|
|00000f90| 69 6b 65 20 74 68 69 73 | 3a 0a 20 20 28 77 68 69 |ike this|:. (whi|
|00000fa0| 6c 65 20 28 73 65 61 72 | 63 68 2d 66 6f 72 77 61 |le (sear|ch-forwa|
|00000fb0| 72 64 20 4f 4c 44 2d 53 | 54 52 49 4e 47 20 6e 69 |rd OLD-S|TRING ni|
|00000fc0| 6c 20 74 29 0a 20 20 20 | 20 28 72 65 70 6c 61 63 |l t). | (replac|
|00000fd0| 65 2d 6d 61 74 63 68 20 | 52 45 50 4c 41 43 45 4d |e-match |REPLACEM|
|00000fe0| 45 4e 54 20 6e 69 6c 20 | 74 29 29 0a 77 68 69 63 |ENT nil |t)).whic|
|00000ff0| 68 20 77 69 6c 6c 20 72 | 75 6e 20 66 61 73 74 65 |h will r|un faste|
|00001000| 72 20 61 6e 64 20 77 69 | 6c 6c 20 6e 6f 74 20 73 |r and wi|ll not s|
|00001010| 65 74 20 74 68 65 20 6d | 61 72 6b 20 6f 72 20 70 |et the m|ark or p|
|00001020| 72 69 6e 74 20 61 6e 79 | 74 68 69 6e 67 2e 22 20 |rint any|thing." |
|00001030| 28 71 75 65 72 79 2d 72 | 65 70 6c 61 63 65 2d 72 |(query-r|eplace-r|
|00001040| 65 61 64 2d 61 72 67 73 | 20 22 52 65 70 6c 61 63 |ead-args| "Replac|
|00001050| 65 20 73 74 72 69 6e 67 | 22 29 5d 29 0a 28 64 65 |e string|")]).(de|
|00001060| 66 61 6c 69 61 73 20 27 | 72 65 70 6c 61 63 65 2d |falias '|replace-|
|00001070| 72 65 67 65 78 70 20 23 | 5b 28 72 65 67 65 78 70 |regexp #|[(regexp|
|00001080| 20 74 6f 2d 73 74 72 69 | 6e 67 20 26 6f 70 74 69 | to-stri|ng &opti|
|00001090| 6f 6e 61 6c 20 64 65 6c | 69 6d 69 74 65 64 29 20 |onal del|imited) |
|000010a0| 22 c0 09 5c 6e c3 c4 0d | 25 88 0e 06 86 10 00 c7 |"..\n...|%.......|
|000010b0| c8 21 87 22 20 5b 70 65 | 72 66 6f 72 6d 2d 72 65 |.!." [pe|rform-re|
|000010c0| 70 6c 61 63 65 20 72 65 | 67 65 78 70 20 74 6f 2d |place re|gexp to-|
|000010d0| 73 74 72 69 6e 67 20 6e | 69 6c 20 74 20 64 65 6c |string n|il t del|
|000010e0| 69 6d 69 74 65 64 20 75 | 6e 72 65 61 64 2d 63 6f |imited u|nread-co|
|000010f0| 6d 6d 61 6e 64 2d 65 76 | 65 6e 74 73 20 6d 65 73 |mmand-ev|ents mes|
|00001100| 73 61 67 65 20 22 44 6f | 6e 65 22 5d 20 36 20 22 |sage "Do|ne"] 6 "|
|00001110| 5c 0a 52 65 70 6c 61 63 | 65 20 74 68 69 6e 67 73 |\.Replac|e things|
|00001120| 20 61 66 74 65 72 20 70 | 6f 69 6e 74 20 6d 61 74 | after p|oint mat|
|00001130| 63 68 69 6e 67 20 52 45 | 47 45 58 50 20 77 69 74 |ching RE|GEXP wit|
|00001140| 68 20 54 4f 2d 53 54 52 | 49 4e 47 2e 0a 50 72 65 |h TO-STR|ING..Pre|
|00001150| 73 65 72 76 65 20 63 61 | 73 65 20 69 6e 20 65 61 |serve ca|se in ea|
|00001160| 63 68 20 6d 61 74 63 68 | 20 69 66 20 63 61 73 65 |ch match| if case|
|00001170| 2d 72 65 70 6c 61 63 65 | 20 61 6e 64 20 63 61 73 |-replace| and cas|
|00001180| 65 2d 66 6f 6c 64 2d 73 | 65 61 72 63 68 0a 61 72 |e-fold-s|earch.ar|
|00001190| 65 20 6e 6f 6e 2d 6e 69 | 6c 20 61 6e 64 20 52 45 |e non-ni|l and RE|
|000011a0| 47 45 58 50 20 68 61 73 | 20 6e 6f 20 75 70 70 65 |GEXP has| no uppe|
|000011b0| 72 63 61 73 65 20 6c 65 | 74 74 65 72 73 2e 0a 54 |rcase le|tters..T|
|000011c0| 68 69 72 64 20 61 72 67 | 20 44 45 4c 49 4d 49 54 |hird arg| DELIMIT|
|000011d0| 45 44 20 28 70 72 65 66 | 69 78 20 61 72 67 20 69 |ED (pref|ix arg i|
|000011e0| 66 20 69 6e 74 65 72 61 | 63 74 69 76 65 29 20 6e |f intera|ctive) n|
|000011f0| 6f 6e 2d 6e 69 6c 20 6d | 65 61 6e 73 20 72 65 70 |on-nil m|eans rep|
|00001200| 6c 61 63 65 0a 6f 6e 6c | 79 20 6d 61 74 63 68 65 |lace.onl|y matche|
|00001210| 73 20 73 75 72 72 6f 75 | 6e 64 65 64 20 62 79 20 |s surrou|nded by |
|00001220| 77 6f 72 64 20 62 6f 75 | 6e 64 61 72 69 65 73 2e |word bou|ndaries.|
|00001230| 0a 49 6e 20 54 4f 2d 53 | 54 52 49 4e 47 2c 20 5c |.In TO-S|TRING, \|
|00001240| 5c 26 20 6d 65 61 6e 73 | 20 69 6e 73 65 72 74 20 |\& means| insert |
|00001250| 77 68 61 74 20 6d 61 74 | 63 68 65 64 20 52 45 47 |what mat|ched REG|
|00001260| 45 58 50 2c 0a 61 6e 64 | 20 5c 5c 3d 5c 5c 3c 6e |EXP,.and| \\=\\<n|
|00001270| 3e 20 6d 65 61 6e 73 20 | 69 6e 73 65 72 74 20 77 |> means |insert w|
|00001280| 68 61 74 20 6d 61 74 63 | 68 65 64 20 3c 6e 3e 74 |hat matc|hed <n>t|
|00001290| 68 20 5c 5c 28 2e 2e 2e | 5c 5c 29 20 69 6e 20 52 |h \\(...|\\) in R|
|000012a0| 45 47 45 58 50 2e 0a 0a | 54 68 69 73 20 66 75 6e |EGEXP...|This fun|
|000012b0| 63 74 69 6f 6e 20 69 73 | 20 75 73 75 61 6c 6c 79 |ction is| usually|
|000012c0| 20 74 68 65 20 77 72 6f | 6e 67 20 74 68 69 6e 67 | the wro|ng thing|
|000012d0| 20 74 6f 20 75 73 65 20 | 69 6e 20 61 20 4c 69 73 | to use |in a Lis|
|000012e0| 70 20 70 72 6f 67 72 61 | 6d 2e 0a 57 68 61 74 20 |p progra|m..What |
|000012f0| 79 6f 75 20 70 72 6f 62 | 61 62 6c 79 20 77 61 6e |you prob|ably wan|
|00001300| 74 20 69 73 20 61 20 6c | 6f 6f 70 20 6c 69 6b 65 |t is a l|oop like|
|00001310| 20 74 68 69 73 3a 0a 20 | 20 28 77 68 69 6c 65 20 | this:. | (while |
|00001320| 28 72 65 2d 73 65 61 72 | 63 68 2d 66 6f 72 77 61 |(re-sear|ch-forwa|
|00001330| 72 64 20 52 45 47 45 58 | 50 20 6e 69 6c 20 74 29 |rd REGEX|P nil t)|
|00001340| 0a 20 20 20 20 28 72 65 | 70 6c 61 63 65 2d 6d 61 |. (re|place-ma|
|00001350| 74 63 68 20 52 45 50 4c | 41 43 45 4d 45 4e 54 20 |tch REPL|ACEMENT |
|00001360| 6e 69 6c 20 6e 69 6c 29 | 29 0a 77 68 69 63 68 20 |nil nil)|).which |
|00001370| 77 69 6c 6c 20 72 75 6e | 20 66 61 73 74 65 72 20 |will run| faster |
|00001380| 61 6e 64 20 77 69 6c 6c | 20 6e 6f 74 20 73 65 74 |and will| not set|
|00001390| 20 74 68 65 20 6d 61 72 | 6b 20 6f 72 20 70 72 69 | the mar|k or pri|
|000013a0| 6e 74 20 61 6e 79 74 68 | 69 6e 67 2e 22 20 28 71 |nt anyth|ing." (q|
|000013b0| 75 65 72 79 2d 72 65 70 | 6c 61 63 65 2d 72 65 61 |uery-rep|lace-rea|
|000013c0| 64 2d 61 72 67 73 20 22 | 52 65 70 6c 61 63 65 20 |d-args "|Replace |
|000013d0| 72 65 67 65 78 70 22 29 | 5d 29 0a 28 64 65 66 76 |regexp")|]).(defv|
|000013e0| 61 72 20 72 65 67 65 78 | 70 2d 68 69 73 74 6f 72 |ar regex|p-histor|
|000013f0| 79 20 6e 69 6c 20 22 5c | 0a 48 69 73 74 6f 72 79 |y nil "\|.History|
|00001400| 20 6c 69 73 74 20 66 6f | 72 20 73 6f 6d 65 20 63 | list fo|r some c|
|00001410| 6f 6d 6d 61 6e 64 73 20 | 74 68 61 74 20 72 65 61 |ommands |that rea|
|00001420| 64 20 72 65 67 75 6c 61 | 72 20 65 78 70 72 65 73 |d regula|r expres|
|00001430| 73 69 6f 6e 73 2e 22 29 | 0a 28 64 65 66 61 6c 69 |sions.")|.(defali|
|00001440| 61 73 20 28 71 75 6f 74 | 65 20 64 65 6c 65 74 65 |as (quot|e delete|
|00001450| 2d 6e 6f 6e 2d 6d 61 74 | 63 68 69 6e 67 2d 6c 69 |-non-mat|ching-li|
|00001460| 6e 65 73 29 20 28 71 75 | 6f 74 65 20 6b 65 65 70 |nes) (qu|ote keep|
|00001470| 2d 6c 69 6e 65 73 29 29 | 0a 28 64 65 66 61 6c 69 |-lines))|.(defali|
|00001480| 61 73 20 27 6b 65 65 70 | 2d 6c 69 6e 65 73 20 23 |as 'keep|-lines #|
|00001490| 5b 28 72 65 67 65 78 70 | 29 20 22 8a 6e 84 08 00 |[(regexp|) ".n...|
|000014a0| c0 79 88 60 19 6d 3f 85 | 50 00 c2 0b c4 c5 23 84 |.y.`.m?.|P.....#.|
|000014b0| 1e 00 09 64 7c 88 82 37 | 00 8a c6 94 62 88 c6 79 |...d|..7|....b..y|
|000014c0| 88 60 29 1e 07 09 0e 07 | 57 83 36 00 09 0e 07 7c |.`).....|W.6....||
|000014d0| 88 29 8a c0 79 88 60 29 | 11 6d 84 5c 6e 00 c6 94 |.)..y.`)|.m.\n...|
|000014e0| c6 95 55 83 5c 6e 00 c0 | 75 88 82 5c 6e 00 2a 87 |..U.\n..|u..\n.*.|
|000014f0| 22 20 5b 31 20 73 74 61 | 72 74 20 72 65 2d 73 65 |" [1 sta|rt re-se|
|00001500| 61 72 63 68 2d 66 6f 72 | 77 61 72 64 20 72 65 67 |arch-for|ward reg|
|00001510| 65 78 70 20 6e 69 6c 20 | 6d 6f 76 65 20 30 20 65 |exp nil |move 0 e|
|00001520| 6e 64 5d 20 34 20 22 5c | 0a 44 65 6c 65 74 65 20 |nd] 4 "\|.Delete |
|00001530| 61 6c 6c 20 6c 69 6e 65 | 73 20 65 78 63 65 70 74 |all line|s except|
|00001540| 20 74 68 6f 73 65 20 63 | 6f 6e 74 61 69 6e 69 6e | those c|ontainin|
|00001550| 67 20 6d 61 74 63 68 65 | 73 20 66 6f 72 20 52 45 |g matche|s for RE|
|00001560| 47 45 58 50 2e 0a 41 20 | 6d 61 74 63 68 20 73 70 |GEXP..A |match sp|
|00001570| 6c 69 74 20 61 63 72 6f | 73 73 20 6c 69 6e 65 73 |lit acro|ss lines|
|00001580| 20 70 72 65 73 65 72 76 | 65 73 20 61 6c 6c 20 74 | preserv|es all t|
|00001590| 68 65 20 6c 69 6e 65 73 | 20 69 74 20 6c 69 65 73 |he lines| it lies|
|000015a0| 20 69 6e 2e 0a 41 70 70 | 6c 69 65 73 20 74 6f 20 | in..App|lies to |
|000015b0| 61 6c 6c 20 6c 69 6e 65 | 73 20 61 66 74 65 72 20 |all line|s after |
|000015c0| 70 6f 69 6e 74 2e 22 20 | 28 6c 69 73 74 20 28 72 |point." |(list (r|
|000015d0| 65 61 64 2d 66 72 6f 6d | 2d 6d 69 6e 69 62 75 66 |ead-from|-minibuf|
|000015e0| 66 65 72 20 22 4b 65 65 | 70 20 6c 69 6e 65 73 20 |fer "Kee|p lines |
|000015f0| 28 63 6f 6e 74 61 69 6e | 69 6e 67 20 6d 61 74 63 |(contain|ing matc|
|00001600| 68 20 66 6f 72 20 72 65 | 67 65 78 70 29 3a 20 22 |h for re|gexp): "|
|00001610| 20 6e 69 6c 20 6e 69 6c | 20 6e 69 6c 20 28 71 75 | nil nil| nil (qu|
|00001620| 6f 74 65 20 72 65 67 65 | 78 70 2d 68 69 73 74 6f |ote rege|xp-histo|
|00001630| 72 79 29 29 29 5d 29 0a | 28 64 65 66 61 6c 69 61 |ry)))]).|(defalia|
|00001640| 73 20 28 71 75 6f 74 65 | 20 64 65 6c 65 74 65 2d |s (quote| delete-|
|00001650| 6d 61 74 63 68 69 6e 67 | 2d 6c 69 6e 65 73 29 20 |matching|-lines) |
|00001660| 28 71 75 6f 74 65 20 66 | 6c 75 73 68 2d 6c 69 6e |(quote f|lush-lin|
|00001670| 65 73 29 29 0a 28 64 65 | 66 61 6c 69 61 73 20 27 |es)).(de|falias '|
|00001680| 66 6c 75 73 68 2d 6c 69 | 6e 65 73 20 23 5b 28 72 |flush-li|nes #[(r|
|00001690| 65 67 65 78 70 29 20 22 | 8a 6d 3f 85 21 00 c0 09 |egexp) "|.m?.!...|
|000016a0| c2 c3 23 85 21 00 8a c4 | 94 62 88 c4 79 88 60 29 |..#.!...|.b..y.`)|
|000016b0| c5 79 88 60 7c 88 82 01 | 00 29 87 22 20 5b 72 65 |.y.`|...|.)." [re|
|000016c0| 2d 73 65 61 72 63 68 2d | 66 6f 72 77 61 72 64 20 |-search-|forward |
|000016d0| 72 65 67 65 78 70 20 6e | 69 6c 20 74 20 30 20 31 |regexp n|il t 0 1|
|000016e0| 5d 20 34 20 22 5c 0a 44 | 65 6c 65 74 65 20 6c 69 |] 4 "\.D|elete li|
|000016f0| 6e 65 73 20 63 6f 6e 74 | 61 69 6e 69 6e 67 20 6d |nes cont|aining m|
|00001700| 61 74 63 68 65 73 20 66 | 6f 72 20 52 45 47 45 58 |atches f|or REGEX|
|00001710| 50 2e 0a 49 66 20 61 20 | 6d 61 74 63 68 20 69 73 |P..If a |match is|
|00001720| 20 73 70 6c 69 74 20 61 | 63 72 6f 73 73 20 6c 69 | split a|cross li|
|00001730| 6e 65 73 2c 20 61 6c 6c | 20 74 68 65 20 6c 69 6e |nes, all| the lin|
|00001740| 65 73 20 69 74 20 6c 69 | 65 73 20 69 6e 20 61 72 |es it li|es in ar|
|00001750| 65 20 64 65 6c 65 74 65 | 64 2e 0a 41 70 70 6c 69 |e delete|d..Appli|
|00001760| 65 73 20 74 6f 20 6c 69 | 6e 65 73 20 61 66 74 65 |es to li|nes afte|
|00001770| 72 20 70 6f 69 6e 74 2e | 22 20 28 6c 69 73 74 20 |r point.|" (list |
|00001780| 28 72 65 61 64 2d 66 72 | 6f 6d 2d 6d 69 6e 69 62 |(read-fr|om-minib|
|00001790| 75 66 66 65 72 20 22 46 | 6c 75 73 68 20 6c 69 6e |uffer "F|lush lin|
|000017a0| 65 73 20 28 63 6f 6e 74 | 61 69 6e 69 6e 67 20 6d |es (cont|aining m|
|000017b0| 61 74 63 68 20 66 6f 72 | 20 72 65 67 65 78 70 29 |atch for| regexp)|
|000017c0| 3a 20 22 20 6e 69 6c 20 | 6e 69 6c 20 6e 69 6c 20 |: " nil |nil nil |
|000017d0| 28 71 75 6f 74 65 20 72 | 65 67 65 78 70 2d 68 69 |(quote r|egexp-hi|
|000017e0| 73 74 6f 72 79 29 29 29 | 5d 29 0a 28 64 65 66 61 |story)))|]).(defa|
|000017f0| 6c 69 61 73 20 28 71 75 | 6f 74 65 20 63 6f 75 6e |lias (qu|ote coun|
|00001800| 74 2d 6d 61 74 63 68 65 | 73 29 20 28 71 75 6f 74 |t-matche|s) (quot|
|00001810| 65 20 68 6f 77 2d 6d 61 | 6e 79 29 29 0a 28 64 65 |e how-ma|ny)).(de|
|00001820| 66 61 6c 69 61 73 20 27 | 68 6f 77 2d 6d 61 6e 79 |falias '|how-many|
|00001830| 20 23 5b 28 72 65 67 65 | 78 70 29 20 22 c0 c1 1a | #[(rege|xp) "...|
|00001840| 1b 8a 6d 84 25 00 60 12 | c4 0d c1 c6 23 83 25 00 |..m.%.`.|....#.%.|
|00001850| 5c 6e 60 55 83 1f 00 c7 | 75 88 82 05 00 0b 54 13 |\n`U....|u.....T.|
|00001860| 82 05 00 c8 c9 0b 5c 22 | 2b 87 22 20 5b 30 20 6e |......\"|+." [0 n|
|00001870| 69 6c 20 6f 70 6f 69 6e | 74 20 63 6f 75 6e 74 20 |il opoin|t count |
|00001880| 72 65 2d 73 65 61 72 63 | 68 2d 66 6f 72 77 61 72 |re-searc|h-forwar|
|00001890| 64 20 72 65 67 65 78 70 | 20 74 20 31 20 6d 65 73 |d regexp| t 1 mes|
|000018a0| 73 61 67 65 20 22 25 64 | 20 6f 63 63 75 72 72 65 |sage "%d| occurre|
|000018b0| 6e 63 65 73 22 5d 20 34 | 20 22 5c 0a 50 72 69 6e |nces"] 4| "\.Prin|
|000018c0| 74 20 6e 75 6d 62 65 72 | 20 6f 66 20 6d 61 74 63 |t number| of matc|
|000018d0| 68 65 73 20 66 6f 72 20 | 52 45 47 45 58 50 20 66 |hes for |REGEXP f|
|000018e0| 6f 6c 6c 6f 77 69 6e 67 | 20 70 6f 69 6e 74 2e 22 |ollowing| point."|
|000018f0| 20 28 6c 69 73 74 20 28 | 72 65 61 64 2d 66 72 6f | (list (|read-fro|
|00001900| 6d 2d 6d 69 6e 69 62 75 | 66 66 65 72 20 22 48 6f |m-minibu|ffer "Ho|
|00001910| 77 20 6d 61 6e 79 20 6d | 61 74 63 68 65 73 20 66 |w many m|atches f|
|00001920| 6f 72 20 28 72 65 67 65 | 78 70 29 3a 20 22 20 6e |or (rege|xp): " n|
|00001930| 69 6c 20 6e 69 6c 20 6e | 69 6c 20 28 71 75 6f 74 |il nil n|il (quot|
|00001940| 65 20 72 65 67 65 78 70 | 2d 68 69 73 74 6f 72 79 |e regexp|-history|
|00001950| 29 29 29 5d 29 0a 28 62 | 79 74 65 2d 63 6f 64 65 |)))]).(b|yte-code|
|00001960| 20 22 c0 c1 21 84 08 00 | c2 11 09 84 15 00 c3 20 | "..!...|....... |
|00001970| 11 c4 09 c5 c6 23 88 c0 | c7 21 84 1e 00 c2 16 07 |.....#..|.!......|
|00001980| c0 c8 21 84 27 00 c2 16 | 08 c0 c9 21 84 30 00 c2 |..!.'...|...!.0..|
|00001990| 16 09 c2 87 22 20 5b 62 | 6f 75 6e 64 70 20 6f 63 |...." [b|oundp oc|
|000019a0| 63 75 72 2d 6d 6f 64 65 | 2d 6d 61 70 20 6e 69 6c |cur-mode|-map nil|
|000019b0| 20 6d 61 6b 65 2d 73 70 | 61 72 73 65 2d 6b 65 79 | make-sp|arse-key|
|000019c0| 6d 61 70 20 64 65 66 69 | 6e 65 2d 6b 65 79 20 22 |map defi|ne-key "|
|000019d0| 03 03 22 20 6f 63 63 75 | 72 2d 6d 6f 64 65 2d 67 |.." occu|r-mode-g|
|000019e0| 6f 74 6f 2d 6f 63 63 75 | 72 72 65 6e 63 65 20 6f |oto-occu|rrence o|
|000019f0| 63 63 75 72 2d 62 75 66 | 66 65 72 20 6f 63 63 75 |ccur-buf|fer occu|
|00001a00| 72 2d 6e 6c 69 6e 65 73 | 20 6f 63 63 75 72 2d 70 |r-nlines| occur-p|
|00001a10| 6f 73 2d 6c 69 73 74 5d | 20 34 29 0a 28 64 65 66 |os-list]| 4).(def|
|00001a20| 61 6c 69 61 73 20 27 6f | 63 63 75 72 2d 6d 6f 64 |alias 'o|ccur-mod|
|00001a30| 65 20 23 5b 6e 69 6c 20 | 22 c0 20 88 c1 5c 6e 21 |e #[nil |". ..\n!|
|00001a40| 88 c3 14 c5 16 06 c7 c8 | 21 88 c7 c9 21 88 c7 ca |........|!...!...|
|00001a50| 21 87 22 20 5b 6b 69 6c | 6c 2d 61 6c 6c 2d 6c 6f |!." [kil|l-all-lo|
|00001a60| 63 61 6c 2d 76 61 72 69 | 61 62 6c 65 73 20 75 73 |cal-vari|ables us|
|00001a70| 65 2d 6c 6f 63 61 6c 2d | 6d 61 70 20 6f 63 63 75 |e-local-|map occu|
|00001a80| 72 2d 6d 6f 64 65 2d 6d | 61 70 20 6f 63 63 75 72 |r-mode-m|ap occur|
|00001a90| 2d 6d 6f 64 65 20 6d 61 | 6a 6f 72 2d 6d 6f 64 65 |-mode ma|jor-mode|
|00001aa0| 20 22 4f 63 63 75 72 22 | 20 6d 6f 64 65 2d 6e 61 | "Occur"| mode-na|
|00001ab0| 6d 65 20 6d 61 6b 65 2d | 6c 6f 63 61 6c 2d 76 61 |me make-|local-va|
|00001ac0| 72 69 61 62 6c 65 20 6f | 63 63 75 72 2d 62 75 66 |riable o|ccur-buf|
|00001ad0| 66 65 72 20 6f 63 63 75 | 72 2d 6e 6c 69 6e 65 73 |fer occu|r-nlines|
|00001ae0| 20 6f 63 63 75 72 2d 70 | 6f 73 2d 6c 69 73 74 5d | occur-p|os-list]|
|00001af0| 20 32 20 22 5c 0a 4d 61 | 6a 6f 72 20 6d 6f 64 65 | 2 "\.Ma|jor mode|
|00001b00| 20 66 6f 72 20 6f 75 74 | 70 75 74 20 66 72 6f 6d | for out|put from|
|00001b10| 20 5c 5c 5b 6f 63 63 75 | 72 5d 2e 0a 4d 6f 76 65 | \\[occu|r]..Move|
|00001b20| 20 70 6f 69 6e 74 20 74 | 6f 20 6f 6e 65 20 6f 66 | point t|o one of|
|00001b30| 20 74 68 65 20 6f 63 63 | 75 72 72 65 6e 63 65 73 | the occ|urrences|
|00001b40| 20 69 6e 20 74 68 69 73 | 20 62 75 66 66 65 72 2c | in this| buffer,|
|00001b50| 0a 74 68 65 6e 20 75 73 | 65 20 5c 5c 5b 6f 63 63 |.then us|e \\[occ|
|00001b60| 75 72 2d 6d 6f 64 65 2d | 67 6f 74 6f 2d 6f 63 63 |ur-mode-|goto-occ|
|00001b70| 75 72 72 65 6e 63 65 5d | 20 74 6f 20 67 6f 20 74 |urrence]| to go t|
|00001b80| 6f 20 74 68 65 20 73 61 | 6d 65 20 6f 63 63 75 72 |o the sa|me occur|
|00001b90| 72 65 6e 63 65 0a 69 6e | 20 74 68 65 20 62 75 66 |rence.in| the buf|
|00001ba0| 66 65 72 20 74 68 61 74 | 20 74 68 65 20 6f 63 63 |fer that| the occ|
|00001bb0| 75 72 72 65 6e 63 65 73 | 20 77 65 72 65 20 66 6f |urrences| were fo|
|00001bc0| 75 6e 64 20 69 6e 2e 0a | 5c 5c 7b 6f 63 63 75 72 |und in..|\\{occur|
|00001bd0| 2d 6d 6f 64 65 2d 6d 61 | 70 7d 22 5d 29 0a 28 64 |-mode-ma|p}"]).(d|
|00001be0| 65 66 61 6c 69 61 73 20 | 27 6f 63 63 75 72 2d 6d |efalias |'occur-m|
|00001bf0| 6f 64 65 2d 67 6f 74 6f | 2d 6f 63 63 75 72 72 65 |ode-goto|-occurre|
|00001c00| 6e 63 65 20 23 5b 6e 69 | 6c 20 22 08 83 5c 6e 00 |nce #[ni|l "..\n.|
|00001c10| c1 08 21 84 12 00 c2 10 | c2 13 c4 c5 21 88 8a c6 |..!.....|....!...|
|00001c20| 79 88 c7 65 8a c6 79 88 | 60 29 5c 22 53 0e 08 c6 |y..e..y.|`)\"S...|
|00001c30| 57 83 2e 00 c9 0e 08 5a | 82 3f 00 0e 08 c6 56 83 |W......Z|.?....V.|
|00001c40| 3e 00 0e 08 89 5c 5c c9 | 5c 5c 82 3f 00 ca a5 29 |>....\\.|\\.?...)|
|00001c50| 89 1e 0b 0b 38 1e 0c cd | 08 21 88 ce 0e 0c 21 62 |....8...|.!....!b|
|00001c60| 2a 87 22 20 5b 6f 63 63 | 75 72 2d 62 75 66 66 65 |*." [occ|ur-buffe|
|00001c70| 72 20 62 75 66 66 65 72 | 2d 6e 61 6d 65 20 6e 69 |r buffer|-name ni|
|00001c80| 6c 20 6f 63 63 75 72 2d | 70 6f 73 2d 6c 69 73 74 |l occur-|pos-list|
|00001c90| 20 65 72 72 6f 72 20 22 | 42 75 66 66 65 72 20 69 | error "|Buffer i|
|00001ca0| 6e 20 77 68 69 63 68 20 | 6f 63 63 75 72 72 65 6e |n which |occurren|
|00001cb0| 63 65 73 20 77 65 72 65 | 20 66 6f 75 6e 64 20 69 |ces were| found i|
|00001cc0| 73 20 64 65 6c 65 74 65 | 64 22 20 30 20 63 6f 75 |s delete|d" 0 cou|
|00001cd0| 6e 74 2d 6c 69 6e 65 73 | 20 6f 63 63 75 72 2d 6e |nt-lines| occur-n|
|00001ce0| 6c 69 6e 65 73 20 32 20 | 31 20 6f 63 63 75 72 2d |lines 2 |1 occur-|
|00001cf0| 6e 75 6d 62 65 72 20 70 | 6f 73 20 70 6f 70 2d 74 |number p|os pop-t|
|00001d00| 6f 2d 62 75 66 66 65 72 | 20 6d 61 72 6b 65 72 2d |o-buffer| marker-|
|00001d10| 70 6f 73 69 74 69 6f 6e | 5d 20 34 20 22 5c 0a 47 |position|] 4 "\.G|
|00001d20| 6f 20 74 6f 20 74 68 65 | 20 6c 69 6e 65 20 74 68 |o to the| line th|
|00001d30| 69 73 20 6f 63 63 75 72 | 72 65 6e 63 65 20 77 61 |is occur|rence wa|
|00001d40| 73 20 66 6f 75 6e 64 20 | 69 6e 2c 20 69 6e 20 74 |s found |in, in t|
|00001d50| 68 65 20 62 75 66 66 65 | 72 20 69 74 20 77 61 73 |he buffe|r it was|
|00001d60| 20 66 6f 75 6e 64 20 69 | 6e 2e 22 20 6e 69 6c 5d | found i|n." nil]|
|00001d70| 29 0a 28 64 65 66 76 61 | 72 20 6c 69 73 74 2d 6d |).(defva|r list-m|
|00001d80| 61 74 63 68 69 6e 67 2d | 6c 69 6e 65 73 2d 64 65 |atching-|lines-de|
|00001d90| 66 61 75 6c 74 2d 63 6f | 6e 74 65 78 74 2d 6c 69 |fault-co|ntext-li|
|00001da0| 6e 65 73 20 30 20 22 5c | 0a 2a 44 65 66 61 75 6c |nes 0 "\|.*Defaul|
|00001db0| 74 20 6e 75 6d 62 65 72 | 20 6f 66 20 63 6f 6e 74 |t number| of cont|
|00001dc0| 65 78 74 20 6c 69 6e 65 | 73 20 74 6f 20 69 6e 63 |ext line|s to inc|
|00001dd0| 6c 75 64 65 20 61 72 6f | 75 6e 64 20 61 20 60 6c |lude aro|und a `l|
|00001de0| 69 73 74 2d 6d 61 74 63 | 68 69 6e 67 2d 6c 69 6e |ist-matc|hing-lin|
|00001df0| 65 73 27 0a 6d 61 74 63 | 68 2e 20 20 41 20 6e 65 |es'.matc|h. A ne|
|00001e00| 67 61 74 69 76 65 20 6e | 75 6d 62 65 72 20 6d 65 |gative n|umber me|
|00001e10| 61 6e 73 20 74 6f 20 69 | 6e 63 6c 75 64 65 20 74 |ans to i|nclude t|
|00001e20| 68 61 74 20 6d 61 6e 79 | 20 6c 69 6e 65 73 20 62 |hat many| lines b|
|00001e30| 65 66 6f 72 65 20 74 68 | 65 20 6d 61 74 63 68 2e |efore th|e match.|
|00001e40| 0a 41 20 70 6f 73 69 74 | 69 76 65 20 6e 75 6d 62 |.A posit|ive numb|
|00001e50| 65 72 20 6d 65 61 6e 73 | 20 74 6f 20 69 6e 63 6c |er means| to incl|
|00001e60| 75 64 65 20 74 68 61 74 | 20 6d 61 6e 79 20 6c 69 |ude that| many li|
|00001e70| 6e 65 73 20 62 6f 74 68 | 20 62 65 66 6f 72 65 20 |nes both| before |
|00001e80| 61 6e 64 20 61 66 74 65 | 72 2e 22 29 0a 28 64 65 |and afte|r.").(de|
|00001e90| 66 61 6c 69 61 73 20 28 | 71 75 6f 74 65 20 6c 69 |falias (|quote li|
|00001ea0| 73 74 2d 6d 61 74 63 68 | 69 6e 67 2d 6c 69 6e 65 |st-match|ing-line|
|00001eb0| 73 29 20 28 71 75 6f 74 | 65 20 6f 63 63 75 72 29 |s) (quot|e occur)|
|00001ec0| 29 0a 28 64 65 66 61 6c | 69 61 73 20 27 6f 63 63 |).(defal|ias 'occ|
|00001ed0| 75 72 20 23 5b 28 72 65 | 67 65 78 70 20 26 6f 70 |ur #[(re|gexp &op|
|00001ee0| 74 69 6f 6e 61 6c 20 6e | 6c 69 6e 65 73 29 20 22 |tional n|lines) "|
|00001ef0| 08 83 5c 6e 00 c1 08 21 | 82 0b 00 5c 6e 10 c3 70 |..\n...!|...\n..p|
|00001f00| c4 65 c5 20 1e 06 1e 07 | 1e 08 1e 09 1e 5c 6e cb |.e. ....|.....\n.|
|00001f10| 90 8a 0e 0c 71 88 cd 63 | 88 ce 0e 0f 21 88 d0 d1 |....q..c|....!...|
|00001f20| 0e 09 21 d2 d3 b1 04 88 | d4 20 88 0e 09 16 15 08 |..!.....|. ......|
|00001f30| 16 16 d7 16 18 29 0e 09 | 0e 0c 3d 83 4e 00 64 62 |.....)..|..=.N.db|
|00001f40| 88 8a d9 20 88 0e 07 64 | 55 84 6e 01 da 0e 0f d7 |... ...d|U.n.....|
|00001f50| c3 23 83 6e 01 db 94 62 | 88 db 79 88 dc 20 1e 1d |.#.n...b|..y.. ..|
|00001f60| de 8e 0e 08 df 0e 07 60 | 5c 22 5c 5c 16 08 2a 60 |.......`|\"\\..*`|
|00001f70| 16 07 db 95 62 88 8a db | 94 62 88 08 db 57 83 90 |....b...|.b...W..|
|00001f80| 00 08 82 92 00 08 5b 79 | 88 60 29 1e 20 8a db 95 |......[y|.`). ...|
|00001f90| 62 88 08 db 56 83 aa 00 | 08 54 79 88 82 ad 00 c4 |b...V...|.Ty.....|
|00001fa0| 79 88 60 29 1e 21 e2 e3 | 0e 08 5c 22 1e 24 e5 0e |y.`).!..|..\".$..|
|00001fb0| 24 47 e6 5c 22 1e 27 d7 | 1e 28 8a c5 20 89 16 28 |$G.\".'.|.(.. ..(|
|00001fc0| 60 d7 93 88 0e 0c 71 88 | 0e 28 0e 18 42 16 18 0e |`.....q.|.(..B...|
|00001fd0| 5c 6e 84 e6 00 e9 08 21 | 84 e6 00 ea 63 88 d7 16 |\n.....!|....c...|
|00001fe0| 5c 6e eb 0e 09 0e 20 0e | 21 23 88 ec 0e 21 0e 20 |\n.... .|!#...!. |
|00001ff0| 5a 21 88 08 89 16 28 db | 56 83 15 01 0e 27 ed b1 |Z!....(.|V....'..|
|00002000| 02 88 c4 79 88 0e 28 53 | 89 16 28 82 fe 00 0e 08 |...y..(S|..(.....|
|00002010| 1e 2e 0e 06 60 db 95 db | 94 5a 5c 5c d7 93 88 60 |....`...|.Z\\...`|
|00002020| 0e 06 57 83 4c 01 0e 24 | 84 38 01 e2 e3 0e 2e 5c |..W.L..$|.8.....\|
|00002030| 22 16 24 0e 24 ed b1 02 | 88 d7 16 24 c4 79 88 0e |".$.$...|...$.y..|
|00002040| 2e 54 16 2e 82 25 01 29 | 0e 28 08 57 83 66 01 0e |.T...%.)|.(.W.f..|
|00002050| 27 ed b1 02 88 c4 79 88 | 0e 28 54 89 16 28 82 4f |'.....y.|.(T..(.O|
|00002060| 01 29 c4 79 88 2d 82 52 | 00 0e 0c 71 88 0e 18 9f |.).y.-.R|...q....|
|00002070| 16 18 74 85 81 01 ef f0 | 0e 18 47 5c 22 29 91 2d |..t.....|..G\").-|
|00002080| 87 22 20 5b 6e 6c 69 6e | 65 73 20 70 72 65 66 69 |." [nlin|es prefi|
|00002090| 78 2d 6e 75 6d 65 72 69 | 63 2d 76 61 6c 75 65 20 |x-numeri|c-value |
|000020a0| 6c 69 73 74 2d 6d 61 74 | 63 68 69 6e 67 2d 6c 69 |list-mat|ching-li|
|000020b0| 6e 65 73 2d 64 65 66 61 | 75 6c 74 2d 63 6f 6e 74 |nes-defa|ult-cont|
|000020c0| 65 78 74 2d 6c 69 6e 65 | 73 20 74 20 31 20 6d 61 |ext-line|s t 1 ma|
|000020d0| 6b 65 2d 6d 61 72 6b 65 | 72 20 66 69 6e 61 6c 2d |ke-marke|r final-|
|000020e0| 63 6f 6e 74 65 78 74 2d | 73 74 61 72 74 20 70 72 |context-|start pr|
|000020f0| 65 76 70 6f 73 20 6c 69 | 6e 65 6e 75 6d 20 62 75 |evpos li|nenum bu|
|00002100| 66 66 65 72 20 66 69 72 | 73 74 20 22 2a 4f 63 63 |ffer fir|st "*Occ|
|00002110| 75 72 2a 22 20 73 74 61 | 6e 64 61 72 64 2d 6f 75 |ur*" sta|ndard-ou|
|00002120| 74 70 75 74 20 22 4c 69 | 6e 65 73 20 6d 61 74 63 |tput "Li|nes matc|
|00002130| 68 69 6e 67 20 22 20 70 | 72 69 6e 31 20 72 65 67 |hing " p|rin1 reg|
|00002140| 65 78 70 20 22 20 69 6e | 20 62 75 66 66 65 72 20 |exp " in| buffer |
|00002150| 22 20 62 75 66 66 65 72 | 2d 6e 61 6d 65 20 34 36 |" buffer|-name 46|
|00002160| 20 31 30 20 6f 63 63 75 | 72 2d 6d 6f 64 65 20 6f | 10 occu|r-mode o|
|00002170| 63 63 75 72 2d 62 75 66 | 66 65 72 20 6f 63 63 75 |ccur-buf|fer occu|
|00002180| 72 2d 6e 6c 69 6e 65 73 | 20 6e 69 6c 20 6f 63 63 |r-nlines| nil occ|
|00002190| 75 72 2d 70 6f 73 2d 6c | 69 73 74 20 62 65 67 69 |ur-pos-l|ist begi|
|000021a0| 6e 6e 69 6e 67 2d 6f 66 | 2d 62 75 66 66 65 72 20 |nning-of|-buffer |
|000021b0| 72 65 2d 73 65 61 72 63 | 68 2d 66 6f 72 77 61 72 |re-searc|h-forwar|
|000021c0| 64 20 30 20 6d 61 74 63 | 68 2d 64 61 74 61 20 6d |d 0 matc|h-data m|
|000021d0| 61 74 63 68 2d 64 61 74 | 61 20 28 28 73 74 6f 72 |atch-dat|a ((stor|
|000021e0| 65 2d 6d 61 74 63 68 2d | 64 61 74 61 20 6d 61 74 |e-match-|data mat|
|000021f0| 63 68 2d 64 61 74 61 29 | 29 20 63 6f 75 6e 74 2d |ch-data)|) count-|
|00002200| 6c 69 6e 65 73 20 73 74 | 61 72 74 20 65 6e 64 20 |lines st|art end |
|00002210| 66 6f 72 6d 61 74 20 22 | 25 33 64 22 20 74 61 67 |format "|%3d" tag|
|00002220| 20 6d 61 6b 65 2d 73 74 | 72 69 6e 67 20 33 32 20 | make-st|ring 32 |
|00002230| 65 6d 70 74 79 20 74 65 | 6d 20 7a 65 72 6f 70 20 |empty te|m zerop |
|00002240| 22 2d 2d 2d 2d 2d 2d 2d | 2d 5c 6e 22 20 69 6e 73 |"-------|-\n" ins|
|00002250| 65 72 74 2d 62 75 66 66 | 65 72 2d 73 75 62 73 74 |ert-buff|er-subst|
|00002260| 72 69 6e 67 20 62 61 63 | 6b 77 61 72 64 2d 63 68 |ring bac|kward-ch|
|00002270| 61 72 20 35 38 20 74 68 | 69 73 2d 6c 69 6e 65 6e |ar 58 th|is-linen|
|00002280| 75 6d 20 6d 65 73 73 61 | 67 65 20 22 25 64 20 6d |um messa|ge "%d m|
|00002290| 61 74 63 68 69 6e 67 20 | 6c 69 6e 65 73 2e 22 5d |atching |lines."]|
|000022a0| 20 36 20 22 5c 0a 53 68 | 6f 77 20 61 6c 6c 20 6c | 6 "\.Sh|ow all l|
|000022b0| 69 6e 65 73 20 69 6e 20 | 74 68 65 20 63 75 72 72 |ines in |the curr|
|000022c0| 65 6e 74 20 62 75 66 66 | 65 72 20 63 6f 6e 74 61 |ent buff|er conta|
|000022d0| 69 6e 69 6e 67 20 61 20 | 6d 61 74 63 68 20 66 6f |ining a |match fo|
|000022e0| 72 20 52 45 47 45 58 50 | 2e 0a 0a 49 66 20 61 20 |r REGEXP|...If a |
|000022f0| 6d 61 74 63 68 20 73 70 | 72 65 61 64 73 20 61 63 |match sp|reads ac|
|00002300| 72 6f 73 73 20 6d 75 6c | 74 69 70 6c 65 20 6c 69 |ross mul|tiple li|
|00002310| 6e 65 73 2c 20 61 6c 6c | 20 74 68 6f 73 65 20 6c |nes, all| those l|
|00002320| 69 6e 65 73 20 61 72 65 | 20 73 68 6f 77 6e 2e 0a |ines are| shown..|
|00002330| 0a 45 61 63 68 20 6c 69 | 6e 65 20 69 73 20 64 69 |.Each li|ne is di|
|00002340| 73 70 6c 61 79 65 64 20 | 77 69 74 68 20 4e 4c 49 |splayed |with NLI|
|00002350| 4e 45 53 20 6c 69 6e 65 | 73 20 62 65 66 6f 72 65 |NES line|s before|
|00002360| 20 61 6e 64 20 61 66 74 | 65 72 2c 20 6f 72 20 2d | and aft|er, or -|
|00002370| 4e 4c 49 4e 45 53 0a 62 | 65 66 6f 72 65 20 69 66 |NLINES.b|efore if|
|00002380| 20 4e 4c 49 4e 45 53 20 | 69 73 20 6e 65 67 61 74 | NLINES |is negat|
|00002390| 69 76 65 2e 0a 4e 4c 49 | 4e 45 53 20 64 65 66 61 |ive..NLI|NES defa|
|000023a0| 75 6c 74 73 20 74 6f 20 | 60 6c 69 73 74 2d 6d 61 |ults to |`list-ma|
|000023b0| 74 63 68 69 6e 67 2d 6c | 69 6e 65 73 2d 64 65 66 |tching-l|ines-def|
|000023c0| 61 75 6c 74 2d 63 6f 6e | 74 65 78 74 2d 6c 69 6e |ault-con|text-lin|
|000023d0| 65 73 27 2e 0a 49 6e 74 | 65 72 61 63 74 69 76 65 |es'..Int|eractive|
|000023e0| 6c 79 20 69 74 20 69 73 | 20 74 68 65 20 70 72 65 |ly it is| the pre|
|000023f0| 66 69 78 20 61 72 67 2e | 0a 0a 54 68 65 20 6c 69 |fix arg.|..The li|
|00002400| 6e 65 73 20 61 72 65 20 | 73 68 6f 77 6e 20 69 6e |nes are |shown in|
|00002410| 20 61 20 62 75 66 66 65 | 72 20 6e 61 6d 65 64 20 | a buffe|r named |
|00002420| 60 2a 4f 63 63 75 72 2a | 27 2e 0a 49 74 20 73 65 |`*Occur*|'..It se|
|00002430| 72 76 65 73 20 61 73 20 | 61 20 6d 65 6e 75 20 74 |rves as |a menu t|
|00002440| 6f 20 66 69 6e 64 20 61 | 6e 79 20 6f 66 20 74 68 |o find a|ny of th|
|00002450| 65 20 6f 63 63 75 72 72 | 65 6e 63 65 73 20 69 6e |e occurr|ences in|
|00002460| 20 74 68 69 73 20 62 75 | 66 66 65 72 2e 0a 5c 5c | this bu|ffer..\\|
|00002470| 5b 64 65 73 63 72 69 62 | 65 2d 6d 6f 64 65 5d 20 |[describ|e-mode] |
|00002480| 69 6e 20 74 68 61 74 20 | 62 75 66 66 65 72 20 77 |in that |buffer w|
|00002490| 69 6c 6c 20 65 78 70 6c | 61 69 6e 20 68 6f 77 2e |ill expl|ain how.|
|000024a0| 22 20 28 6c 69 73 74 20 | 28 6c 65 74 2a 20 28 28 |" (list |(let* ((|
|000024b0| 64 65 66 61 75 6c 74 20 | 28 63 61 72 20 72 65 67 |default |(car reg|
|000024c0| 65 78 70 2d 68 69 73 74 | 6f 72 79 29 29 20 28 69 |exp-hist|ory)) (i|
|000024d0| 6e 70 75 74 20 28 72 65 | 61 64 2d 66 72 6f 6d 2d |nput (re|ad-from-|
|000024e0| 6d 69 6e 69 62 75 66 66 | 65 72 20 28 66 6f 72 6d |minibuff|er (form|
|000024f0| 61 74 20 22 4c 69 73 74 | 20 6c 69 6e 65 73 20 6d |at "List| lines m|
|00002500| 61 74 63 68 69 6e 67 20 | 72 65 67 65 78 70 20 28 |atching |regexp (|
|00002510| 64 65 66 61 75 6c 74 20 | 60 25 73 27 29 3a 20 22 |default |`%s'): "|
|00002520| 20 64 65 66 61 75 6c 74 | 29 20 6e 69 6c 20 6e 69 | default|) nil ni|
|00002530| 6c 20 6e 69 6c 20 28 71 | 75 6f 74 65 20 72 65 67 |l nil (q|uote reg|
|00002540| 65 78 70 2d 68 69 73 74 | 6f 72 79 29 29 29 29 20 |exp-hist|ory)))) |
|00002550| 28 69 66 20 28 3e 20 28 | 6c 65 6e 67 74 68 20 69 |(if (> (|length i|
|00002560| 6e 70 75 74 29 20 30 29 | 20 69 6e 70 75 74 20 28 |nput) 0)| input (|
|00002570| 73 65 74 63 61 72 20 72 | 65 67 65 78 70 2d 68 69 |setcar r|egexp-hi|
|00002580| 73 74 6f 72 79 20 64 65 | 66 61 75 6c 74 29 29 29 |story de|fault)))|
|00002590| 20 63 75 72 72 65 6e 74 | 2d 70 72 65 66 69 78 2d | current|-prefix-|
|000025a0| 61 72 67 29 5d 29 0a 28 | 64 65 66 63 6f 6e 73 74 |arg)]).(|defconst|
|000025b0| 20 71 75 65 72 79 2d 72 | 65 70 6c 61 63 65 2d 68 | query-r|eplace-h|
|000025c0| 65 6c 70 20 22 54 79 70 | 65 20 53 70 61 63 65 20 |elp "Typ|e Space |
|000025d0| 6f 72 20 60 79 27 20 74 | 6f 20 72 65 70 6c 61 63 |or `y' t|o replac|
|000025e0| 65 20 6f 6e 65 20 6d 61 | 74 63 68 2c 20 44 65 6c |e one ma|tch, Del|
|000025f0| 65 74 65 20 6f 72 20 60 | 6e 27 20 74 6f 20 73 6b |ete or `|n' to sk|
|00002600| 69 70 20 74 6f 20 6e 65 | 78 74 2c 5c 6e 45 53 43 |ip to ne|xt,\nESC|
|00002610| 20 6f 72 20 60 71 27 20 | 74 6f 20 65 78 69 74 2c | or `q' |to exit,|
|00002620| 20 50 65 72 69 6f 64 20 | 74 6f 20 72 65 70 6c 61 | Period |to repla|
|00002630| 63 65 20 6f 6e 65 20 6d | 61 74 63 68 20 61 6e 64 |ce one m|atch and|
|00002640| 20 65 78 69 74 2c 5c 6e | 43 6f 6d 6d 61 20 74 6f | exit,\n|Comma to|
|00002650| 20 72 65 70 6c 61 63 65 | 20 62 75 74 20 6e 6f 74 | replace| but not|
|00002660| 20 6d 6f 76 65 20 70 6f | 69 6e 74 20 69 6d 6d 65 | move po|int imme|
|00002670| 64 69 61 74 65 6c 79 2c | 5c 6e 43 2d 72 20 74 6f |diately,|\nC-r to|
|00002680| 20 65 6e 74 65 72 20 72 | 65 63 75 72 73 69 76 65 | enter r|ecursive|
|00002690| 20 65 64 69 74 20 28 5c | 5c 5b 65 78 69 74 2d 72 | edit (\|\[exit-r|
|000026a0| 65 63 75 72 73 69 76 65 | 2d 65 64 69 74 5d 20 74 |ecursive|-edit] t|
|000026b0| 6f 20 67 65 74 20 6f 75 | 74 20 61 67 61 69 6e 29 |o get ou|t again)|
|000026c0| 2c 5c 6e 43 2d 77 20 74 | 6f 20 64 65 6c 65 74 65 |,\nC-w t|o delete|
|000026d0| 20 6d 61 74 63 68 20 61 | 6e 64 20 72 65 63 75 72 | match a|nd recur|
|000026e0| 73 69 76 65 20 65 64 69 | 74 2c 5c 6e 43 2d 6c 20 |sive edi|t,\nC-l |
|000026f0| 74 6f 20 63 6c 65 61 72 | 20 74 68 65 20 73 63 72 |to clear| the scr|
|00002700| 65 65 6e 2c 20 72 65 64 | 69 73 70 6c 61 79 2c 20 |een, red|isplay, |
|00002710| 61 6e 64 20 6f 66 66 65 | 72 20 73 61 6d 65 20 72 |and offe|r same r|
|00002720| 65 70 6c 61 63 65 6d 65 | 6e 74 20 61 67 61 69 6e |eplaceme|nt again|
|00002730| 2c 5c 6e 21 20 74 6f 20 | 72 65 70 6c 61 63 65 20 |,\n! to |replace |
|00002740| 61 6c 6c 20 72 65 6d 61 | 69 6e 69 6e 67 20 6d 61 |all rema|ining ma|
|00002750| 74 63 68 65 73 20 77 69 | 74 68 20 6e 6f 20 6d 6f |tches wi|th no mo|
|00002760| 72 65 20 71 75 65 73 74 | 69 6f 6e 73 2c 5c 6e 5e |re quest|ions,\n^|
|00002770| 20 74 6f 20 6d 6f 76 65 | 20 70 6f 69 6e 74 20 62 | to move| point b|
|00002780| 61 63 6b 20 74 6f 20 70 | 72 65 76 69 6f 75 73 20 |ack to p|revious |
|00002790| 6d 61 74 63 68 2e 22 20 | 22 5c 0a 48 65 6c 70 20 |match." |"\.Help |
|000027a0| 6d 65 73 73 61 67 65 20 | 77 68 69 6c 65 20 69 6e |message |while in|
|000027b0| 20 71 75 65 72 79 2d 72 | 65 70 6c 61 63 65 22 29 | query-r|eplace")|
|000027c0| 0a 28 64 65 66 76 61 72 | 20 71 75 65 72 79 2d 72 |.(defvar| query-r|
|000027d0| 65 70 6c 61 63 65 2d 6d | 61 70 20 28 6d 61 6b 65 |eplace-m|ap (make|
|000027e0| 2d 73 70 61 72 73 65 2d | 6b 65 79 6d 61 70 29 20 |-sparse-|keymap) |
|000027f0| 22 5c 0a 4b 65 79 6d 61 | 70 20 74 68 61 74 20 64 |"\.Keyma|p that d|
|00002800| 65 66 69 6e 65 73 20 74 | 68 65 20 72 65 73 70 6f |efines t|he respo|
|00002810| 6e 73 65 73 20 74 6f 20 | 71 75 65 73 74 69 6f 6e |nses to |question|
|00002820| 73 20 69 6e 20 60 71 75 | 65 72 79 2d 72 65 70 6c |s in `qu|ery-repl|
|00002830| 61 63 65 27 2e 0a 54 68 | 65 20 5c 22 62 69 6e 64 |ace'..Th|e \"bind|
|00002840| 69 6e 67 73 5c 22 20 69 | 6e 20 74 68 69 73 20 6d |ings\" i|n this m|
|00002850| 61 70 20 61 72 65 20 6e | 6f 74 20 63 6f 6d 6d 61 |ap are n|ot comma|
|00002860| 6e 64 73 3b 20 74 68 65 | 79 20 61 72 65 20 61 6e |nds; the|y are an|
|00002870| 73 77 65 72 73 2e 0a 54 | 68 65 20 76 61 6c 69 64 |swers..T|he valid|
|00002880| 20 61 6e 73 77 65 72 73 | 20 69 6e 63 6c 75 64 65 | answers| include|
|00002890| 20 60 61 63 74 27 2c 20 | 60 73 6b 69 70 27 2c 20 | `act', |`skip', |
|000028a0| 60 61 63 74 2d 61 6e 64 | 2d 73 68 6f 77 27 2c 0a |`act-and|-show',.|
|000028b0| 60 65 78 69 74 27 2c 20 | 60 61 63 74 2d 61 6e 64 |`exit', |`act-and|
|000028c0| 2d 65 78 69 74 27 2c 20 | 60 65 64 69 74 27 2c 20 |-exit', |`edit', |
|000028d0| 60 64 65 6c 65 74 65 2d | 61 6e 64 2d 65 64 69 74 |`delete-|and-edit|
|000028e0| 27 2c 20 60 72 65 63 65 | 6e 74 65 72 27 2c 0a 60 |', `rece|nter',.`|
|000028f0| 61 75 74 6f 6d 61 74 69 | 63 27 2c 20 60 62 61 63 |automati|c', `bac|
|00002900| 6b 75 70 27 2c 20 61 6e | 64 20 60 68 65 6c 70 27 |kup', an|d `help'|
|00002910| 2e 22 29 0a 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |.").(byt|e-code "|
|00002920| c0 09 c2 c3 23 88 c0 09 | c4 c5 23 88 c0 09 c6 c5 |....#...|..#.....|
|00002930| 23 88 c0 09 c7 c5 23 88 | c0 09 c8 c3 23 88 c0 09 |#.....#.|....#...|
|00002940| c9 c5 23 88 c0 09 ca cb | 23 88 c0 09 cc cd 23 88 |..#.....|#.....#.|
|00002950| c0 09 ce cd 23 88 c0 09 | cf cd 23 88 c0 09 d0 cd |....#...|..#.....|
|00002960| 23 88 c0 09 d1 cd 23 88 | c0 09 d2 d3 23 88 c0 09 |#.....#.|....#...|
|00002970| d4 d5 23 88 c0 09 d6 d7 | 23 88 c0 09 d8 d9 23 88 |..#.....|#.....#.|
|00002980| c0 09 da db 23 88 c0 09 | dc dd 23 88 c0 09 de df |....#...|..#.....|
|00002990| 23 88 c0 09 e0 df 23 88 | c0 09 e1 e2 23 88 c0 09 |#.....#.|....#...|
|000029a0| e3 e2 23 87 22 20 5b 64 | 65 66 69 6e 65 2d 6b 65 |..#." [d|efine-ke|
|000029b0| 79 20 71 75 65 72 79 2d | 72 65 70 6c 61 63 65 2d |y query-|replace-|
|000029c0| 6d 61 70 20 22 20 22 20 | 61 63 74 20 22 7f 22 20 |map " " |act "." |
|000029d0| 73 6b 69 70 20 5b 64 65 | 6c 65 74 65 5d 20 5b 62 |skip [de|lete] [b|
|000029e0| 61 63 6b 73 70 61 63 65 | 5d 20 22 79 22 20 22 6e |ackspace|] "y" "n|
|000029f0| 22 20 22 2c 22 20 61 63 | 74 2d 61 6e 64 2d 73 68 |" "," ac|t-and-sh|
|00002a00| 6f 77 20 22 1b 22 20 65 | 78 69 74 20 5b 65 73 63 |ow "." e|xit [esc|
|00002a10| 61 70 65 5d 20 22 71 22 | 20 22 0d 22 20 5b 72 65 |ape] "q"| "." [re|
|00002a20| 74 75 72 6e 5d 20 22 2e | 22 20 61 63 74 2d 61 6e |turn] ".|" act-an|
|00002a30| 64 2d 65 78 69 74 20 22 | 12 22 20 65 64 69 74 20 |d-exit "|." edit |
|00002a40| 22 17 22 20 64 65 6c 65 | 74 65 2d 61 6e 64 2d 65 |"." dele|te-and-e|
|00002a50| 64 69 74 20 22 0c 22 20 | 72 65 63 65 6e 74 65 72 |dit "." |recenter|
|00002a60| 20 22 21 22 20 61 75 74 | 6f 6d 61 74 69 63 20 22 | "!" aut|omatic "|
|00002a70| 5e 22 20 62 61 63 6b 75 | 70 20 22 08 22 20 68 65 |^" backu|p "." he|
|00002a80| 6c 70 20 22 3f 22 20 22 | 07 22 20 71 75 69 74 20 |lp "?" "|." quit |
|00002a90| 22 1d 22 5d 20 34 29 0a | 28 64 65 66 61 6c 69 61 |"."] 4).|(defalia|
|00002aa0| 73 20 27 70 65 72 66 6f | 72 6d 2d 72 65 70 6c 61 |s 'perfo|rm-repla|
|00002ab0| 63 65 20 23 5b 28 66 72 | 6f 6d 2d 73 74 72 69 6e |ce #[(fr|om-strin|
|00002ac0| 67 20 72 65 70 6c 61 63 | 65 6d 65 6e 74 73 20 71 |g replac|ements q|
|00002ad0| 75 65 72 79 2d 66 6c 61 | 67 20 72 65 67 65 78 70 |uery-fla|g regexp|
|00002ae0| 2d 66 6c 61 67 20 64 65 | 6c 69 6d 69 74 65 64 2d |-flag de|limited-|
|00002af0| 66 6c 61 67 20 26 6f 70 | 74 69 6f 6e 61 6c 20 72 |flag &op|tional r|
|00002b00| 65 70 65 61 74 2d 63 6f | 75 6e 74 20 6d 61 70 29 |epeat-co|unt map)|
|00002b10| 20 22 08 84 06 00 09 10 | 5c 6e 85 12 00 0b 85 12 | "......|\n......|
|00002b20| 00 0c 89 97 98 3f 0d 3f | 0d 83 1d 00 c6 82 1e 00 |.....?.?|........|
|00002b30| c7 0c c8 89 c9 ca c8 c9 | 89 c8 ca 1e 0b 1e 0c 1e |........|........|
|00002b40| 0d 1e 0e 1e 0f 1e 10 1e | 11 1e 12 1e 13 1e 14 1e |........|........|
|00002b50| 15 1e 16 1e 17 0e 18 3b | 83 4f 00 0e 18 16 12 82 |.......;|.O......|
|00002b60| 57 00 0e 19 84 57 00 da | 16 19 0e 1b 83 6f 00 c6 |W....W..|.....o..|
|00002b70| 16 15 dc 0d 83 68 00 0c | 82 6b 00 dd 0c 21 dc 51 |.....h..|.k...!.Q|
|00002b80| 16 14 de 20 88 df 20 88 | 0e 10 83 b0 02 6d 84 b0 |... .. .|.....m..|
|00002b90| 02 0e 15 0e 14 c8 ca 23 | 83 b0 02 0e 0c 60 3d 84 |.......#|.....`=.|
|00002ba0| a0 00 0d 83 b1 00 0e 0c | c9 94 3d 83 b1 00 0e 0b |........|..=.....|
|00002bb0| 84 b1 00 6d 84 b0 02 da | 75 88 0e 15 0e 14 c8 ca |...m....|u.......|
|00002bc0| 23 82 b2 00 ca 83 b0 02 | e0 20 16 13 0d 83 c3 00 |#.......|. ......|
|00002bd0| e1 0e 14 21 16 0b 0e 18 | 3c 83 e8 00 0e 0e 0e 0d |...!....|<.......|
|00002be0| 55 83 e8 00 0e 0e 0e 19 | 5c 5c 16 0e 0e 11 0e 18 |U.......|\\......|
|00002bf0| 38 16 12 0e 11 54 0e 18 | 47 a6 16 11 0e 5c 22 84 |8....T..|G....\".|
|00002c00| 03 01 e3 0e 13 21 88 e4 | 0e 12 0e 17 0e 16 23 88 |.....!..|......#.|
|00002c10| 0e 0d 54 16 0d 82 aa 02 | df 20 88 c8 89 89 89 1e |..T.....|. ......|
|00002c20| 25 1e 26 1e 27 1e 28 0e | 28 84 8a 02 e9 ea 0c 0e |%.&.'.(.|(.......|
|00002c30| 12 23 88 eb 20 16 26 ec | 0e 26 21 16 26 ed 08 0e |.#.. .&.|.&!.&...|
|00002c40| 26 5c 22 16 25 e3 0e 13 | 21 88 0e 25 ee 3d 83 59 |&\".%...|!..%.=.Y|
|00002c50| 01 ef 90 f0 f1 0d 83 47 | 01 f2 82 48 01 f3 0c f4 |.......G|...H....|
|00002c60| 0e 12 f5 f6 0e 37 21 b0 | 07 21 91 88 82 12 01 0e |.....7!.|.!......|
|00002c70| 25 f8 3d 83 6a 01 c8 16 | 10 ca 89 16 28 82 14 01 |%.=.j...|....(...|
|00002c80| 0e 25 f9 3d 83 94 01 0e | 0f 40 89 1e 3a 40 62 88 |.%.=....|.@..:@b.|
|00002c90| 0e 3a 41 ca 3d 89 16 27 | 84 8b 01 e3 0e 3a 41 21 |.:A.=..'|.....:A!|
|00002ca0| 88 0e 0f 41 16 0f 29 82 | 12 01 0e 25 fb 3d 83 b2 |...A..).|...%.=..|
|00002cb0| 01 0e 27 84 a9 01 e4 0e | 12 0e 17 0e 16 23 88 ca |..'.....|.....#..|
|00002cc0| 16 28 ca 16 27 82 12 01 | 0e 25 fc 3d 83 d3 01 0e |.(..'...|.%.=....|
|00002cd0| 27 84 c7 01 e4 0e 12 0e | 17 0e 16 23 88 c8 16 10 |'.......|...#....|
|00002ce0| ca 16 28 ca 16 27 82 12 | 01 0e 25 fd 3d 83 ee 01 |..(..'..|..%.=...|
|00002cf0| 0e 27 84 12 01 e4 0e 12 | 0e 17 0e 16 23 88 ca 16 |.'......|....#...|
|00002d00| 27 82 12 01 0e 25 fe 3d | 83 0f 02 0e 27 84 03 02 |'....%.=|....'...|
|00002d10| e4 0e 12 0e 17 0e 16 23 | 88 ca 16 28 c8 16 5c 22 |.......#|...(..\"|
|00002d20| ca 16 27 82 12 01 0e 25 | ff 3d 83 1d 02 ca 89 16 |..'....%|.=......|
|00002d30| 28 82 14 01 0e 25 81 40 | 00 3d 83 2f 02 81 40 00 |(....%.@|.=./..@.|
|00002d40| c8 21 88 82 12 01 0e 25 | 81 41 00 3d 83 51 02 e3 |.!.....%|.A.=.Q..|
|00002d50| e0 20 8a 81 42 00 20 88 | 29 21 88 0d 83 12 01 e1 |. ..B. .|)!......|
|00002d60| 0e 14 21 16 0b 82 12 01 | 0e 25 81 43 00 3d 83 72 |..!.....|.%.C.=.r|
|00002d70| 02 c9 94 c9 95 7c 88 e3 | e0 20 8a 81 42 00 20 88 |.....|..|. ..B. .|
|00002d80| 29 21 88 ca 16 27 82 12 | 01 c8 16 10 81 44 00 81 |)!...'..|.....D..|
|00002d90| 45 00 0e 26 21 0e 46 5c | 22 16 46 ca 89 16 28 83 |E..&!.F\|".F...(.|
|00002da0| 17 01 60 0e 27 86 99 02 | 81 47 00 81 48 00 e0 20 |..`.'...|.G..H.. |
|00002db0| 5c 22 42 0e 0f 42 16 0f | 0e 27 83 a9 02 0e 0d 54 |\"B..B..|.'.....T|
|00002dc0| 16 0d 2c 60 16 0c 82 75 | 00 0e 10 85 b7 02 0e 0f |..,`...u|........|
|00002dd0| 2e 0d 87 22 20 5b 6d 61 | 70 20 71 75 65 72 79 2d |..." [ma|p query-|
|00002de0| 72 65 70 6c 61 63 65 2d | 6d 61 70 20 63 61 73 65 |replace-|map case|
|00002df0| 2d 66 6f 6c 64 2d 73 65 | 61 72 63 68 20 63 61 73 |-fold-se|arch cas|
|00002e00| 65 2d 72 65 70 6c 61 63 | 65 20 66 72 6f 6d 2d 73 |e-replac|e from-s|
|00002e10| 74 72 69 6e 67 20 72 65 | 67 65 78 70 2d 66 6c 61 |tring re|gexp-fla|
|00002e20| 67 20 72 65 2d 73 65 61 | 72 63 68 2d 66 6f 72 77 |g re-sea|rch-forw|
|00002e30| 61 72 64 20 73 65 61 72 | 63 68 2d 66 6f 72 77 61 |ard sear|ch-forwa|
|00002e40| 72 64 20 6e 69 6c 20 30 | 20 74 20 6d 61 74 63 68 |rd nil 0| t match|
|00002e50| 2d 61 67 61 69 6e 20 6c | 61 73 74 72 65 70 6c 20 |-again l|astrepl |
|00002e60| 72 65 70 6c 61 63 65 2d | 63 6f 75 6e 74 20 6e 65 |replace-|count ne|
|00002e70| 78 74 2d 72 6f 74 61 74 | 65 2d 63 6f 75 6e 74 20 |xt-rotat|e-count |
|00002e80| 73 74 61 63 6b 20 6b 65 | 65 70 2d 67 6f 69 6e 67 |stack ke|ep-going|
|00002e90| 20 72 65 70 6c 61 63 65 | 6d 65 6e 74 2d 69 6e 64 | replace|ment-ind|
|00002ea0| 65 78 20 6e 65 78 74 2d | 72 65 70 6c 61 63 65 6d |ex next-|replacem|
|00002eb0| 65 6e 74 20 72 65 61 6c | 2d 6d 61 74 63 68 2d 64 |ent real|-match-d|
|00002ec0| 61 74 61 20 73 65 61 72 | 63 68 2d 73 74 72 69 6e |ata sear|ch-strin|
|00002ed0| 67 20 73 65 61 72 63 68 | 2d 66 75 6e 63 74 69 6f |g search|-functio|
|00002ee0| 6e 20 6c 69 74 65 72 61 | 6c 20 6e 6f 63 61 73 69 |n litera|l nocasi|
|00002ef0| 66 79 20 72 65 70 6c 61 | 63 65 6d 65 6e 74 73 20 |fy repla|cements |
|00002f00| 72 65 70 65 61 74 2d 63 | 6f 75 6e 74 20 31 20 64 |repeat-c|ount 1 d|
|00002f10| 65 6c 69 6d 69 74 65 64 | 2d 66 6c 61 67 20 22 5c |elimited|-flag "\|
|00002f20| 5c 62 22 20 72 65 67 65 | 78 70 2d 71 75 6f 74 65 |\b" rege|xp-quote|
|00002f30| 20 70 75 73 68 2d 6d 61 | 72 6b 20 75 6e 64 6f 2d | push-ma|rk undo-|
|00002f40| 62 6f 75 6e 64 61 72 79 | 20 6d 61 74 63 68 2d 64 |boundary| match-d|
|00002f50| 61 74 61 20 6c 6f 6f 6b | 69 6e 67 2d 61 74 20 71 |ata look|ing-at q|
|00002f60| 75 65 72 79 2d 66 6c 61 | 67 20 73 74 6f 72 65 2d |uery-fla|g store-|
|00002f70| 6d 61 74 63 68 2d 64 61 | 74 61 20 72 65 70 6c 61 |match-da|ta repla|
|00002f80| 63 65 2d 6d 61 74 63 68 | 20 64 65 66 20 6b 65 79 |ce-match| def key|
|00002f90| 20 72 65 70 6c 61 63 65 | 64 20 64 6f 6e 65 20 6d | replace|d done m|
|00002fa0| 65 73 73 61 67 65 20 22 | 51 75 65 72 79 20 72 65 |essage "|Query re|
|00002fb0| 70 6c 61 63 69 6e 67 20 | 25 73 20 77 69 74 68 20 |placing |%s with |
|00002fc0| 25 73 3a 20 22 20 72 65 | 61 64 2d 65 76 65 6e 74 |%s: " re|ad-event|
|00002fd0| 20 76 65 63 74 6f 72 20 | 6c 6f 6f 6b 75 70 2d 6b | vector |lookup-k|
|00002fe0| 65 79 20 68 65 6c 70 20 | 22 2a 48 65 6c 70 2a 22 |ey help |"*Help*"|
|00002ff0| 20 70 72 69 6e 63 20 22 | 51 75 65 72 79 20 72 65 | princ "|Query re|
|00003000| 70 6c 61 63 69 6e 67 20 | 22 20 22 72 65 67 65 78 |placing |" "regex|
|00003010| 70 20 22 20 22 22 20 22 | 20 77 69 74 68 20 22 20 |p " "" "| with " |
|00003020| 22 2e 5c 6e 5c 6e 22 20 | 73 75 62 73 74 69 74 75 |".\n\n" |substitu|
|00003030| 74 65 2d 63 6f 6d 6d 61 | 6e 64 2d 6b 65 79 73 20 |te-comma|nd-keys |
|00003040| 71 75 65 72 79 2d 72 65 | 70 6c 61 63 65 2d 68 65 |query-re|place-he|
|00003050| 6c 70 20 65 78 69 74 20 | 62 61 63 6b 75 70 20 65 |lp exit |backup e|
|00003060| 6c 74 20 61 63 74 20 61 | 63 74 2d 61 6e 64 2d 65 |lt act a|ct-and-e|
|00003070| 78 69 74 20 61 63 74 2d | 61 6e 64 2d 73 68 6f 77 |xit act-|and-show|
|00003080| 20 61 75 74 6f 6d 61 74 | 69 63 20 73 6b 69 70 20 | automat|ic skip |
|00003090| 72 65 63 65 6e 74 65 72 | 20 65 64 69 74 20 72 65 |recenter| edit re|
|000030a0| 63 75 72 73 69 76 65 2d | 65 64 69 74 20 64 65 6c |cursive-|edit del|
|000030b0| 65 74 65 2d 61 6e 64 2d | 65 64 69 74 20 61 70 70 |ete-and-|edit app|
|000030c0| 65 6e 64 20 6c 69 73 74 | 69 66 79 2d 6b 65 79 2d |end list|ify-key-|
|000030d0| 73 65 71 75 65 6e 63 65 | 20 75 6e 72 65 61 64 2d |sequence| unread-|
|000030e0| 63 6f 6d 6d 61 6e 64 2d | 65 76 65 6e 74 73 20 6d |command-|events m|
|000030f0| 61 70 63 61 72 20 23 5b | 28 65 6c 74 29 20 22 08 |apcar #[|(elt) ".|
|00003100| 85 07 00 c1 08 21 87 22 | 20 5b 65 6c 74 20 6d 61 |.....!."| [elt ma|
|00003110| 72 6b 65 72 2d 70 6f 73 | 69 74 69 6f 6e 5d 20 32 |rker-pos|ition] 2|
|00003120| 5d 5d 20 31 34 20 22 5c | 0a 53 75 62 72 6f 75 74 |]] 14 "\|.Subrout|
|00003130| 69 6e 65 20 6f 66 20 60 | 71 75 65 72 79 2d 72 65 |ine of `|query-re|
|00003140| 70 6c 61 63 65 27 2e 20 | 20 49 74 73 20 63 6f 6d |place'. | Its com|
|00003150| 70 6c 65 78 69 74 79 20 | 68 61 6e 64 6c 65 73 20 |plexity |handles |
|00003160| 69 6e 74 65 72 61 63 74 | 69 76 65 20 71 75 65 72 |interact|ive quer|
|00003170| 69 65 73 2e 0a 44 6f 6e | 27 74 20 75 73 65 20 74 |ies..Don|'t use t|
|00003180| 68 69 73 20 69 6e 20 79 | 6f 75 72 20 6f 77 6e 20 |his in y|our own |
|00003190| 70 72 6f 67 72 61 6d 20 | 75 6e 6c 65 73 73 20 79 |program |unless y|
|000031a0| 6f 75 20 77 61 6e 74 20 | 74 6f 20 71 75 65 72 79 |ou want |to query|
|000031b0| 20 61 6e 64 20 73 65 74 | 20 74 68 65 20 6d 61 72 | and set| the mar|
|000031c0| 6b 0a 6a 75 73 74 20 61 | 73 20 60 71 75 65 72 79 |k.just a|s `query|
|000031d0| 2d 72 65 70 6c 61 63 65 | 27 20 64 6f 65 73 2e 20 |-replace|' does. |
|000031e0| 20 49 6e 73 74 65 61 64 | 2c 20 77 72 69 74 65 20 | Instead|, write |
|000031f0| 61 20 73 69 6d 70 6c 65 | 20 6c 6f 6f 70 20 6c 69 |a simple| loop li|
|00003200| 6b 65 20 74 68 69 73 3a | 0a 20 20 28 77 68 69 6c |ke this:|. (whil|
|00003210| 65 20 28 72 65 2d 73 65 | 61 72 63 68 2d 66 6f 72 |e (re-se|arch-for|
|00003220| 77 61 72 64 20 5c 22 66 | 6f 6f 5b 20 09 5d 2b 62 |ward \"f|oo[ .]+b|
|00003230| 61 72 5c 22 20 6e 69 6c | 20 74 29 0a 20 20 20 20 |ar\" nil| t). |
|00003240| 28 72 65 70 6c 61 63 65 | 2d 6d 61 74 63 68 20 5c |(replace|-match \|
|00003250| 22 66 6f 6f 62 61 72 5c | 22 20 6e 69 6c 20 6e 69 |"foobar\|" nil ni|
|00003260| 6c 29 29 0a 77 68 69 63 | 68 20 77 69 6c 6c 20 72 |l)).whic|h will r|
|00003270| 75 6e 20 66 61 73 74 65 | 72 20 61 6e 64 20 64 6f |un faste|r and do|
|00003280| 20 65 78 61 63 74 6c 79 | 20 77 68 61 74 20 79 6f | exactly| what yo|
|00003290| 75 20 70 72 6f 62 61 62 | 6c 79 20 77 61 6e 74 2e |u probab|ly want.|
|000032a0| 22 5d 29 0a | |"]). | |
+--------+-------------------------+-------------------------+--------+--------+