
(fset (quote delete-non-matching-lines) (quote keep-lines))

(defun keep-lines (regexp) "\
Delete all lines except those containing matches for REGEXP.
A match split across lines preserves all the lines it lies in.
Applies to all lines after point." (interactive "sKeep lines (containing match for regexp): ") (byte-code "ÂˆŠn†
 ÄÅ!ˆ`m?…G Æ	ÂÇ#?ƒ\" Èd\"‚9 ŠÉÊ!bˆË ˆ`)W…8 È\")ˆŠÄÅ!ˆ`)‰ˆ‚ ))‡" [start regexp nil end forward-line 1 re-search-forward move delete-region match-beginning 0 beginning-of-line] 10))

(fset (quote delete-matching-lines) (quote flush-lines))

(defun flush-lines (regexp) "\
Delete lines containing matches for REGEXP.
If a match is split across lines, all the lines it lies in are deleted.
Applies to lines after point." (interactive "sFlush lines (containing match for regexp): ") (byte-code "ÁˆŠm?… ÃÁÂ#…& ÄŠÅÆ!bˆÇ ˆ`)ÈÉ!ˆ`\"ˆ‚ )‡" [regexp nil t re-search-forward delete-region match-beginning 0 beginning-of-line forward-line 1] 8))

(fset (quote count-matches) (quote how-many))

(defun how-many (regexp) "\
Print number of matches for REGEXP following point." (interactive "sHow many matches for (regexp): ") (byte-code "ÃˆÅÃŠm?… `‰ˆÆ
ÃÄ#…, 	`Uƒ$ ÇÈ!‚( T‰ˆ‚ ˆÉÊ\")*‡" [count opoint regexp nil t 0 re-search-forward forward-char 1 message "%d occurrences"] 5))

(defvar occur-mode-map nil)

(if occur-mode-map nil (setq occur-mode-map (make-sparse-keymap)) (define-key occur-mode-map "" (quote occur-mode-goto-occurrence)))

(defvar occur-buffer nil)

(defvar occur-nlines nil)

(defvar occur-pos-list nil)

(defun occur-mode nil "\
Major mode for output from \\[occur].
Move point to one of the occurrences in this buffer,
then use \\[occur-mode-goto-occurrence] to go to the same occurrence
in the buffer that the occurrences were found in.
\\{occur-mode-map}" (byte-code "Ã ˆÄ!ˆÅ‰ˆÆ‰ˆÇÈ!ˆÇÉ!ˆÇÊ!‡" [occur-mode-map major-mode mode-name kill-all-local-variables use-local-map occur-mode "Occur" make-local-variable occur-buffer occur-nlines occur-pos-list] 6))

(defun occur-mode-goto-occurrence nil "\
Go to the line this occurrence was found in, in the buffer it was found in." (interactive) (byte-code "Áˆ?† Ç!?… ÁÁ‰ˆÈÉ!ˆŠÊ ˆËÌe`\"SÍWƒ. ÎZ‚> ÍVƒ= ÎÏÎ\"\\‚> Ð\")
8Ñ!ˆÒ!b*‡" [occur-buffer nil occur-pos-list occur-number occur-nlines t pos buffer-name error "Buffer in which occurences were found is deleted." beginning-of-line / count-lines 0 2 * 1 pop-to-buffer marker-position] 10))

(defvar list-matching-lines-default-context-lines 0 "\
*Default number of context lines to include around a list-matching-lines
match.  A negative number means to include that many lines before the match.
A positive number means to include that many lines both before and after.")

(fset (quote list-matching-lines) (quote occur))

(defun occur (regexp &optional nlines) "\
Show all lines following point containing a match for REGEXP.
Display each line with NLINES lines before and after,
 or -NLINES before if NLINES is negative.
NLINES defaults to list-matching-lines-default-context-lines.
Interactively it is the prefix arg.

The lines are shown in a buffer named *Occur*.
It serves as a menu to find any of the occurrences in this buffer.
\\[describe-mode] in that buffer will explain how." (interactive "sList lines matching regexp: 
P") (byte-code "Ìˆƒ Ò!‚ 	‰ˆÃpÌÌŠÓ ˆÔe`\"T‰ˆ`‰)ˆÕ�ŠqˆÖcˆ×!ˆØÙÚ!ÛÜ$ˆÝ ˆ‰	ˆ‰
ˆÌ‰)ˆ=…_ dbˆŠdU?…o ÞÌÃ#…XÓß!ˆŠÔ`\"\\‰ˆ`‰)ˆŠàáWƒ“ ‚• [!ˆ`)ŠáVƒ© àT!‚¬ àß!ˆ`)âã\"äGå\"ÌŠæ ‰ˆç`\"ˆqˆB‰ˆ
†è è!†è écˆÌ‰ˆê#ˆëZ!ˆáWƒ[‚	‰ˆáV…(Øì\"ˆàß!ˆS‰ˆ‚ˆØì\"ˆàß!ˆW…NØì\"ˆàß!ˆT‰ˆ‚3)ˆàß!-ˆ‚a ˆqˆí!‰ˆt…oîïG\")‘,‡" [nlines list-matching-lines-default-context-lines first t buffer linenum prevpos standard-output regexp occur-buffer occur-nlines occur-pos-list nil start end tag empty tem prefix-numeric-value beginning-of-line count-lines "*Occur*" "Lines matching " prin1 insert " in buffer " buffer-name 46 10 occur-mode re-search-forward 1 forward-line 0 format "%3d" make-string 32 make-marker set-marker zerop "--------
" insert-buffer-substring backward-char 58 nreverse message "%d matching lines."] 32))

(defconst query-replace-help "Type Space or `y' to replace one match, Delete or `n' to skip to next,
ESC or `q' to exit, Period to replace one match and exit,
Comma to replace but not move point immediately,
C-r to enter recursive edit (\\[exit-recursive-edit] to get out again),
C-w to delete match and recursive edit,
C-l to clear the screen, redisplay, and offer same replacement again,
! to replace all remaining matches with no more questions,
^ to move point back to previous match." "Help message while in query-replace")

(defun perform-replace (from-string to-string query-flag regexp-flag delimited-flag) (byte-code "	… 
… Ö×!\"??ƒ Ø‚ ÙÉË
…@ ØÚƒ8 ‚; Û!ÚQ‰ˆÜ ˆÜ ˆ…] m?…] Ý`!ˆÞËÉ$…Þ
`=ƒm ßà!‚Úá ˆ?ƒ â#‚ÕËË?…Ôã ä‰ˆU…À åæ#ˆr‰ˆçU…¼ ‰ˆ‚˜ ˆè!*ˆéU†Ò êUƒá Ë‰ˆÉ‰‚ÐëUƒó ì bˆÉ‰‚ÐíU†þ îUƒ†â#ˆÉ‰‚ÐïUƒ3†&â#ˆË‰ˆÉ‰‚ÐðUƒN?…Kâ#ˆÉ‰‚ÐñUƒk†`â#ˆÉË‰‚ÐòU†vóUƒ€É‰‚ÐôUƒ�õË!‚ÐöUƒ èã Š÷ )ˆ!‚ÐøUƒÁùúû!üû!\"ˆèã Š÷ )ˆ!ˆÉ‰‚ÐË‰ˆ‰ˆÉ‰ˆ‚… *ˆ`‰
ˆ‚G ˆý ˆ.‡" [nocasify case-fold-search case-replace from-string literal regexp-flag search-function search-string keep-going t lastrepl nil delimited-flag query-flag to-string done replaced data help-form char help-char unread-command-char string-equal downcase re-search-forward search-forward "\\b" regexp-quote push-mark set-mark funcall forward-char 1 undo-boundary replace-match match-data (concat "Query replacing " (if regexp-flag "regexp " "") from-string " with " to-string ".

" (substitute-command-keys query-replace-help)) message "Query replacing %s with %s: " 63 store-match-data 27 113 94 mark 32 121 46 44 33 127 110 12 recenter 18 recursive-edit 23 delete-region match-beginning 0 match-end pop-mark] 32))
