(compilation-mode): Don't setup next-error-function here.
(compilation-setup): Set it up here instead (for minor modes as well).
Make compilation-messages-start buffer local.
(compilation-next-error-function): Use it.
(compilation-forget-errors): Set compilation-messages-start.
(compilation-normalize-filename, compile-abbreviate-directory): Delete functions.
(compilation-get-file-structure): New function inherits functionality of the two preceding ones.
(compilation-internal-error-properties, compilation-fake-loc): Use it so that different paths to the same file share the same markers. Also optimize finding adjacent marker slightly.
(compilation-start): Set next-error-last-buffer so
next-error knows where to jump.
(compilation-setup): Set the buffer-local variable
next-error-function to 'compilation-next-error-function.
(compilation-buffer-p, compilation-buffer-internal-p): Use an
alternate way to find if a buffer is a compilation buffer, for
next-error convenience.
(next-error-no-select, previous-error-no-select, next-error)
(previous-error, first-error): Move to simple.el.
(compilation-find-buffer): Move to next-error-find-buffer in simple.el.
(compilation-last-buffer): Remove.
(compilation-start, compilation-next-error, compilation-setup)
(compilation-next-error-function, compilation-find-buffer):
Remove compilation-last-buffer use.
(compilation-error-regexp-alist-alist)
(compilation-mode-font-lock-keywords): Allow non-ASCII where possible.
(compilation-assq): Wrap in eval-when-compile.
(compilation-mode-font-lock-keywords): Don't use list*.
(compilation-start): Avoid warning.
(compilation-compat-error-properties)
(compilation-directory-properties): Add keymap property.
(compilation-parsing-end): Make it a marker for better compatibility.
(compilation-sentinel): Restructure code equivalently.
(compilation-next-error): Find message on same line after point if
not found before point.
(compile-mouse-goto-error): Restore function so that compilation
buffer need not be current and use compile-goto-error.
(compile-goto-error): Restore function.
(next-error): Set overlay-arrow-position.
(compilation-forget-errors): Don't localize already local
compilation-locs and remove FIXME about refontifying.
(compilation-skip-visited, compilation-context-lines): Declare :version when added to Emacs.
(compilation-error-regexp-alist-alist): Extend caml and irix.
(compilation-setup): Fix if font-locked w/o font-lock-defaults.
(compilation-mode-font-lock-keywords): Temporarily undo line as function patch, which wasn't ready.
(compilation-error-properties, compilation-start, compilation-sentinel)
(compilation-filter, next-error): Use with-current-buffer.
(compilation-skip-to-next-location, compilation-skip-threshold)
(compilation-skip-visited): Move to silence the byte-compiler.
(compilation-setup): Simplify.
(compilation-next-error): Use line-(beginning|end)-position.
Make sure `pt' is non-nil before using compilation-loop.
(compile-goto-error): Add optional event arg. Use it.
(compile-mouse-goto-error): Make it an alias of compile-goto-error.
(compilation-minor-mode-map, compilation-shell-minor-mode-map):
Update the binding for mouse-2.
(first-error): Set compilation-current-error to nil rather than bob.
(compilation-parsing-end, compilation-parse-errors-function)
(compilation-error-list, compilation-old-error-list):
"New" compatibility variables.
(compile-buffer-substring, compilation-compat-error-properties)
(compilation-compat-parse-errors, compilation-forget-errors):
New compatibility functions.
(compilation-mode-font-lock-keywords): Use them.
(grep-find-command, grep-tree-command, grep-tree-files-aliases)
(grep-tree-ignore-case, grep-tree-ignore-CVS-directories)
(grep-regexp-alist, grep-program, find-program)
(grep-find-use-xargs, grep-history, grep-find-history)
(grep-process-setup, grep-compute-defaults)
(grep-default-command, grep, grep-tag-default, grep-find)
(grep-expand-command-macros, grep-tree-last-regexp)
(grep-tree-last-files, grep-tree): Move grep variables, functions
and commands to new file grep.el.
(compilation-mode-map): Remove grep commands from Compile sub-menu.
(compilation-process-setup-function): Doc fix.
(compilation-highlight-regexp, compilation-highlight-overlay): New
defvars used for highlighting current compile error in source buffer.
(compile-internal): New optional args HIGHLIGHT-REGEXP and
LOCAL-MAP which overrides compilation-highlight-regexp and
compilation-mode-map for this compilation.
Delay calling compilation-set-window-height until after running
compilation-process-setup-function so it can buffer-local override
compilation-window-height.
Check buffer-local value of compilation-scroll-output.
(compilation-set-window-height): Use buffer-local value of
compilation-window-height.
(compilation-revert-buffer): Don't pass (undefined)
preserve-modes arg to revert-buffer.
(next-error-no-select, previous-error-no-select): New commands.
(compilation-goto-locus): Temporarily highlight current match in
source buffer using compilation-highlight-regexp.