
(defconst moccur-source-prefix "@loc> " "\
Prefix for lines indicating source of matches.")

(defun moccur (regexp &optional file-regexp no-fold-search) "\
Show all lines of all buffers containing a match for REGEXP.
With optional FILE-REGEXP, a pattern matching to files in a single
directory, search matching files rather than current buffers.
The lines are shown in a buffer named *Moccur* which serves as a menu to
find any of the occurrences in this buffer.
\\[describe-mode] in that buffer explains how." (interactive "sRegexp to find occurrences of: 
sFiles to search (default current file buffers): ") (byte-code "\" # ! !!#%  !q  #
	

@		;\\ 	

h 
!?
A
~ 
!	 	!

? 	? 	q?ebƉ# \\e`\"\"q 
#c	q! ` `#)!* ))q?	c	!)L +VKq !:b#:!eb!\"ƂP!," [file-regexp nil buffers occbuf matches firstmatch t buffer-read-only regexp currbuf currfile kill-buf case-fold-search no-fold-search linenum tag moccur-source-prefix beg equal "" directory-files expand-file-name file-name-directory "." full file-name-nondirectory buffer-list get-buffer-create "*Moccur*" 0 widen erase-buffer insert "Lines matching '" "':

" get-file-buffer find-file-noselect buffer-file-name re-search-forward 1 count-lines format "
%4d:" "
" forward-word -1 beginning-of-line end-of-line append-to-buffer forward-line "

" kill-buffer moccur-mode fboundp outline-minor-mode search-forward "" pop-to-buffer message "%d matches." "No matches."] 31))

(defun moccur-to nil "\
Go to the line where this occurrence was found." (interactive) (byte-code "=? !  ` 	`\"\"h !O!Q#b !!\"!?_ \"e !k !)r  #!!," [major-mode beg nil line lineno dstbuf moccur-source-prefix t moccur-mode error "'moccur-to' must be called within a moccur buffer." beginning-of-line end-of-line buffer-substring string-match "^[ ]*[0-9]+:" string-to-int 0 match-end re-search-backward "^" "\"?\\([^\" 
]+\\)\"?" match-beginning 1 find-file-noselect message "moccur-to: file '%s' is not readable" "No moccur header line for file." "Not an moccur occurrence line." "Selection <%s> line %d." pop-to-buffer goto-line] 19))

(fset (quote moccur-mode-goto-occurrence) (quote moccur-to))

(defun moccur-mode nil "\
Major mode for output from \\[moccur].
Move point to one of the occurrences in this buffer,
then use \\[moccur-to] to go to the same occurrence
in the buffer that the occurrenc was found in.
\\{occur-mode-map}" (byte-code " !ŉƉ" [moccur-mode-map major-mode mode-name kill-all-local-variables use-local-map moccur-mode "Moccur"] 4))

(defvar moccur-mode-map nil)

(if moccur-mode-map nil (setq moccur-mode-map (make-sparse-keymap)) (define-key moccur-mode-map "" (quote moccur-to)) (define-key moccur-mode-map " " (quote moccur-to)) (define-key moccur-mode-map "" (quote moccur-to)))

(provide (quote hmoccur))
