summaryrefslogtreecommitdiff
path: root/lisp/replace.el
Commit message (Collapse)AuthorAgeFilesLines
* Fix the end-of-query prompt in multi-occur and multi-isearch when fidoLars Ingebrigtsen2020-10-011-5/+13
| | | | | | | * lisp/misearch.el (multi-isearch-read-buffers): Ditto. * lisp/replace.el (multi-occur--prompt): New function (bug#41633). (multi-occur): Use it.
* ; Fix typosStefan Kangas2020-09-211-1/+1
|
* Allow binding keys in `query-replace-map'Juri Linkov2020-09-171-0/+2
| | | | | * lisp/replace.el (perform-replace): Allow binding keys in `query-replace-map' (bug#20687).
* Use `format-prompt' when prompting with default valuesLars Ingebrigtsen2020-09-061-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/woman.el (woman-file-name): * lisp/wid-edit.el (widget-file-prompt-value) (widget-coding-system-prompt-value): * lisp/w32-fns.el (w32-set-system-coding-system): * lisp/vc/vc.el (vc-print-root-log): * lisp/vc/vc-annotate.el (vc-annotate): * lisp/vc/emerge.el (emerge-read-file-name): * lisp/vc/ediff.el (ediff-directories) (ediff-directory-revisions, ediff-directories3) (ediff-merge-directories, ) (ediff-merge-directories-with-ancestor) (ediff-merge-directory-revisions) (ediff-merge-directory-revisions-with-ancestor) (ediff-merge-revisions, ediff-merge-revisions-with-ancestor) (ediff-revision): * lisp/vc/ediff-util.el (ediff-toggle-regexp-match): * lisp/vc/ediff-mult.el (ediff-filegroup-action): * lisp/vc/add-log.el (prompt-for-change-log-name): * lisp/textmodes/table.el (table-insert-row-column) (table-span-cell, table-split-cell-horizontally) (table-split-cell, table-justify, table-generate-source) (table-insert-sequence, table-capture) (table--read-from-minibuffer, table--query-justification): * lisp/textmodes/sgml-mode.el (sgml-tag, sgml-tag-help): * lisp/textmodes/reftex-ref.el (reftex-goto-label): * lisp/textmodes/refer.el (refer-get-bib-files): * lisp/textmodes/css-mode.el (css-lookup-symbol): * lisp/term.el (serial-read-name, serial-read-speed): * lisp/speedbar.el (speedbar-change-initial-expansion-list): * lisp/simple.el (previous-matching-history-element) (set-variable): * lisp/ses.el (ses-read-cell, ses-set-column-width): * lisp/replace.el (query-replace-read-from) (occur-read-primary-args): * lisp/rect.el (string-rectangle, string-insert-rectangle): * lisp/progmodes/tcl.el (tcl-help-on-word): * lisp/progmodes/sh-script.el (sh-set-shell): * lisp/progmodes/python.el (python-eldoc-at-point): * lisp/progmodes/octave.el (octave-completing-read) (octave-update-function-file-comment, octave-insert-defun): * lisp/progmodes/inf-lisp.el (lisp-symprompt): * lisp/progmodes/cperl-mode.el (cperl-info-on-command) (cperl-perldoc): * lisp/progmodes/compile.el (compilation-find-file): * lisp/net/rcirc.el (rcirc-prompt-for-encryption): * lisp/net/eww.el (eww): * lisp/net/browse-url.el (browse-url-with-browser-kind): * lisp/man.el (man): * lisp/mail/sendmail.el (sendmail-query-user-about-smtp): * lisp/mail/mailalias.el (build-mail-aliases): * lisp/mail/mailabbrev.el (merge-mail-abbrevs) (rebuild-mail-abbrevs): * lisp/locate.el (locate-prompt-for-search-string): * lisp/isearch.el (isearch-occur): * lisp/international/ogonek.el (ogonek-read-encoding) (ogonek-read-prefix): * lisp/international/mule.el (read-buffer-file-coding-system) (set-terminal-coding-system, set-keyboard-coding-system) (set-next-selection-coding-system, recode-region): * lisp/international/mule-cmds.el () (universal-coding-system-argument, search-unencodable-char) (select-safe-coding-system-interactively): * lisp/info.el (Info-search, Info-search-backward, Info-menu): * lisp/info-look.el (info-lookup-interactive-arguments): * lisp/imenu.el (imenu--completion-buffer): * lisp/ibuf-ext.el (mode, used-mode, ibuffer-mark-by-mode): * lisp/hi-lock.el (hi-lock-unface-buffer) (hi-lock-read-face-name): * lisp/help.el (view-emacs-news, where-is): * lisp/help-fns.el (describe-variable, describe-symbol) (describe-keymap): * lisp/gnus/mm-decode.el (mm-save-part): * lisp/gnus/gnus-sum.el (gnus-summary-browse-url): * lisp/gnus/gnus-group.el (gnus-group--read-bug-ids) (gnus-group-set-current-level): * lisp/frame.el (make-frame-on-monitor) (close-display-connection, select-frame-by-name): * lisp/format.el (format-encode-buffer, format-encode-region): * lisp/files.el (recode-file-name): * lisp/files-x.el (read-file-local-variable) (read-file-local-variable-value, ) (read-file-local-variable-mode): * lisp/ffap.el (ffap-menu-ask): * lisp/faces.el (face-read-string): * lisp/facemenu.el (facemenu-set-charset): * lisp/erc/erc-dcc.el (erc-dcc-do-GET-command): * lisp/emulation/edt-mapper.el (edt-mapper): * lisp/emacs-lisp/trace.el (trace--read-args) (trace-function-foreground, trace-function-background): * lisp/emacs-lisp/smie.el (smie-config-set-indent): * lisp/emacs-lisp/re-builder.el (reb-change-syntax): * lisp/emacs-lisp/package.el (describe-package): * lisp/emacs-lisp/find-func.el (read-library-name) (find-function-read): * lisp/emacs-lisp/ert.el (ert-read-test-name) (ert-run-tests-interactively): * lisp/emacs-lisp/disass.el (disassemble): * lisp/emacs-lisp/debug.el (debug-on-entry) (debug-on-variable-change): * lisp/emacs-lisp/advice.el (ad-read-advised-function) (ad-read-advice-class, ad-read-advice-name, ad-read-regexp): * lisp/dired-x.el (dired--mark-suffix-interactive-spec): * lisp/dired-aux.el (dired-diff): * lisp/cus-edit.el (custom-variable-prompt, customize-mode) (customize-changed-options): * lisp/completion.el (interactive-completion-string-reader): * lisp/calendar/timeclock.el (timeclock-ask-for-project): * lisp/calc/calcalg3.el (calc-get-fit-variables): * lisp/calc/calc-store.el (calc-edit-variable): * lisp/calc/calc-bin.el (calc-word-size): * lisp/bookmark.el (bookmark-set-internal): * lisp/abbrev.el (read-abbrev-file): Use `format-prompt' for prompting (bug#12443).
* occur: Add bindings for next-error-no-selectTino Calancha2020-05-311-1/+71
| | | | | | | | | | | | | | | | | | | | | | | | | Make the navigation in the occur buffer closer to the navigation in the compilation buffer. Add bindings to navigate the occur matches (Bug#39121). Honor `next-error-highlight' and `next-error-highlight-no-select' when navigating the occurrences. * lisp/replace.el (occur-highlight-regexp, occur-highlight-overlay): New variables. (occur-1): Set `occur-highlight-regexp' to the searched regexp. (occur-goto-locus-delete-o, occur--highlight-occurrence): New defuns. (occur-mode-display-occurrence, occur-mode-goto-occurrence): Use `occur--highlight-occurrence'. (occur-mode-map): Bind n to `next-error-no-select' and p to `previous-error-no-select' * etc/NEWS (Changes in Specialized Modes and Packages in Emacs 28.1): Announce this change. * test/lisp/replace-tests.el (replace-tests-with-highlighted-occurrence): Add helper macro. (occur-highlight-occurrence): Add test.
* Merge from origin/emacs-27Glenn Morris2020-05-031-14/+21
|\ | | | | | | | | | | 0a3731feef Make memq etc. examples more like they were ed25282b82 Document effect of 'search-upper-case' on replacement comm... 5a5d8a8ec0 * lisp/desktop.el (desktop-save): Doc fix. (Bug#41007)
| * Document effect of 'search-upper-case' on replacement commandsEli Zaretskii2020-05-021-14/+21
| | | | | | | | | | | | | | | | | | | | * doc/emacs/search.texi (Replacement and Lax Matches): Document the role of 'search-upper-case' in replacement commands. (Lax Search): Document the value 'not-yanks' of 'search-upper-case' where the variable itself is documented. * lisp/replace.el (query-replace-regexp, query-replace): Mention 'search-upper-case' and its effect in doc strings. (Bug#40940)
| * * lisp/replace.el (occur-engine-line): Revert part of fb16313025 (bug#39597)Juri Linkov2020-02-231-2/+4
| | | | | | | | ; Do not merge to master.
* | Update default-directory in occur buffer (bug#39608)Stéphane Boucher2020-03-041-1/+5
|/ | | | | | * lisp/replace.el (occur-1): Update default-directory in occur buffer. Copyright-paperwork-exempt: yes
* Update copyright year to 2020Paul Eggert2020-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* ; Fix typo in previous commitRobert Pluim2019-10-091-1/+1
| | | | * lisp/replace.el (query-replace-read-from): Fix typo in docstring.
* Improve doc strings in replace.elEli Zaretskii2019-10-091-10/+26
| | | | | | | | | * lisp/replace.el (query-replace-read-from) (query-replace-compile-replacement, query-replace-read-to) (replace-string, replace-regexp, occur-mode-goto-occurrence) (occur-next-error, occur-rename-buffer, multi-occur) (multi-occur-in-matching-buffers): Describe all arguments in doc strings. (Bug#31207)
* Fix an assignment to free variable warningTino Calancha2019-09-171-1/+1
| | | | | | | | | | It fixes a bug introduced by commit 'query-replace-regexp undo: Update next-replacement after undo' (30c4f35a6fc8a6507930923766c3126ac1c2063f) See https://lists.gnu.org/archive/html/emacs-devel/2019-09/msg00364.html * lisp/replace.el(perform-replace): Rename variable to next-replacement-replaced.
* Merge from origin/emacs-26Glenn Morris2019-09-151-6/+8
|\ | | | | | | | | | | 30c4f35 (origin/emacs-26) query-replace-regexp undo: Update next-repl... c596be0 Amend the menu caption for page "Display Property" in the Eli... 13b9510 Add description of chinese-sisheng
| * query-replace-regexp undo: Update next-replacement after undoTino Calancha2019-09-091-6/+8
| | | | | | | | | | | | | | | | | | * lisp/replace.el (perform-replace): Rename the local binding to not shadow next-replacement. Update next-replacement after undo (Bug#37287). * test/lisp/replace-tests.el (query-replace-undo-bug37287): Add test. (query-replace-undo-bug37073): Tweak this test.
* | Merge from origin/emacs-26Glenn Morris2019-08-201-2/+5
|\ \ | |/ | | | | | | | | | | | | 615cff4 (origin/emacs-26) Fix process filter documentation (Bug#13400) beb1d22 Fix query-replace-regexp undo feature # Conflicts: # test/lisp/replace-tests.el
| * Fix query-replace-regexp undo featureTino Calancha2019-08-191-2/+5
| | | | | | | | | | | | | | | | | | Ensure that non-regexp strings used with `looking-at' are quoted. * lisp/replace.el (perform-replace): Quote regexp (Bug#37073). * test/lisp/replace-tests.el (replace-tests-perform-replace-regexp-flag): New variable. (replace-tests-with-undo): Use it. (query-replace-undo-bug37073): Add tests.
* | Tweak mouse-face highlighting of Occur buffersLars Ingebrigtsen2019-07-151-7/+10
| | | | | | | | | | * lisp/replace.el (occur-engine): Ensure that the mouse highlight is done over the entire line (bug#27846).
* | Better match-data handling in perform-replaceJuri Linkov2019-07-121-19/+20
| | | | | | | | | | | | * lisp/replace.el (perform-replace): Don't wrap replace-highlight in save-match-data. Use `(nth 0 real-match-data)' instead of `(match-beginning 0)' after replace-highlight. (Bug#36328)
* | * lisp/replace.el (perform-replace): Move save-match-data hereJuri Linkov2019-07-081-13/+14
| | | | | | | | from replace-highlight for isearch-lazy-highlight-new-loop (bug#36328).
* | * lisp/replace.el (replace-highlight): Add save-match-data (bug#36328)Juri Linkov2019-07-051-1/+5
| | | | | | | | | | | | | | * lisp/term/tty-colors.el (tty-color-canonicalize): Replace string-match with string-match-p. Thanks to Jayden Navarro <jayden@yugabyte.com> and Alan Mackenzie <acm@muc.de>
* | Go back to "Maintainer: emacs-devel@gnu.org"Paul Eggert2019-05-251-0/+1
| | | | | | | | | | | | Restore lines saying "Maintainer: emacs-devel@gnu.org" when there is no special maintainer for a file. Although this wasn't documented it was common practice and removing the lines didn't have consensus.
* | Fixes for "Maintainer:" and related linesPaul Eggert2019-05-191-1/+0
| | | | | | | | | | | | Mostly, this just removes "Maintainer: emacs-devel@gnu.org" lines, which are not that useful. It also cleans up and regularizes a few similar lines.
* | Inhibit displaying help buffer in main window in perform-replaceJuri Linkov2019-04-101-16/+18
| | | | | | | | | | | | | | | | | | * lisp/replace.el (perform-replace): Use display-buffer-overriding-action with inhibit-same-window to prevent the help buffer from being displayed in the main window. (Bug#34972) Author: Michał Krzywkowski <k.michal@zoho.com> Copyright-paperwork-exempt: yes
* | i18n: Add function ngettext for pluralization.Juri Linkov2019-03-241-21/+30
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/international/mule-cmds.el (ngettext): New function. https://lists.gnu.org/archive/html/emacs-devel/2019-03/msg00586.html * lisp/replace.el (flush-lines, how-many, occur-1, occur-engine) (perform-replace): Use ngettext. * lisp/progmodes/grep.el (grep-exit-message): Use ngettext. (grep-mode-font-lock-keywords): Match both singular and plural form of "matches".
* | * lisp/replace.el (flush-lines): Return the number of deleted lines.Juri Linkov2019-02-281-9/+12
| | | | | | | | | | | | | | When called interactively, also print the number. (Bug#34520) * doc/emacs/search.texi (Other Repeating Search): Update flush-lines that prints the number of deleted lines.
* | Merge from origin/emacs-26Paul Eggert2018-12-311-1/+1
|\ \ | |/ | | | | | | | | 2fcf2df Fix copyright years by hand 26bed8b Update copyright year to 2019 2814292 Fix value of default frame height. (Bug#33921)
| * Update copyright year to 2019Paul Eggert2019-01-011-1/+1
| | | | | | | | Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
| * Guard occur against an undefined orig-lineRaimon Grau2018-12-101-1/+3
| | | | | | | | | | | | | | | | ; Not to be merged to master * lisp/replace.el (occur-engine): Avoid inserting the current line if orig-line is nil. This happens, for example, when reverting an occur buffer with `list-matching-lines-jump-to-current-line' set to t. (Bug#33476)
| * query-replace undo: Handle when user edits the replacement stringTino Calancha2018-06-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/replace.el (perform-replace): Update the replacement string after the user edit it (Fix Bug#31538). * test/lisp/replace-tests.el (query-replace-undo-bug31538): New test. Backport: (cherry picked from commits ea133e04f49afa7928e49a3ac4a85b47f6f13f01 and 7dcfdf5b14325ae7996f272f14c72810d7c84944)
| * Backport: Fix corner case in query-replace-regexp undoTino Calancha2018-06-031-0/+4
| | | | | | | | | | | | | | | | | | This commit fixes Bug#31492. * lisp/replace.el (replace-match-maybe-edit): Preserve match data. * test/lisp/replace-tests.el (query-replace-undo-bug31492): Add test. (cherry picked from commit bab73230d1be1fe394b7269c1365ef6fb1a5d9b3)
| * Backport: Preserve case in query-replace undoTino Calancha2018-06-031-0/+1
| | | | | | | | | | | | | | | | | | | | If the user query and replaces 'foo' with 'BAR', then undo must comeback to 'foo', not to 'FOO' (Bug#31073). * lisp/replace.el (perform-replace): Bind nocasify to non-nil value during undo/undo-all actions. * test/lisp/replace-tests.el (query-replace-undo-bug31073): Add test. (cherry picked from commit 32dc0cb1b5ae895d237c7118ccaeb084715934fd)
* | More font-lock improvements for diff-modeJuri Linkov2018-12-191-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/vc/diff-mode.el (diff-font-lock-keywords): Use diff-header face for git index lines (like already used for bzr index lines). Use diff-file-header face for binary file headers. (diff-find-source-location): Use expand-file-name for vc-find-revision. (diff--font-lock-prettify): Use diff-indicator-* faces for left-fringe indicators. (diff-syntax-fontify-props): Optimize to not use text-property-not-all for font-lock-ensure. * lisp/replace.el (occur-engine-line): Simplify to use font-lock-ensure without text-property-not-all.
* | Fix occur for non-nil list-matching-lines-jump-to-current-line (bug#33476)Juri Linkov2018-12-101-6/+6
| | | | | | | | | | * lisp/replace.el (occur-engine): Move orig-line let-binding higher. Don't use start-line in forward-line.
* | * lisp/replace.el (occur--garbage-collect-revert-args): New functionStefan Monnier2018-10-091-26/+30
| | | | | | | | | | | | | | (occur-mode, occur-1): Use it. (occur--region-start, occur--region-end, occur--region-start-line) (occur--orig-line): Remove vars. (occur-engine): Fix left over use of occur--region-start-line.
* | Revert part of last commitEli Zaretskii2018-10-091-13/+1
| | | | | | | | | | * lisp/replace.el (occur-revert-function): Revert last change, as it's no longer needed. (Bug#32987)
* | Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacsEli Zaretskii2018-10-091-99/+91
|\ \
| * | * lisp/replace.el: Rework implementation of the occur regionStefan Monnier2018-10-091-112/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | Put the region info in the "list of buffers" used for multi-occur. (occur--parse-occur-buffer): Remove. (occur): Pass the region to occur-1 as an overlay. (occur-1): 'bufs' is now a list of buffers or overlays. (occur-engine): 'buffers' is now a list of buffers or overlays.
* | | Unbreak 'revert-buffer' in Occur buffersEli Zaretskii2018-10-091-8/+8
|/ / | | | | | | | | | | | | | | * lisp/replace.el (occur-revert-function): Use the value of occur-revert-function from the correct buffer. (Bug#32987) * test/lisp/replace-tests.el (replace-occur-revert-bug32543) (replace-occur-revert-bug32987): New tests.
* | Fix a previous commitTino Calancha2018-09-211-13/+9
| | | | | | | | | | | | | | | | | | | | Suggested by Stefan Monnier here: https://lists.gnu.org/archive/html/emacs-devel/2018-09/msg00783.html * lisp/replace.el (occur--parse-occur-buffer): Since point is at the beginning of the buffer, use `point'. (occur-revert-function): Prefer `pcase-let' and `point-min'. Check whether `region-start' or `region-end' are non-nil.
* | Fix bug 32543Tino Calancha2018-09-181-3/+36
| | | | | | | | | | | | | | | | | | | | | | Store the region and orig line into the *Occur* header line. Retrieve this information in `occur-revert-function'. * lisp/replace.el (occur--parse-occur-buffer): New defun. (occur-revert-function): Use it. (occur-engine): Store region and original position as text properties into the *Occur* header line. * lisp/replace.el (occur-engine): Add sensible default values for (occur--orig-line and nlines.
* | query-replace undo: Handle when user edits the replacement stringTino Calancha2018-05-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | * lisp/replace.el (perform-replace): Update the replacement string after the user edit it (Fix Bug#31538). * test/lisp/replace-tests.el (replace-tests-clauses): New function. (replace-tests-bind-read-string): New variable. (replace-tests-with-undo): Macro to create boilerplate code. (query-replace-undo-bug31073): Use it. (query-replace-undo-bug31538): New test.
* | Fix corner case in query-replace-regexp undoTino Calancha2018-05-231-0/+4
| | | | | | | | | | | | | | This commit fixes Bug#31492. * lisp/replace.el (replace-match-maybe-edit): Preserve match data. * test/lisp/replace-tests.el (query-replace-undo-bug31492): Add test.
* | Improve Isearch error handlingJuri Linkov2018-04-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/isearch.el (isearch--momentary-message): Propertize message suffix with minibuffer-prompt face. (isearch--describe-regexp-mode): Do not omit description in case of error in default non-literal search. (isearch-message-prefix): Display “case-sensitive” in case of error. (isearch-message-suffix): Propertize message suffix with minibuffer-prompt face. (isearch-search-fun-default): Remove unused error handling. * lisp/vc/add-log.el (change-log-next-buffer): Better handle errors during wrapping.
* | * lisp/replace.el (query-replace-descr): Silence compiler.Glenn Morris2018-04-201-2/+3
| |
* | Use text properties to save search parameters. (Bug#22479)Juri Linkov2018-04-191-7/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/isearch.el (isearch-update-ring): Call isearch-string-propertize. Delete duplicates with possibly different text properties. (isearch-string-propertize) (isearch-update-from-string-properties): New functions. (with-isearch-suspended, isearch-ring-adjust1): Call isearch-update-from-string-properties. (isearch-edit-string): Let-bind minibuffer-allow-text-properties to t. (isearch-query-replace): Use propertized isearch-string. (isearch--lax-regexp-function-p): Simplify. * lisp/replace.el (query-replace-descr): Rewrite to keep text properties non-destructively in the replacement string. (query-replace--split-string): Don't remove text properties by substring-no-properties. (query-replace-read-args): Try to get isearch-regexp-function from text-properties. (perform-replace): Display parameters in the replacement message. * lisp/desktop.el (desktop--v2s): Check if text properties are unreadable. (Bug#30786)
* | * lisp/isearch.el (isearch-mode-map): Restore advertised bindings.Juri Linkov2018-04-191-1/+1
| | | | | | | | | | | | | | Remove obsolete comments and code. * lisp/replace.el (occur-find-match): Use user-error instead of error. (Bug#14912)
* | Add REGION-NONCONTIGUOUS-P arg to other replace.el commandsDrew Adams2018-04-191-16/+37
| | | | | | | | | | | | | | * lisp/replace.el (query-replace, query-replace-regexp): Doc fix. (query-replace-regexp-eval, map-query-replace-regexp) (replace-string, replace-regexp): Add REGION-NONCONTIGUOUS-P arg. (perform-replace): Doc fix. (Bug#27897)
* | Use next-error-found to set next-error-last-buffer.Juri Linkov2018-04-171-26/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://lists.gnu.org/archive/html/emacs-devel/2018-04/msg00207.html * lisp/simple.el (next-error-buffer): New buffer-local variable instead of making buffer-local next-error-last-buffer. (Bug#20489) (next-error-found-function): New defcustom. (next-error-buffer-on-selected-frame): Use t for avoid-current arg of next-error-buffer-p. (next-error-find-buffer): Add second rule for using the current next-error-buffer if it's not visited by other navigation. (next-error, next-error-internal): Call next-error-found. (next-error-found): New function with body extracted mostly from next-error. * lisp/vc/add-log.el (change-log-goto-source-internal): New function with body from change-log-goto-source. (change-log-goto-source): Call change-log-goto-source-internal and next-error-found. (change-log-next-error): Call change-log-goto-source-internal instead of change-log-goto-source. (change-log-mode): Don't set next-error-last-buffer. (Bug#28864) * lisp/vc/diff-mode.el (diff-goto-source): Call next-error-found. * lisp/progmodes/xref.el (xref-goto-xref): Call next-error-found. * lisp/replace.el (occur-mode-goto-occurrence) (occur-mode-goto-occurrence-other-window) (occur-mode-display-occurrence): Call next-error-found. (occur-next-error): Remove unnecessary with-current-buffer. (Bug#27362, bug#30646)
* | Preserve case in query-replace undoTino Calancha2018-04-091-0/+1
| | | | | | | | | | | | | | | | If the user query and replaces 'foo' with 'BAR', then undo must comeback to 'foo', not to 'FOO' (Bug#31073). * lisp/replace.el (perform-replace): Bind nocasify to non-nil value during undo/undo-all actions. * test/lisp/replace-tests.el (query-replace-undo-bug31073): Add test.