various nil/dead-marker mismatches.
(compilation-directory-properties, compilation-error-properties):
Don't call it at a position past the one we're about to change.
Fixes: debbugs:8014
* vc/vc-bzr.el (vc-bzr--branch-conf): Function deleted.
(vc-bzr-branch-conf): New function, similar to vc-bzr--branch-conf
but returning an alist. Ignore comments in bzr conffile.
(vc-bzr-pull, vc-bzr-merge-branch): Use vc-bzr-branch-conf.
(vc-bzr-error-regex-alist): New var.
(vc-bzr-merge-branch): Use it to highlight the pull/merge buffer.
* progmodes/compile.el (compilation--flush-directory-cache):
Handle the case where cdr of compilation--flush-directory-cache
points to no buffer, which can occur if we previously switched to
compilation-mode in a pregenerated buffer.
* vc/vc-dispatcher.el (vc-do-async-command): Bind
inhibit-read-only to t.
* lisp/progmodes/prolog.el: Don't require compile when compiling.
-- not using any macros from it, it's just a cheap way to silence the
compiler that actually produces one warning.
(compilation-shell-minor-mode, compilation-error-regexp-alist)
(compilation-forget-errors, compilation-fake-loc)
(compilation-parse-errors-function, compilation-error-list): Declare.
(prolog-inferior-mode): Require 'compile.
* lisp/progmodes/cc-fonts.el (c-font-lock-declarations): Remove a
narrow-to-region call that cuts context off the end (Bug#7722).
* lisp/progmodes/cc-engine.el (c-forward-<>-arglist-recur): Refactor
nested if-forms with a simple cond.
(c-forward-<>-arglist): Revert 2011-01-31 change.
of here-doc that immediately follows a comment.
* .bzrignore: Ignore globals.h and related stamp.
* test/indent/shell.sh:
* test/indent/shell.rc: New files.
font-lock-syntax-table remappings.
(sh-here-doc-markers, sh-here-doc-re): Remove.
(sh-font-lock-close-heredoc): Remove.
(sh-syntax-propertize-here-doc): New function.
(sh-font-lock-open-heredoc): Set the sh-here-doc-marker property
instead of the sh-here-doc-re.
(sh-font-lock-paren): Don't do anything in comments or strings.
Handle line continuations. Accept a few more chars.
Don't rely on the font-lock-syntax-table remappings.
`esac' is not a valid pattern.
(sh-syntax-propertize-function): Handle here-docs differently, so we
don't bother syntax-propertizing the insides.
Fixes: debbugs:7947
(compilation-warning): Inherit from font-lock-variable-name-face.
(compilation-info): Inherit from font-lock-type-face.
(compilation-line-number): Reassign to font-lock-keyword-face.
(compilation-column-number): Reassign to font-lock-doc-face.
(compilation-leave-directory-face): Reassign to font-lock-builtin-face.
* progmodes/cc-cmds.el (c-forward-over-illiterals): Continue
parsing if we encounter a naked # (Bug#7595).
(c-beginning-of-statement): Avoid loop in locating the beginning
of a macro.
New function, extracted from compilation--remove-properties.
(compilation--remove-properties, compilation--parse-region): Use it.
(compilation--previous-directory): Handle one more case.
(compilation-enable-debug-messages): Remove.
(compilation-parse-errors, compilation--flush-parse): Just remove the
left over debug messages.
Add a variable to make the parsing messages introduced in
2011-01-28T22:12:05Z!monnier@iro.umontreal.ca optional.
(compilation-parse-errors, compilation--flush-parse): Use it.
(compilation--previous-directory): New fun.
(compilation--previous-directory-cache): New var.
(compilation--remove-properties): Flush it.
(compilation-directory-properties, compilation-error-properties):
Use the new fun to speed up looking for the current directory.
(compilation-error-regexp-alist-alist): Change handling of makepp
so it preserves the warning/error distinction on subsequent files.
Simplify various rules.
(compilation-directory-properties): Use font-lock-face.
Add a compilation-message property.
(compilation-internal-error-properties): Use font-lock-face.
Don't set the compilation-debug property here.
(compilation--put-prop, compilation--remove-properties)
(compilation--parse-region, compilation--ensure-parse)
(compilation--ensure-parse): New functions.
(compilation-parse-errors): New function, largely inspired of
compilation-mode-font-lock-keywords. Set compilation-debug here.
(compilation--parsed): New var.
(compilation--flush-parse): Use compilation--ensure-parse.
(compilation-start): Don't call font-lock.
(compilation-turn-on-font-lock): Remove.
(compilation-setup): Don't set font-lock-extra-managed-props not change
other font-lock settings, other than keywords.
Don't activate font-lock-mode.
Set change-major-mode-hook and before-change-functions.
(compilation--unsetup): Remove properties and hooks.
(compilation-next-single-property-change): New function.
(compilation-next-error): Use it to parse when needed.
(compile-goto-error): Parse buffer as needed.
(compilation--compat-error-properties): Don't need a dummy `face'
property any more.
(compilation-process-setup-function): Fix docstring's false promises.
(compilation-error-regexp-alist-alist): Catch omake's continuous
recompilation message and avoid reuse of old markers.
(compilation-parse-errors-function): Declare obsolete.
(compilation-buffer-modtime): Remove.
(compilation--make-cdrloc, compilation--loc->col)
(compilation--loc->line, compilation--loc->file-struct)
(compilation--loc->marker, compilation--loc->visited)
(compilation--make-file-struct, compilation--file-struct->file-spec)
(compilation--file-struct->formats)
(compilation--file-struct->loc-tree): New macros. Use them.
(compilation--message): New defstruct. Use them.
(compilation-next-error-function): Don't mess with timestamps to try
and guess when to reparse.
* lisp/progmodes/compile.el: Cleanup text-properties namespace by using
`compilation-message' instead of `message', `compilation-directory'
instead of `directory', and `compilation-debug' instead of `debug'.
(compilation-last-buffer, compilation-parsing-end)
(compilation-error-list, compilation-old-error-list): Move to the
compatibility part of the code.
(compilation-error-properties): If `file' is a function, let it return
a file name.
(compilation-mode-font-lock-keywords): Be more conservative with the
omake "^ *" pattern prefix, to try and minimize the risk of
pathologically slow regexp matching.
(compilation-start): Use inhibit-read-only.
(compilation--unsetup): New function.
(compilation-shell-minor-mode, compilation-minor-mode): Use it.
(compilation-filter): Minor tweaks.
(compilation-next-error-function): Try and avoid abusing variable names.
(compilation--flush-file-structure): New fun.
(compilation-fake-loc): Use it for cleaner behavior when file is reused.
(debug-ignored-errors): Add "Moved past last ...".
(compilation--compat-error-properties)
(compilation--compat-parse-errors): Rename by doubling the "-".
* lisp/progmodes/grep.el (grep-regexp-alist): Tighten regexp.
(grep-mode-font-lock-keywords): Remove regexp that seems like
a left-over from before we used compile.el.
(grep-mode-font-lock-keywords): Call syntax-ppss-flush-cache when
modifying the buffer within with-silent-modifications.
* lisp/progmodes/prolog.el (prolog-system): Add GNU and ECLiPSe options.
(prolog-program-name, prolog-program-switches, prolog-consult-string)
(prolog-compile-string, prolog-prompt-regexp): Get rid of the <foo>-i
variable and use a function to compute the value dynamically.
(prolog-prompt-regexp): Add regexp for GNU Prolog.
(prolog-continued-prompt-regexp): Remove, unused.
(prolog-find-value-by-system): Try and use the value of prolog-system
in the *prolog* buffer if it helps.
(prolog-mode-keybindings-common): Bind C-c C-z unconditionally...
(prolog-zip-on): ..and check prolog-system and version here instead.
(prolog-inferior-self-insert-command): New command.
(prolog-inferior-mode-map): Use it.
(prolog-inferior-error-regexp-alist): New var.
(prolog-inferior-mode): Use it, along with compilation-shell-minor-mode.
(prolog-input-filter): Use derived-mode-p.
(prolog-inferior-guess-flavor): New function.
(prolog-ensure-process): Use it. Use make-comint-in-buffer rather than
make-comint to avoid running comint-mode twice.
(prolog-inferior-buffer): New fun.
(prolog-old-process-region, prolog-old-process-file):
Don't call prolog-bsts here...
(prolog-build-prolog-command): ...do it here instead.
(prolog-old-process-region, prolog-old-process-file):
Use compilation-fake-loc and compilation-forget-errors.
(prolog-consult-compile-region): Use bolp.