(occur-edit-mode-map): Bind C-c C-c to occur-cease-edit and C-o to
occur-mode-display-occurrence.
(occur-edit-mode): Add usage message.
(occur-cease-edit): New command.
(occur-after-change-function): Use text properties to find the
position of the prefix text.
(occur-engine): Set stickiness of prefix text properties.
Fixes: debbugs:8463
to avoid using special-display-* and same-window-* variables.
* lisp/buff-menu.el (Buffer-menu-switch-other-window): Use second arg
of display-buffer.
(Buffer-menu-2-window): Use switch-to-buffer-other-window.
* lisp/replace.el (occur-mode-goto-occurrence)
(occur-mode-display-occurrence) Use second arg of pop-to-buffer
and display-buffer.
* lisp/window.el (display-buffer-alist): Add *Python*.
* lisp/mail/reporter.el (reporter-submit-bug-report): Use second arg of
display-buffer.
* lisp/mail/sendmail.el (sendmail-user-agent-compose): Don't bind the
special-display and same-window variables.
(mail-other-window): Use switch-to-buffer-other-window.
(mail-other-frame): USe switch-to-buffer-other-frame.
* lisp/progmodes/gdb-mi.el (gdb-frame-gdb-buffer): Use
display-buffer-other-frame.
(gdb-display-gdb-buffer): Use pop-to-buffer.
* lisp/progmodes/gud.el (gud-goto-info): Use info-other-window.
* lisp/progmodes/python.el: Don't set same-window-buffer-names.
* lisp/textmodes/bibtex.el (bibtex-search-entry): Use switch-to-buffer.
* lisp/replace.el (occur-menu-map, occur-edit-mode-map): New vars.
(occur-mode-map): Bind occur-edit-mode. Use occur-menu-map.
(occur-edit-mode): New major mode (Bug#8463).
(occur-after-change-function): New function.
(occur-engine): Give Occur tags a read-only property.
(occur-collect-regexp-history): New var.
(occur-read-primary-args): Return a replace string for nlines, if needed.
(occur): Extend the meaning of nlines.
* replace.el (replace-highlight): Bind isearch-forward and
isearch-error, ensuring that highlighting is updated if the user
switches the search direction (Bug#6808).
* isearch.el (isearch-lazy-highlight-forward): New var.
(isearch-lazy-highlight-new-loop, isearch-lazy-highlight-search):
(isearch-lazy-highlight-update): Use it.
http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01280.html
* replace.el (occur-accumulate-lines): Add optional arg `pt'.
(occur-engine): Add local variables `ret', `prev-after-lines',
`prev-lines'. Use more arguments for `occur-context-lines'.
Set first elem of its returned list to `data', and the second elem
to `prev-after-lines'. Don't print the separator line.
In the end, print remaining context after-lines.
(occur-context-lines): Add new arguments `begpt', `endpt',
`lines', `prev-lines', `prev-after-lines'. Rewrite to combine
after-lines of the previous match with before-lines of the
current match and not overlap them. Return a list with two
values: the output line and the list of context after-lines.
* search.texi (Other Repeating Search): Remove line that `occur'
can not handle multiline matches.
* occur-testsuite.el (occur-tests): Add tests for context lines.
http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01044.html
* replace.el (occur): Doc fix.
(occur-engine): Set `begpt' to the beginning of the first line.
Set `endpt' to the end of the last match line. At first, count
line numbers between `origpt' and `begpt'. Split out code from
`out-line' variable to new let-bindings `match-prefix' and
`match-str'. In `out-line' add non-numeric prefix to all
non-first lines of multi-line matches. Finally, count lines
between `begpt' and `endpt' and add to `lines'.
Use `occur-engine-line' instead of duplicate code.
(occur-engine-line): New function created from duplicate code
in `occur-accumulate-lines' and `occur-engine'.
http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg00457.html
* replace.el (occur-1): Don't display regexp if it is longer
than window-width. Use `query-replace-descr' to display regexp.
(occur-engine): Don't display regexp in the buffer header for
multi-buffer occur. Display a separate header line with total
match count and regexp for multi-buffer occur.
Use `query-replace-descr' to display regexp.
* replace.el (query-replace-history): Give it a doc string.
(map-query-replace-regexp): Use query-replace-from-history-variable
and query-replace-to-history-variable.
For def=recenter, replace `recenter' with `recenter-top-bottom'
that is called with `this-command' and `last-command' let-bound
to `recenter-top-bottom'. When the last `def' was not `recenter',
set `recenter-last-op' to nil. (Bug#4981)
(perform-replace): Add processing of new multi-buffer keys bound
to `automatic-all' and `exit-current'. Set `query-flag' to nil
if last input char was `automatic-all'. Set new local variable
`multi-buffer' to t when one of new two keys were typed. Return
non-nil value of `multi-buffer' that tells to calling functions
to continue replacement on the next file.
(keep-lines-read-args, occur-read-primary-args):
Call `read-regexp' instead of code moved to new function.
(keep-lines, flush-lines, how-many): Remove parenthesis and colon
from the end of prompt.
(replace-re-search-function): Doc fix.
regexp-history and display it in the prompt, but don't add to the
list of minibuffer defaults. Bind history-add-new-input to nil to
not add automatically `default'. For empty input return `default'.
Otherwise, add `input' to regexp-history and return it.
(occur-1): Signal an error for the empty regexp.
be used to reveal or highlight the location of a match.
(occur-mode-goto-occurrence)
(occur-mode-goto-occurrence-other-window)
(occur-mode-display-occurrence): Run
`occur-mode-find-occurrence-hook'.