aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/replace.el (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Revert "New key 'M-j' for 'icomplete-mode' (bug#62108)"Juri Linkov2026-02-111-3/+0
| | | | | This reverts commit 3584a762b8cbfb6e13011827ec5934f039344d0f. Another fix follows shortly after this commit.
* New key 'M-j' for 'icomplete-mode' (bug#62108)Juri Linkov2026-01-301-0/+3
| | | | | | | | * lisp/icomplete.el (icomplete-exit): New alias for 'icomplete-fido-exit'. (icomplete-minibuffer-map): Bind it to "M-j" . * lisp/replace.el (multi-occur--prompt): Show "M-j" bound to 'icomplete-exit' in 'icomplete-mode'.
* ; Add 2026 to copyright years.Sean Whitton2026-01-011-1/+1
|
* December 2025 spelling fixesPaul Eggert2025-12-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of the fixes are to continue to use American rather than British spelling. * doc/misc/modus-themes.org (my-modus-themes-engraved-faces): Fix misspelled ‘:foreground’s. * etc/themes/modus-themes.el (modus-themes-faces): Fix misspelled ‘modus-themes-bold’. * lisp/emacs-lisp/rx.el (rx--normalize-char-pattern): Rename from rx--normalise-char-pattern. (rx--optimize-or-args): Rename from rx--optimise-or-args. * lisp/frame.el (frame--special-parameters): Fix misspelled "right-divider-width". * lisp/net/tramp.el (tramp-fingerprint-prompt-regexp): Use American spelling “centered”, to match current libfprintf. * lisp/org/org-fold-core.el (org-fold-core--optimize-for-huge-buffers): Rename from org-fold-core--optimise-for-huge-buffers. (org-fold-core-update-optimization): Rename from org-fold-core-update-optimisation, leaving an alias behind. (org-fold-core-remove-optimization): Rename from org-fold-core-remove-optimisation, leaving an alias behind. * lisp/org/org.el (org-advertized-archive-subtree): This alias is now obsolete. * lisp/play/zone.el (zone-ignored-buffers): Fix misspelling of ‘zone--buffer-encrypted-p’. * lisp/progmodes/csharp-mode.el (csharp-ts-mode-faces): Fix misspelling of ‘csharp’ group. * lisp/vc/vc.el (vc-clonable-backends-custom-type): Rename from vc-cloneable-backends-custom-type, leaving an alias behind. * test/lisp/emacs-lisp/bytecomp-tests.el: (bytecomp-tests--warn-arity-non-compiled-callee): Rename from bytecomp-tests--warn-arity-noncompiled-callee. (bytecomp-test-defface-spec): Reword a deliberate misspelling of “default” that is so common I don’t want it to pollute the spelling dictionary. * test/lisp/emacs-lisp/package-vc-tests.el: (package-vc-tests-preserve-artifacts): Rename from package-vc-tests-preserve-artifacts. * test/lisp/eshell/em-prompt-tests.el: (em-prompt-test/forward-backward-paragraph-1): Reword a deliberate misspelling of “goodbye” that is so common I don’t want it to pollute the spelling dictionary.
* Add query-replace-read-transpose-from-toJens Schmidt2025-12-201-4/+42
| | | | | | | | | | | | | Provide a command to easily swap FROM and TO arguments in a query replace operation. * lisp/replace.el (query-replace-read-transpose-from-to): New function. (query-replace-read-map): New keymap. (query-replace-read-from): Use new keymap to read from minibuffer. (read-regexp-map): Inherit from 'query-replace-read-map'. (query-replace-read-from, query-replace-read-to): Fix parameter references in doc strings. * etc/NEWS: Document the change. (Bug#79835)
* Override 'display-buffer-overriding-action' conditionally in perform-replaceJuri Linkov2025-12-011-3/+6
| | | | | | * lisp/replace.el (perform-replace): For 'diff' display, override 'display-buffer-overriding-action' only when it has the default value. https://lists.gnu.org/archive/html/emacs-devel/2025-11/msg01077.html
* Fix query-replace-regexp for using '^' with calculated replacement '\,'Juri Linkov2025-11-241-6/+10
| | | | | | | | | | * lisp/replace.el (replace--push-stack): Add new args 'next-replacement' and 'match-again' and push them to the stack. (perform-replace): Restore the previous already calculated values of 'next-replacement' and 'match-again' from the stack for the 'backup' ('^') key (bug#79811). * test/lisp/replace-tests.el (query-replace-tests): Add tests.
* Show the diff buffer with replacements by typing 'd' in 'query-replace'Juri Linkov2025-11-201-1/+13
| | | | | | | | | | * doc/emacs/search.texi (Query Replace): Mention new key 'd'. * lisp/replace.el (query-replace-help): Mention the key 'd'. (query-replace-map): Bind the key 'd' to 'diff'. (perform-replace): When 'def' is equal to 'diff', call 'multi-file-replace-as-diff' to show the diff buffer with replacements (bug#79761).
* * lisp/replace.el (replace--push-stack, perform-replace): Use markersStefan Monnier2025-11-131-21/+22
| | | | | | | | | | Don't use integers to store match data for "long term". Otherwise, buffer edits that occur between two steps (e.g. via process filters of post-command-hooks) makes it invalid, leading to very confusing behavior, e.g. after `C-M-% ... y` the right (next) match is highlighted yet if a process-filter or post-command-hook runs, the next `y` may replace something else than what was highlighted.
* Merge from origin/emacs-30Eli Zaretskii2025-10-181-1/+4
|\ | | | | | | 53aac6aecd2 ; Improve documentation of commands that split current wi...
| * ; Improve documentation of commands that split current windowEli Zaretskii2025-10-181-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/emacs/sending.texi (Sending Mail): * doc/emacs/dired.texi (Dired Enter, Dired Visiting): * doc/emacs/maintaining.texi (Old Revisions) (Change Log Commands, Looking Up Identifiers): * doc/emacs/windows.texi (Displaying Buffers): * doc/emacs/files.texi (Visiting): Add cross-references to where user options are described which control how windows are split. * lisp/mail/sendmail.el (mail-other-window): * lisp/gnus/message.el (message-mail-other-window) (message-news-other-window): * lisp/replace.el (occur-mode-goto-occurrence-other-window): * lisp/vc/vc.el (vc-revision-other-window): * lisp/vc/vc-dir.el (vc-dir-find-file-other-window): * lisp/progmodes/xref.el (xref-find-definitions-other-window): * lisp/simple.el (compose-mail-other-window) (clone-indirect-buffer-other-window): * lisp/vc/add-log.el (add-change-log-entry-other-window): * lisp/view.el (view-file-other-window) (view-buffer-other-window): * lisp/window.el (switch-to-buffer-other-window): * lisp/files.el (find-file-other-window) (find-file-read-only-other-window) (find-alternate-file-other-window): * lisp/dired.el (dired-other-window) (dired-mouse-find-file-other-window) (dired-find-file-other-window, dired-jump-other-window): Mention in the doc strings how to control the way the current window is split.
* | Merge from origin/emacs-30Eli Zaretskii2025-07-121-1/+1
|\ \ | |/ | | | | ebb65d41630 ; Fix typos
| * ; Fix typosRobert Pluim2025-07-071-1/+1
| | | | | | | | | | * lisp/emacs-lisp/warnings.el (warning-display-at-bottom): Fix typo. * lisp/replace.el (query-replace-help): Typo fix.
* | Merge from origin/emacs-30Eli Zaretskii2025-07-051-7/+9
|\ \ | |/ | | | | | | | | | | | | | | | | 3f7787c9794 ; * lisp/replace.el (query-replace-help): Fix help text (... b10596a6303 ; * lisp/emacs-lisp/warnings.el (warning-display-at-botto... 060f964906b Handle ts_node_type return NULL (bug#78938) 5bdacbe460a Improve documentation of 'warning-display-at-bottom' 30dae2ad239 Handle the case when ts_node_type returns NULL (bug#78938) 985ad1da76d ; * lisp/emacs-lisp/bytecomp.el (compilation-safety): Doc... de18407f513 ; * doc/lispref/functions.texi (Mapping Functions): Fix w...
| * ; * lisp/replace.el (query-replace-help): Fix help text (bug#78916).Eli Zaretskii2025-07-051-7/+9
| |
* | (perform-replace): Make it work with F-keys in TTYs (bug#78113)Stefan Monnier2025-05-221-14/+15
| | | | | | | | | | * lisp/replace.el (perform-replace): Use `read-key`. * test/lisp/replace-tests.el (replace-tests-with-undo): Adjust accordingly.
* | Use defvar-keymap for some trivial keymapsStefan Kangas2025-03-161-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/bindings.el (mode-line-window-dedicated-keymap) (mode-line-buffer-identification-keymap): * lisp/emulation/cua-rect.el (cua--overlay-keymap, cua--overlay-key): * lisp/mh-e/mh-mime.el (mh-mime-security-button-map): * lisp/mh-e/mh-utils.el (mh-hidden-header-keymap): * lisp/net/eudc-bob.el (eudc-bob-generic-keymap, eudc-bob-image-keymap) (eudc-bob-sound-keymap, eudc-bob-url-keymap, eudc-bob-mail-keymap): * lisp/progmodes/etags-regen.el (etags-regen-mode-map): * lisp/progmodes/octave.el (octave-help-mode-map): * lisp/replace.el (multi-query-replace-map): * lisp/simple.el (process-menu-mode-map, messages-buffer-mode-map): * lisp/startup.el (splash-screen-keymap): * lisp/tab-bar.el (tab-bar-mode-map): * lisp/textmodes/ispell.el (ispell-minor-keymap): * lisp/textmodes/tex-mode.el (latex-mode-map, plain-tex-mode-map): * lisp/tree-widget.el (tree-widget-button-keymap): * lisp/vc/vc-hooks.el (vc-mode-line-map): Use defvar-keymap.
* | Merge from origin/emacs-30Sean Whitton2025-03-121-1/+1
|\ \ | |/ | | | | | | | | | | | | 894b0e3a2fe ; Adapt comment in tramp.el cc87717fa07 Add keyword placeholder to tramp.el 7d0d61d8549 Rewrite ERT manual introduction b2f124f2a88 ; cperl-mode.el: Don't misinterpret exec_fcn as keyword exec 59d1aac49df Document return values of the various read-* functions
| * Document return values of the various read-* functionsEli Zaretskii2025-03-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/textmodes/string-edit.el (read-string-from-buffer): * lisp/simple.el (read-from-kill-ring, read-shell-command) (read-signal-name): * lisp/replace.el (read-regexp-case-fold-search): * lisp/auth-source.el (read-passwd): * lisp/subr.el (read-key, read-number): * lisp/minibuffer.el (read-file-name, read-no-blanks-input): * lisp/international/mule-cmds.el (read-multilingual-string): * lisp/language/japan-util.el (read-hiragana-string): * lisp/files-x.el (read-file-local-variable) (read-file-local-variable-mode, read-file-local-variable-value): * lisp/faces.el (read-face-font, read-face-name): * lisp/simple.el (read-extended-command): * lisp/env.el (read-envvar-name): * lisp/files.el (read-directory-name): * lisp/faces.el (read-color): * lisp/international/mule-diag.el (read-charset): * lisp/emacs-lisp/map-ynp.el (read-answer): * src/coding.c (Fread_coding_system) (Fread_non_nil_coding_system): * src/minibuf.c (Fread_command, Fread_from_minibuffer): * src/lread.c (Fread_char, Fread_char_exclusive, Fread_event): Doc fixes.
| * Update copyright year to 2025Stefan Kangas2025-01-021-1/+1
| | | | | | | | Run "TZ=UTC0 admin/update-copyright".
* | Don't access overriding-text-conversion-style when unboundPo Lu2025-02-181-7/+6
| | | | | | | | | | | | * lisp/replace.el (perform-replace): Don't access overriding-text-conversion-style when unbound, and also avoid needlessly polluting this symbol with a binding. (bug#76371)
* | Adapt query-replace and lazy highlighting to text conversionPo Lu2025-02-171-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/isearch.el (isearch-lazy-highlight-new-loop): Rather call redisplay to guarantee a valid window-start than sit-for, to account for cases where this function is called from an after-change-function bound to a special input event quickly followed by another event that does not modify the buffer. * lisp/progmodes/prog-mode.el (treesit-node-at): Declare function before references. * lisp/replace.el (perform-replace): When querying, suppress text conversion around the input loop.
* | Merge branch 'scratch/no-purespace' into 'master'Stefan Kangas2025-02-011-2/+2
|\ \
| * | Make bindings--define-key obsoleteStefan Kangas2024-12-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | It used to be like 'define-key', but was used for making pure copies of as much of a menu's data as possible. With purespace now gone, it can be replaced by 'define-key'. * lisp/bindings.el (bindings--define-key): Make into obsolete alias for 'define-key'. Update all callers.
* | | Update copyright year to 2025Paul Eggert2025-01-011-1/+1
|/ / | | | | | | Run "TZ=UTC0 admin/update-copyright".
* | Add new optional argument NO-HIGHLIGHT to query-replace-read-argsVisuwesh2024-07-281-2/+2
|/ | | | | | | | | | * lisp/replace.el (query-replace-read-args): Add new optional argument to disable regexp highlighting. * lisp/dired-aux.el (dired-do-query-replace-regexp) (dired-do-replace-regexp-as-diff) (dired-do-find-regexp-and-replace): Revert last change, and use the new argument instead. (bug#72147)
* ; Simplify (with-current-buffer (get-buffer ...) ...)Tim Landscheidt2024-03-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-021-2/+2
| | | | | | 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-021-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-021-1/+1
| |
* | Improve invisibility handling in isearch-lazy-highlight (bug#40808)Juri Linkov2023-11-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | * 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-181-7/+0
| | | | | | | | | | | | | | | | | | | | 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-151-2/+5
| | | | | | | | | | * 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-131-2/+4
|/ | | | | * 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-171-4/+6
| | | | | | | | * 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-101-1/+6
| | | | | * 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-181-3/+3
| | | | | | | | | | | | 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-011-1/+1
|
* ; Fix typosStefan Kangas2022-12-261-1/+1
| | | | (cherry picked from commit a5d39e11443fa30c8e8bc58254a1a59550dcd99e)
* Add cross-reference to flush-linesStefan Kangas2022-12-131-2/+5
| | | | | | * 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-091-1/+4
| | | | | * lisp/replace.el (kill-matching-lines): Add cross-reference to flush-lines.
* ; Fix typosStefan Kangas2022-11-111-1/+1
|
* perform-replace doc string fixLars Ingebrigtsen2022-10-021-2/+2
| | | | * lisp/replace.el (perform-replace): Fix doc string (bug#58177).
* Delete many items obsolete since 24.3Stefan Kangas2022-09-091-98/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-041-16/+29
| | | | | | | | | | | | | | * 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-091-4/+3
| | | | * lisp/replace.el (replace-string): Use new convenience functions.
* * lisp/replace.el (replace-highlight): Optimize for large buffers (bug#56815)Juri Linkov2022-08-091-1/+3
| | | | | 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-081-1/+4
| | | | | | | | | | | | | | | * 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-311-83/+4
| | | | | | | | | | | * 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-181-3/+2
| | | | | | | | | | | | | * 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)).