summaryrefslogtreecommitdiff
path: root/lisp/replace.el
Commit message (Collapse)AuthorAge
* ; Simplify (with-current-buffer (get-buffer ...) ...)Tim Landscheidt2024-03-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no need to call 'get-buffer', since 'with-current-buffer' does that internally. * lisp/calendar/todo-mode.el (todo-merge-category): * lisp/comint.el (comint-dynamic-list-completions): * lisp/emacs-lisp/checkdoc.el (checkdoc-error): * lisp/emacs-lisp/debug.el (debug, debugger-record-expression): * lisp/emacs-lisp/eieio-opt.el (eieio-browse): * lisp/emacs-lisp/re-builder.el (reb-restart-font-lock): * lisp/erc/erc-dcc.el (erc-dcc-do-LIST-command): * lisp/eshell/em-unix.el (eshell-poor-mans-grep): * lisp/gnus/gnus-group.el (gnus-add-mark): * lisp/net/eww.el (eww-next-bookmark, eww-previous-bookmark): * lisp/net/sieve.el (sieve-upload): * lisp/net/tramp-cmds.el (tramp-cleanup-some-buffers): * lisp/obsolete/quickurl.el (quickurl-list-populate-buffer): * lisp/org/ob-calc.el: (org-babel-execute:calc): * lisp/org/org-agenda.el (org-agenda-use-sticky-p): * lisp/pcomplete.el (pcomplete-show-completions): * lisp/progmodes/bug-reference.el (bug-reference--try-setup-gnus-article): * lisp/progmodes/idlw-help.el (idlwave-highlight-linked-completions): * lisp/progmodes/verilog-mode.el (verilog-preprocess): * lisp/replace.el (occur-1): * lisp/term.el (term-dynamic-list-completions): * lisp/time.el (world-clock-update): * lisp/url/url-cache.el (url-store-in-cache): * lisp/vc/vc-cvs.el (vc-cvs-merge, vc-cvs-merge-news): * lisp/vc/vc-rcs.el (vc-rcs-system-release): * lisp/vc/vc-svn.el (vc-svn-merge, vc-svn-merge-news): * test/lisp/calendar/icalendar-tests.el (icalendar-tests--get-error-string-for-export): * test/lisp/erc/erc-dcc-tests.el (pcomplete/erc-mode/DCC--get-1flag) (pcomplete/erc-mode/DCC--get-2flags) (pcomplete/erc-mode/DCC--get-2flags-reverse): * test/lisp/erc/erc-networks-tests.el (erc-networks--rename-server-buffer--existing--noreuse): * test/lisp/erc/erc-scenarios-services-misc.el (erc-scenarios-services-misc--reconnect-retry-nick): * test/lisp/erc/erc-tests.el (erc--refresh-prompt): Replace (with-current-buffer (get-buffer ...) ...) with (with-current-buffer ...).
* * lisp/replace.el (perform-replace): Accept default bindings in lookup-key.Juri Linkov2024-03-02
| | | | | | Set ACCEPT-DEFAULT arg of lookup-key to t (bug#69342). This will allow the users to ignore unbound keys with ‘(define-key query-replace-map [t] 'ignore)’.
* Merge from savannah/emacs-29Po Lu2024-01-02
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dc4e6b13296 ; Update copyright years in more files 64b37776318 ; Run set-copyright from admin.el 8e1c56ae467 ; Add 2024 to copyright years # Conflicts: # doc/misc/modus-themes.org # doc/misc/texinfo.tex # etc/NEWS # etc/refcards/ru-refcard.tex # etc/themes/modus-operandi-theme.el # etc/themes/modus-themes.el # etc/themes/modus-vivendi-theme.el # lib/alloca.in.h # lib/binary-io.h # lib/c-ctype.h # lib/c-strcasecmp.c # lib/c-strncasecmp.c # lib/careadlinkat.c # lib/cloexec.c # lib/close-stream.c # lib/diffseq.h # lib/dup2.c # lib/filemode.h # lib/fpending.c # lib/fpending.h # lib/fsusage.c # lib/getgroups.c # lib/getloadavg.c # lib/gettext.h # lib/gettime.c # lib/gettimeofday.c # lib/group-member.c # lib/malloc.c # lib/md5-stream.c # lib/md5.c # lib/md5.h # lib/memmem.c # lib/memrchr.c # lib/nanosleep.c # lib/save-cwd.h # lib/sha1.c # lib/sig2str.c # lib/stdlib.in.h # lib/strtoimax.c # lib/strtol.c # lib/strtoll.c # lib/time_r.c # lib/xalloc-oversized.h # lisp/auth-source-pass.el # lisp/emacs-lisp/lisp-mnt.el # lisp/emacs-lisp/timer.el # lisp/info-look.el # lisp/jit-lock.el # lisp/loadhist.el # lisp/mail/rmail.el # lisp/net/ntlm.el # lisp/net/webjump.el # lisp/progmodes/asm-mode.el # lisp/progmodes/project.el # lisp/progmodes/sh-script.el # lisp/textmodes/flyspell.el # lisp/textmodes/reftex-toc.el # lisp/textmodes/reftex.el # lisp/textmodes/tex-mode.el # lisp/url/url-gw.el # m4/alloca.m4 # m4/clock_time.m4 # m4/d-type.m4 # m4/dirent_h.m4 # m4/dup2.m4 # m4/euidaccess.m4 # m4/fchmodat.m4 # m4/filemode.m4 # m4/fsusage.m4 # m4/getgroups.m4 # m4/getloadavg.m4 # m4/getrandom.m4 # m4/gettime.m4 # m4/gettimeofday.m4 # m4/gnulib-common.m4 # m4/group-member.m4 # m4/inttypes.m4 # m4/malloc.m4 # m4/manywarnings.m4 # m4/mempcpy.m4 # m4/memrchr.m4 # m4/mkostemp.m4 # m4/mktime.m4 # m4/nproc.m4 # m4/nstrftime.m4 # m4/pathmax.m4 # m4/pipe2.m4 # m4/pselect.m4 # m4/pthread_sigmask.m4 # m4/readlink.m4 # m4/realloc.m4 # m4/sig2str.m4 # m4/ssize_t.m4 # m4/stat-time.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/stdio_h.m4 # m4/stdlib_h.m4 # m4/stpcpy.m4 # m4/strnlen.m4 # m4/strtoimax.m4 # m4/strtoll.m4 # m4/time_h.m4 # m4/timegm.m4 # m4/timer_time.m4 # m4/timespec.m4 # m4/unistd_h.m4 # m4/warnings.m4 # nt/configure.bat # nt/preprep.c # test/lisp/register-tests.el
| * ; Add 2024 to copyright yearsPo Lu2024-01-02
| |
* | Improve invisibility handling in isearch-lazy-highlight (bug#40808)Juri Linkov2023-11-20
| | | | | | | | | | | | | | | | | | | | | | * lisp/isearch.el (isearch-lazy-highlight-invisible): New variable. (isearch-lazy-highlight-new-loop, isearch-lazy-highlight-search) (isearch-lazy-highlight-match, isearch-lazy-highlight-buffer-update): Use it. * lisp/replace.el (replace-highlight): Let-bind isearch-invisible to search-invisible. * test/lisp/isearch-tests.el (isearch--test-invisible): New test.
* | (update_search_regs): Install better fix for bug#67124Stefan Monnier2023-11-18
| | | | | | | | | | | | | | | | | | | | The recent fix for the bug in `replace-match-maybe-edit` was basically a refinement of a previously installed workaround, whereas the bug was really in `update_search_regs`. * src/search.c (update_search_regs): Improve handling of `start` positions. * lisp/replace.el (replace-match-maybe-edit): Remove workaround. * test/src/search-tests.el (search-test--replace-match-update-data): New test.
* | Fix query-replace at EOBEli Zaretskii2023-11-15
| | | | | | | | | | * lisp/replace.el (replace-match-maybe-edit): Avoid clobbering match-data with outdated buffer position. (Bug#67124)
* | Fix defcustom :type in replace.el (Bug#65920)Mauro Aranda2023-09-13
|/ | | | | * lisp/replace.el (list-matching-lines-face) (list-matching-lines-buffer-name-face): Allow a nil value.
* Improve documentation of case transfer in replacement commandsEli Zaretskii2023-08-17
| | | | | | | | * doc/emacs/search.texi (Replacement and Lax Matches): * src/search.c (Freplace_match): * lisp/replace.el (query-replace, query-replace-regexp): Clarify in the doc string and the manual how letter-case is transferred from the replaced text to the replacement text. (Bug#65347)
* ; Fix minor documentation issue ion replace.elEli Zaretskii2023-05-10
| | | | | * lisp/replace.el (query-replace, query-replace-regexp): Doc fix. (Bug#63397)
* Rebind in read-regexp-map ‘M-c’ to ‘M-s c’ compatible with search-mapJuri Linkov2023-01-18
| | | | | | | | | | | | Also it's compatible with 'M-s c' (isearch-toggle-case-fold) used during Isearch. Also makes possible to use the global keybinding 'M-c' (capitalize-dwim) in the minibuffer. * doc/lispref/minibuf.texi (Text from Minibuffer): Rename ‘M-c’ to ‘M-s c’. * lisp/replace.el (read-regexp-map): Rebind ‘M-c’ to ‘M-s c’ (bug#60741). (read-regexp-toggle-case-fold): Rename from read-regexp-toggle-case-folding to more standard name.
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-01
|
* ; Fix typosStefan Kangas2022-12-26
| | | | (cherry picked from commit a5d39e11443fa30c8e8bc58254a1a59550dcd99e)
* Add cross-reference to flush-linesStefan Kangas2022-12-13
| | | | | | * lisp/replace.el (flush-lines, kill-matching-lines): Add cross-references between commands, using the names '(kill|delete)-matching-lines' for symmetry. (Bug#59934)
* ; Mention flush-lines in kill-matching-lines docstringStefan Kangas2022-12-09
| | | | | * lisp/replace.el (kill-matching-lines): Add cross-reference to flush-lines.
* ; Fix typosStefan Kangas2022-11-11
|
* perform-replace doc string fixLars Ingebrigtsen2022-10-02
| | | | * lisp/replace.el (perform-replace): Fix doc string (bug#58177).
* Delete many items obsolete since 24.3Stefan Kangas2022-09-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/allout.el (allout-exposure-change-hook) (allout-structure-added-hook, allout-structure-deleted-hook) (allout-structure-shifted-hook): * lisp/arc-mode.el (archive-extract-hooks): * lisp/buff-menu.el (Buffer-menu-buffer+size-width): * lisp/calendar/timeclock.el (timeclock-modeline-display) (timeclock-modeline-display, timeclock-update-modeline): * lisp/cedet/semantic/db-el.el (semanticdb-elisp-sym-function-arglist): * lisp/cedet/semantic/db-file.el (semanticdb-save-database-hooks): * lisp/cedet/semantic/edit.el (semantic-change-hooks) (semantic-edits-new-change-hooks) (semantic-edits-delete-change-hooks) (semantic-edits-reparse-change-hooks): * lisp/cedet/semantic/lex.el (semantic-lex-reset-hooks): * lisp/comint.el (comint--unquote&expand-filename) (comint-unquote-filename): * lisp/custom.el (user-variable-p): * lisp/dired.el (dired-shrink-to-fit, dired-pop-to-buffer) (dired-sort-set-modeline): * lisp/ebuff-menu.el (Electric-buffer-menu-mode): * lisp/emacs-lisp/byte-run.el (macro-declaration-function): * lisp/emacs-lisp/checkdoc.el (custom-print-functions) (checkdoc-comment-style-hooks): * lisp/emacs-lisp/cl-lib.el (custom-print-functions): * lisp/emacs-lisp/edebug.el (gud-inhibit-global-bindings): * lisp/erc/erc-dcc.el (erc-dcc-chat-filter-hook): * lisp/eshell/esh-mode.el (eshell-status-in-modeline): * lisp/eshell/eshell.el (eshell-add-to-window-buffer-names) (eshell-remove-from-window-buffer-names): * lisp/faces.el (set-face-underline-p, font-list-limit): * lisp/files.el (automount-dir-prefix, toggle-read-only): * lisp/filesets.el (filesets-cache-fill-content-hooks): * lisp/frame.el (automatic-hscrolling): * lisp/generic-x.el (javascript-generic-mode) (javascript-generic-mode-hook): * lisp/gnus/gnus-start.el (gnus-subscribe-newsgroup-hooks): * lisp/gnus/nndiary.el (nndiary-request-create-group-hooks) (nndiary-request-update-info-hooks) (nndiary-request-accept-article-hooks): * lisp/htmlfontify.el (hfy-post-html-hooks): * lisp/international/mule-cmds.el (inactivate-current-input-method-function) (inactivate-input-method, input-method-inactivate-hook) (ucs-insert): * lisp/international/quail.el (quail-inactivate) (quail-inactivate-hook): * lisp/international/robin.el (robin-inactivate) (robin-inactivate-hook): * lisp/leim/quail/hangul.el (hangul-input-method-inactivate): * lisp/leim/quail/uni-input.el (ucs-input-inactivate): * lisp/mail/emacsbug.el (report-emacs-bug-info): * lisp/mh-e/mh-e.el (mh-kill-folder-suppress-prompt-hooks): * lisp/mpc.el (mpc-string-prefix-p): * lisp/net/rcirc.el (rcirc-print-hooks, rcirc-sentinel-hooks) (rcirc-receive-message-hooks, rcirc-activity-hooks): * lisp/obsolete/crisp.el (crisp-mode-modeline-string): * lisp/pcomplete.el (pcomplete-arg-quote-list) (pcomplete-quote-argument): * lisp/progmodes/cc-mode.el (c-prepare-bug-report-hooks): * lisp/progmodes/python.el (python-info-ppss-context) (python-info-ppss-context-type) (python-info-ppss-comment-or-string-p, python-indent) (python-guess-indent, python-buffer, python-preoutput-result) (python-proc, python-send-receive, python-send-string) (python-use-skeletons): * lisp/progmodes/sh-script.el (sh-maybe-here-document): * lisp/replace.el (query-replace-interactive): * lisp/strokes.el (strokes-modeline-string): * lisp/subr.el (redraw-modeline): * lisp/term.el (term-default-fg-color, term-default-bg-color): * lisp/textmodes/tex-mode.el (latex-string-prefix-p) (tex-string-prefix-p): * lisp/url/url-parse.el (url-recreate-url-attributes): * lisp/vc/add-log.el (change-log-acknowledgement): * lisp/vc/ediff-wind.el (ediff-choose-window-setup-function-automatically): * lisp/vc/pcvs-util.el (cvs-string-prefix-p): * lisp/vc/vc.el (vc-string-prefix-p): * lisp/window.el (display-buffer-function): * lisp/winner.el (winner-mode-leave-hook): Remove many functions and variables obsolete since 24.3. * lisp/buff-menu.el (list-buffers--refresh): * lisp/dired.el (dired-mode-map): * lisp/files.el (abbreviate-file-name): * lisp/generic-x.el (generic-default-modes): * lisp/mh-e/mh-funcs.el (mh-kill-folder): * lisp/progmodes/hideif.el (hide-ifdef-mode-submap): * lisp/replace.el (query-replace-read-from): * lisp/term.el (term): * lisp/window.el (display-buffer): Don't use above deleted functions and variables. * src/marker.c (Fbuffer_has_markers_at): Delete DEFUN obsolete since 24.3. (syms_of_marker) <Sbuffer_has_markers_at>: Delete defsubr. * lisp/subr.el (buffer-has-markers-at): Remove obsoletion of above deleted DEFUN. * etc/TODO: Doc fix; don't mention above deleted function. * admin/cus-test.el (cus-test-get-options): * lisp/pcomplete.el: Doc fixes; don't mention removed items. ; * etc/NEWS: List removed items.
* Use use-region-beginning/end in replacement commands (bug#45607)Juri Linkov2022-09-04
| | | | | | | | | | | | | | * lisp/isearch.el (isearch-query-replace): Use use-region-beginning and use-region-end. * lisp/textmodes/paragraphs.el (repunctuate-sentences): * lisp/replace.el (query-replace, query-replace-regexp) (map-query-replace-regexp, replace-string, replace-regexp): Add 'interactive-args' to 'declare' and use use-region-beginning, use-region-end, use-region-noncontiguous-p. * lisp/simple.el (use-region-noncontiguous-p): New function. (region-noncontiguous-p): Return more meaningful value.
* Use new convenience functions in replace-stringLars Ingebrigtsen2022-08-09
| | | | * lisp/replace.el (replace-string): Use new convenience functions.
* * lisp/replace.el (replace-highlight): Optimize for large buffers (bug#56815)Juri Linkov2022-08-09
| | | | | Let-bind isearch-lazy-count and lazy-highlight-buffer to nil to avoid revisiting all matches in the whole buffer after every replacement.
* Allow specifying how args are to be stored in `command-history'Lars Ingebrigtsen2022-08-08
| | | | | | | | | | | | | | | * doc/lispref/functions.texi (Declare Form): Document `interactive-args' * lisp/replace.el (replace-string): Store the correct interactive arguments (bug#45607). * lisp/emacs-lisp/byte-run.el (byte-run--set-interactive-args): New function. (defun-declarations-alist): Use it. * src/callint.c (fix_command): Remove the old hack (which now longer works since interactive specs are byte-compiled) and instead rely on `interactive-args'.
* Delete additional items obsolete since 20, 21 and 22Stefan Kangas2022-07-31
| | | | | | | | | | | * lisp/font-lock.el (font-lock-reference-face): Delete variable alias obsolete since 20.3. * lisp/progmodes/cc-cmds.el (c-toggle-auto-state): Delete alias obsolete since 22.1. * lisp/replace.el (query-replace-regexp-eval): Delete function obsolete since 22.1. (replace-count, replace-re-search-function): Doc fixes; adjust for above deleted function.
* Use `take` where clearly safe to do so (bug#56521)Mattias Engdegård2022-07-18
| | | | | | | | | | | | | * lisp/emacs-lisp/seq.el (seq-take): * lisp/auth-source.el (auth-source-secrets-search) (auth-source-plstore-search): * lisp/gnus/message.el (message-insert-formatted-citation-line): * lisp/net/dbus.el (dbus-unregister-object): * lisp/replace.el (occur-context-lines): * test/src/print-tests.el (print-circular): Replace hand-written loop or `butlast` call with `take` for clarity, performance and validation. We have the equivalence (take N LIST) = (butlast LIST (- (length LIST) N)).
* Don't hard-code `M-c' in `read-regexp'Lars Ingebrigtsen2022-07-05
| | | | | | * lisp/replace.el (read-regexp-map): New map. (read-regexp--case-fold, read-regexp-toggle-case-folding) (read-regexp): Factor out to avoid hard-coding `M-c'.
* Quote some literal keys to get help-key-binding faceStefan Kangas2022-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/align.el (align): * lisp/bindings.el (undo-repeat-map): * lisp/calc/calc-embed.el (calc-do-embedded): * lisp/calc/calc-prog.el (calc-user-define-invocation): * lisp/calc/calc-yank.el (calc--edit-mode): * lisp/comint.el (comint-history-isearch) * lisp/dired.el (dired-mode): * lisp/emulation/viper.el (viper-mode): * lisp/erc/erc-button.el (erc-button-face): * lisp/erc/erc-track.el (erc-track-enable-keybindings): * lisp/gnus/gnus-art.el (gnus-article-button-face): * lisp/gnus/gnus-eform.el (gnus-edit-form): * lisp/gnus/gnus-sum.el (gnus-summary-stop-at-end-of-message) (gnus-summary-goto-unread): * lisp/icomplete.el (icomplete-show-matches-on-no-input): * lisp/image-mode.el (image-scroll-up): * lisp/international/iso-transl.el (iso-transl-set-language): * lisp/isearch.el (isearch-forward-regexp): * lisp/misc.el (butterfly): * lisp/outline.el (outline-minor-mode-cycle-filter) (outline-minor-mode-cycle): * lisp/progmodes/grep.el (rgrep): * lisp/progmodes/gud.el (gud-gdb-repeat-map, gud-sdb-repeat-map) (gud-dbx-repeat-map, gud-xdb-repeat-map, gud-perldb-repeat-map) (gud-pdb-repeat-map, gud-guiler-repeat-map, gud-jdb-repeat-map): * lisp/progmodes/idlw-shell.el (idlwave-shell-graphics-window-size) (idlwave-shell-mode): * lisp/progmodes/idlwave.el (idlwave-shell-debug-modifiers) (idlwave-list-shell-load-path-shadows): * lisp/progmodes/python.el (python-shell-get-process-or-error): * lisp/repeat.el (repeat-check-key): * lisp/replace.el (query-replace, query-replace-regexp) (read-regexp): * lisp/simple.el (read-extended-command-predicate): * lisp/tab-bar.el (tab-bar-switch-repeat-map) (tab-bar-move-repeat-map): * lisp/term.el (ansi-term): * lisp/textmodes/reftex-index.el (reftex-index-phrases-set-macro-key): * lisp/vc/emerge.el (emerge-scroll-left, emerge-scroll-right): * lisp/windmove.el: * lisp/winner.el (winner-mode): Quote literal keys to get 'help-key-binding' face. * lisp/comint.el (comint-insert-previous-argument): Use regular quotes.
* Fix subr-x fix that was missed when re-revertingLars Ingebrigtsen2022-06-25
| | | | * lisp/replace.el (require): Fix subr-x build warning.
* Revert "Fix some byte-compilation warnings about subr-x"Lars Ingebrigtsen2022-06-25
| | | | | | This reverts commit cd479aa8bd498da4d7980a7fe7a37e238761482f. This led to build failures when doing bootstraps.
* Fix some byte-compilation warnings about subr-xLars Ingebrigtsen2022-06-24
| | | | | | | | * lisp/term/haiku-win.el (require): * lisp/replace.el (require): * lisp/progmodes/elisp-mode.el (require): * lisp/isearch.el (require): * lisp/files.el (require): Require subr-x when compiling.
* * lisp/replace.el (read-regexp): Use minibuffer-message in the minibuffer.Juri Linkov2022-06-14
|
* Allow `query-replace' to do exact replacement of the current itemLars Ingebrigtsen2022-06-13
| | | | | | | | | * doc/emacs/search.texi (Query Replace): Document it. * lisp/replace.el (query-replace-help): Amend help text. (query-replace-map): Bind `E' to the exact case replacement. (perform-replace): Allow editing a replacement with exact case (bug#8504).
* Add a `M-c' command to `read-regexp'Lars Ingebrigtsen2022-06-13
| | | | | | | * doc/lispref/minibuf.texi (Text from Minibuffer): Document it. * lisp/replace.el (read-regexp): Add a `M-c' command to indicate case folding (bug#16913).
* ; Fix typosStefan Kangas2022-05-15
|
* Merge from origin/emacs-28Eli Zaretskii2022-04-28
|\ | | | | | | | | # Conflicts: # lisp/progmodes/xref.el
| * Add minimum instructions to 'query-replace' commandsEli Zaretskii2022-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/vc/vc-dir.el (vc-dir-query-replace-regexp): * lisp/textmodes/reftex-global.el (reftex-query-replace-document): * lisp/progmodes/project.el (project-query-replace-regexp): * lisp/progmodes/etags.el (tags-query-replace): * lisp/progmodes/ebrowse.el (ebrowse-tags-query-replace): * lisp/isearch.el (isearch-query-replace, isearch-occur): * lisp/emulation/viper-cmd.el (viper-query-replace): * lisp/dired-aux.el (dired-do-query-replace-regexp) (dired-do-find-regexp-and-replace): * lisp/progmodes/xref.el (xref-query-replace-in-results): * lisp/replace.el (query-replace, query-replace-regexp) (query-replace-regexp-eval, map-query-replace-regexp): Add minimal instructions for dealing with matches, with a link to the command that shows the full instructions. (Bug#55050)
* | Add lazy highlight when reading 'query-replace' argumentsAugusto Stoffel2022-04-10
| | | | | | | | | | | | | | | | | | * lisp/replace.el (query-replace-read-args): Use 'minibuffer-lazy-highlight-setup' to highlight the text to be replaced in the original buffer (and a match count, if applicable). (replace--region-filter): New function for code that used to be inlined in perform-replace but is useful elsewhere. (perform-replace): Use 'replace--region-filter'.
* | Add search function to search within filenames in Dired and WDired (bug#14013)Juri Linkov2022-03-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/dired-aux.el (dired-isearch-filenames-mode): Use dired-isearch-search-filenames on isearch-search-fun-function instead of dired-isearch-filter-filenames on isearch-filter-predicate. (dired-isearch-filter-filenames): Remove function. (dired-isearch-search-filenames): Add function. * lisp/isearch.el (isearch-message-prefix): Add isearch-search-fun-function to the list of supported advice-functions along with isearch-filter-predicate. * lisp/replace.el (replace-search): Add comment. * lisp/wdired.el (wdired-search-replace-filenames): New defcustom. (wdired-isearch-filter-read-only): Remove function. (wdired-change-to-wdired-mode, wdired-change-to-dired-mode): Add and remove dired-isearch-search-filenames on isearch-search-fun-function instead of wdired-isearch-filter-read-only on isearch-filter-predicate. Also set/unset replace-search-function and replace-re-search-function. Remove and restore isearch-mode-hook with dired-isearch-filenames-setup. The problem is that dired-isearch-filenames-setup adds dired-isearch-filenames-end to isearch-mode-end-hook that removes dired-isearch-search-filenames added to isearch-search-fun-function in wdired-change-to-wdired-mode. Then replace-highlight can't use dired-isearch-search-filenames.
* | * lisp/replace.el (perform-replace): Allow using isearch in recursive-edit.Juri Linkov2022-02-08
| | | | | | | | | | Let-bind isearch-filter-predicate to the default value before calling recursive-edit to allow using isearch in a recursive edit (bug#53758).
* | * lisp/replace.el (query-replace-read-from): Use default for empty input.Juri Linkov2022-02-02
| | | | | | | | | | | | Set 'default' from non-empty 'query-replace-read-from-default'. Use the default in non-regexp prompt and return it for empty input. https://lists.gnu.org/archive/html/emacs-devel/2022-02/msg00044.html
* | * lisp/replace.el (query-replace-read-from-default): New variable.Juri Linkov2022-02-01
| | | | | | | | | | | | | | | | | | | | | | | | | | (query-replace-read-from-regexp-default): New variable. (query-replace-read-from): Use new variables. * lisp/progmodes/project.el (project-query-replace-regexp): Let-bind query-replace-read-from-regexp-default to find-tag-default-as-regexp. * lisp/progmodes/xref.el (xref-find-references-and-replace): Let-bind query-replace-read-from-default to find-tag-default. https://lists.gnu.org/archive/html/emacs-devel/2022-01/msg01909.html
* | Merge from origin/emacs-28Stefan Kangas2022-01-31
|\| | | | | | | | | | | 6f282b31ad Update to Org 9.5.2-13-gdd6486 6636231b2c ; * lisp/international/latin1-disp.el: Update commentary. f22e9ba9ac Fix regression in Occur Edit mode
| * Fix regression in Occur Edit modeEli Zaretskii2022-01-30
| | | | | | | | | | * lisp/replace.el (occur-after-change-function): Fix the algorithm to find the smallest change in some corner cases. (Bug#53598)
* | Make occur edit mode more resilientLars Ingebrigtsen2022-01-23
| | | | | | | | | | * lisp/replace.el (occur-engine): Make the prefix read-only so that it's preserved in edit mode (bug#53419).
* | Merge from origin/emacs-28Eli Zaretskii2022-01-01
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year. 86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year ebe8772f65 ; Minor fixes related to copyright years 23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye... 8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t. 19dcb237b5 ; Add 2022 to copyright years. # Conflicts: # etc/NEWS # etc/refcards/ru-refcard.tex # lib/cdefs.h # lisp/erc/erc-dcc.el # lisp/erc/erc-imenu.el # lisp/erc/erc-replace.el # lisp/image-dired.el # lisp/progmodes/xref.el # m4/alloca.m4 # m4/byteswap.m4 # m4/errno_h.m4 # m4/getopt.m4 # m4/gnulib-common.m4 # m4/inttypes.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/sys_socket_h.m4
| * ; Add 2022 to copyright years.Eli Zaretskii2022-01-01
| |
* | ; * lisp/replace.el (replace-regexp-function): Doc fix. (Bug#52558)Eli Zaretskii2021-12-29
| |
* | * lisp/replace.el (replace-regexp-function): New function (bug#52558).Juri Linkov2021-12-28
| | | | | | | | (replace-search, replace-highlight): Use it.
* | Use substitute-command-keys for literal key sequencesStefan Kangas2021-11-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/abbrev.el (expand-region-abbrevs): * lisp/calc/calc-graph.el (calc-graph-show-dumb): * lisp/calc/calc-help.el (calc-help-for-help): * lisp/calc/calc-mode.el (calc-auto-why): * lisp/calc/calc.el (calc-do): * lisp/calculator.el (calculator-mode): * lisp/dired-aux.el (dired-create-files) (dired-do-create-files-regexp, dired-create-files-non-directory): * lisp/dired-x.el (dired-virtual): * lisp/dired.el (dired-mark-region, dired-unmark-all-files): * lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): * lisp/emacs-lisp/re-builder.el (reb-enter-subexp-mode): * lisp/epa-ks.el (epa-ks--display-keys): * lisp/erc/erc.el (erc-toggle-debug-irc-protocol): * lisp/files.el (save-some-buffers): * lisp/gnus/gnus-dired.el (gnus-dired-find-file-mailcap) (gnus-dired-print): * lisp/gnus/gnus-group.el (gnus-keep-same-level): * lisp/gnus/gnus-score.el (gnus-score-find-trace): * lisp/gnus/gnus.el (to-list): * lisp/gnus/message.el (message--send-mail-maybe-partially): * lisp/mail/supercite.el (sc-set-variable): * lisp/minibuffer.el (minibuffer-inactive-mode): * lisp/progmodes/etags.el (select-tags-table): * lisp/progmodes/idlw-shell.el (idlwave-shell-mode) (idlwave-shell-char-mode-loop): * lisp/replace.el (query-replace-help): * lisp/simple.el (set-variable): * lisp/subr.el (read-char-from-minibuffer): * lisp/textmodes/ispell.el (ispell-help, ispell-message): * lisp/textmodes/reftex-global.el (reftex-find-duplicate-labels): * lisp/textmodes/reftex-vars.el (reftex-toc-include-file-boundaries) (reftex-toc-include-labels, reftex-toc-include-index-entries) (reftex-toc-include-context, reftex-toc-follow-mode) (reftex-index-include-context, reftex-index-follow-mode) (reftex-enable-partial-scans) (reftex-auto-update-selection-buffers) (reftex-highlight-selection): * lisp/time.el (display-time-update): * lisp/vc/ediff-help.el (ediff-help-for-quick-help): * lisp/vc/ediff-init.el (ediff-keep-variants): * lisp/vc/ediff-ptch.el (ediff-fixup-patch-map) (ediff-patch-file-internal): * lisp/windmove.el (windmove-delete-default-keybindings): Use 'substitute-command-keys' for literal key sequences. * lisp/userlock.el (userlock--fontify-key): Remove function. (ask-user-about-lock, ask-user-about-lock-help) (ask-user-about-supersession-threat) (ask-user-about-supersession-help): Use 'substitute-command-keys' for literal key sequences. * lisp/ibuffer.el (ibuffer-unmark-all): Use 'substitute-command-keys' for command.
* | Remove redundant #' before lambdaStefan Kangas2021-10-21
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * admin/unidata/unidata-gen.el (unidata-gen-table) (unidata-gen-table-symbol, unidata-gen-table-integer) (unidata-gen-table-numeric, unidata-gen-table-word-list) (unidata-describe-decomposition): * lisp/apropos.el (apropos-user-option): * lisp/bookmark.el (bookmark-bmenu-search): * lisp/composite.el (unicode-category-table): * lisp/elec-pair.el (electric-pair--balance-info): * lisp/electric.el (electric-quote-chars): * lisp/emulation/cua-base.el (cua-rectangle-mark-key): * lisp/epa-hook.el (epa-file-encrypt-to): * lisp/faces.el (face-font-selection-order) (face-font-family-alternatives, face-font-registry-alternatives) (face-valid-attribute-values, tty-run-terminal-initialization): * lisp/files.el (recover-file, file-expand-wildcards): * lisp/frame.el (frames-on-display-list): * lisp/help-at-pt.el (help-at-pt-display-when-idle): * lisp/help-fns.el (help-fns--face-attributes): * lisp/ido.el (ido-mode, ido-unc-hosts): * lisp/isearch.el (isearch-highlight-regexp) (isearch-highlight-lines-matching-regexp): * lisp/language/indian.el (script-regexp-alist): * lisp/language/lao.el: * lisp/leim/quail/ipa.el (ipa-x-sampa-prepend-to-keymap-entry): * lisp/mh-e/mh-folder.el (mh-process-commands): * lisp/mh-e/mh-mime.el (mh-display-with-external-viewer): * lisp/ps-mule.el (ps-mule-end-job): * lisp/ps-print.el (ps-color-scale, ps-background-pages) (ps-background-text, ps-background-image, ps-background) (ps-begin-job, ps-print-translation-table): * lisp/recentf.el (recentf-sort-ascending) (recentf-sort-descending, recentf-sort-basenames-ascending) (recentf-sort-basenames-descending) (recentf-sort-directories-ascending) (recentf-sort-directories-descending): * lisp/replace.el (occur-engine-add-prefix): * lisp/select.el (xselect--encode-string): * lisp/server.el (server-use-tcp): * lisp/ses.el (ses-sort-column): * lisp/sort.el (sort-columns): * lisp/term/ns-win.el (window-system-initialization): * lisp/tree-widget.el (tree-widget-image-formats): * lisp/whitespace.el (whitespace-report-region): Remove redundant #' before lambda.
* ; More minor stylistic fixes found by checkdocStefan Kangas2021-09-22
|