possible search modes from `isearch-message-prefix' to the prompt.
(isearch-occur): Use `with-isearch-suspended' to not exit Isearch
when reading a regexp to collect.
* lisp/replace.el (perform-replace): Display "symbol " and other search
modes from `isearch-message-prefix' in the *Help* buffer.
for total count of matching lines. Add `global-matches' for total
count of matches. Rename `matches' to `lines' for count of
matching lines. Add `matches' for count of matches.
Rename `lines' to `curr-line' for line count. Rename `prev-lines'
to `prev-line' for line number of prev match endpt.
Increment `matches' for every match. Print the number of
matching lines in the header.
(occur-context-lines): Rename `lines' to `curr-line'.
Rename `prev-lines' to `prev-line'.
Fixes: debbugs:14017
`skip-filtered-count', `skip-invisible-count' let-bound to 0.
Increment them for corresponding conditions and report the number
of skipped occurrences in the final message.
(query-replace, query-replace-regexp, query-replace-regexp-eval)
(replace-string, replace-regexp): Doc fix.
Fixes: debbugs:11746
In addition to checking `query-replace-skip-read-only', also
filter out matches by calling `run-hook-with-args-until-failure'
on `isearch-filter-predicates', and also check `search-invisible'
for t or call `isearch-range-invisible'.
(replace-dehighlight): Call `isearch-clean-overlays'.
Fixes: debbugs:11746
(occur-1): Pass `list-matching-lines-prefix-face' to the function
`occur-engine' if `face-differs-from-default-p' returns t.
(occur-engine): Add `,' inside backquote construct to evaluate
`prefix-face'. Propertize the prefix with the `prefix-face' face.
Pass `prefix-face' to the functions `occur-context-lines' and
`occur-engine-add-prefix'.
(occur-engine-add-prefix, occur-context-lines): Add optional arg
`prefix-face' and propertize the prefix with `prefix-face'.
Fixes: debbugs:14017
* lisp/replace.el (occur-read-regexp-defaults-function): New var.
(occur-read-regexp-defaults): New defun.
(occur-read-primary-args): Propagate above change.
element of `defaults' if it's a list, otherwise it should be
a string or nil. Let-bind `suggestions' to `defaults' if it's
a list, otherwise make a list with the string value. Doc fix.
Fixes: debbugs:13805
Set `isearch-lazy-highlight-start' and `isearch-lazy-highlight-end'
to `isearch-other-end' if it is not nil.
* lisp/replace.el (replace-highlight): Let-bind `isearch-other-end'
to `match-beg'.
* lisp/textmodes/ispell.el (ispell-highlight-spelling-error-overlay):
Let-bind `isearch-other-end' to `start', `isearch-forward' to t
and `isearch-error' to nil.
Fixes: debbugs:13402
* lisp/replace.el (read-regexp): Tighten the regexp that matches tag.
When tag is retrieved with `find-tag-default', use regexp that
matches tag at point. Also update docstring.
variables deeper to the loop that searches for the next match.
Add bindings for `isearch-nonincremental' and `isearch-adjusted'.
Use `isearch-search-fun-default' instead of `isearch-search-fun'.
* lisp/isearch.el (isearch-search-fun-default): Check for null
first element of isearch-cmds as a precaution when it's used
with inactive isearch.
Fixes: debbugs:13579
* doc/emacs/maintaining.texi (Tags Search): Change link "Replace" to
"Query Replace".
* lisp/replace.el (query-replace-help): Mention multi-buffer replacement
keys in the Help message.
Fixes: debbugs:12655
(query-replace-read-from): Add the last incremental search string
to the list of default values accessible via M-n.
(map-query-replace-regexp): Use `read-regexp'.
(query-replace, query-replace-regexp, query-replace-regexp-eval)
(map-query-replace-regexp, replace-string, replace-regexp):
Fix docstrings to replace mentions of `query-replace-interactive'
with alternatives.
Fixes: debbugs:12526
of `read-from-minibuffer' when `regexp-flag' is non-nil.
(occur-read-primary-args): Use `read-regexp' instead of
`read-string'.
(multi-occur-in-matching-buffers): Use `read-regexp' instead of
`read-from-minibuffer'.
* lisp/isearch.el (isearch-occur): Use `read-regexp' instead of
`read-string'.
* lisp/dired.el (dired-read-regexp): Use `read-regexp' instead of
`read-from-minibuffer'.
* lisp/progmodes/grep.el (grep-read-regexp): Use `read-regexp' instead
of `read-string'.
Fixes: debbugs:7567
(replace-lax-whitespace, query-replace-regexp)
(query-replace-regexp-eval, replace-regexp): Doc fix.
(perform-replace, replace-highlight): Let-bind
isearch-lax-whitespace to replace-lax-whitespace and
isearch-regexp-lax-whitespace to replace-regexp-lax-whitespace.
* lisp/isearch.el (isearch-query-replace): Let-bind
replace-lax-whitespace to isearch-lax-whitespace and
replace-regexp-lax-whitespace to
isearch-regexp-lax-whitespace.
Fixes: debbugs:10885
* lisp/replace.el (query-replace-map): Bind four new symbols for
requesting window scrolling.
* lisp/subr.el (y-or-n-p): Handle the window-scrolling bindings in
query-replace-map.
* lisp/custom.el (custom-theme-load-confirm): Use y-or-n-p.
* lisp/window.el (scroll-other-window-down): Make the arg optional.
* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): Don't bind scrolling keys
since they are now in query-replace-map.
* doc/lispref/minibuf.texi (Yes-or-No Queries): Document recentering and
scrolling in y-or-n-p. Remove gratuitous example.
* doc/lispref/searching.texi (Search and Replace): Document window scrolling
entries in query-replace-map.
Fixes: debbugs:8948
(query-replace, query-replace-regexp, query-replace-regexp-eval)
(replace-string, replace-regexp): Mention it in docstrings.
(perform-replace, replace-highlight): Let-bind
isearch-lax-whitespace and isearch-regexp-lax-whitespace according
to the values of replace-lax-whitespace and regexp-flag.
Don't let-bind search-whitespace-regexp.
* lisp/isearch.el (isearch-query-replace): Let-bind
replace-lax-whitespace instead of let-binding
replace-search-function and replace-re-search-function.
(isearch-lazy-highlight-search): Let-bind isearch-lax-whitespace
and isearch-regexp-lax-whitespace to lazy-highlight variables.
(isearch-toggle-symbol): Set isearch-regexp to nil
in isearch-word mode (like in isearch-toggle-word).
Fixes: debbugs:10885
* lisp/replace.el (replace-search-function)
(replace-re-search-function): Set default values to nil.
(perform-replace): Let-bind isearch-related variables based on
replace-related values, call `isearch-search-fun' and let-bind
the result to `search-function'. Remove code that sets
`search-function' and `search-string' separately for
`delimited-flag'.
(replace-highlight): Add new argument `delimited-flag' and
rename other arguments to the names used in `perform-replace'.
Let-bind `isearch-word' to the argument `delimited-flag'.
* lisp/loadup.el (purify-flag): Pre-grow the hash-table to reduce the
memory use.
* lisp/bindings.el (bindings--define-key): New function.
* lisp/vc/vc-hooks.el, lisp/replace.el, lisp/menu-bar.el:
* lisp/international/mule-cmds.el, lisp/emacs-lisp/lisp-mode.el:
* lisp/buff-menu.el, lisp/bookmark.el:
* bindings.el: Use it to purecopy define-key bindings.
* src/fns.c (maybe_resize_hash_table): Output message when growing the
purify-hashtable.
* doc/lispref/searching.texi (Regexp Functions, Regexp Search):
(Simple Match Data, Saving Match Data, Standard Regexps): Copyedits.
(Regexp Functions): Mention regexp-opt is not guaranteed.
Mention regexp-opt-charset.
(Regexp Search): Recommend against looking-back.
(Search and Replace): Use Texinfo recommended quote convention.
Add more query-replace-map items. List multi-query-replace-map items.
* lisp/replace.el (query-replace-map): Doc fix.
* admin/FOR-RELEASE: Related markup.
(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.