summaryrefslogtreecommitdiff
path: root/lisp/isearch.el
Commit message (Collapse)AuthorAge
* ; Fix whitespace of last changeEli Zaretskii2023-02-05
|
* ; * lisp/isearch.el (emoji--read-emoji): Avoid compilation warning.Eli Zaretskii2023-02-05
|
* No longer use transient in isearch-emoji-by-nameJonas Bernoulli2023-02-05
| | | | | | | | | | * lisp/isearch.el (isearch-emoji-by-name): Use 'emoji--read-emoji' and if that returns derivations, 'completing-read' to select one of them. This fixes bug#60740. * lisp/international/emoji.el (emoji--init): Autoload. (emoji--read-emoji): New function, which doesn't use transient and returns a list of the glyph and all derivations, if any. (emoji--choose-emoji): Use 'emoji--read-emoji'.
* * lisp/isearch.el (isearch-emoji-by-name): Disable derived emoji (bug#60740).Juri Linkov2023-01-30
| | | | | Let-bind emoji--derived to nil to avoid the subsequent selection of derived emoji that fails in transient.el.
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-01
|
* Improve documentation of 'isearch-open-overlay-temporary'Eli Zaretskii2023-01-01
| | | | | | * lisp/isearch.el (isearch-open-overlay-temporary): Document that the overlay passed to the 'isearch-open-invisible-temporary' function cannot be deleted too early. (Bug#60399)
* * lisp/isearch.el: Small fixes.Juri Linkov2022-12-28
| | | | | | | | | (isearch-wrap-pause): Mention the new feature of `no' and `no-ding' in the docstring. (isearch-lax-whitespace, isearch-forward-thing-at-point): Add the group 'isearch' since another defgroup changed the default group. (isearch-delete-char): Use 'isearch-invisible' instead of 'search-invisible' since the users might change the current value with 'M-s i'.
* Don't allow lazy highlight from recursive minibuffersAugusto Stoffel2022-12-13
| | | | | | | See bug#59918. * lisp/isearch.el (minibuffer-lazy-highlight-setup): Don't activate when starting a recursive minibuffer.
* * lisp/isearch.el (isearch-search): Don't bind `inhibit-point-motion-hooks`Stefan Monnier2022-10-07
| | | | | | The let-binding was added back in 1997 (commit 79c7a4fa5f974a9d3b) "because we might have to search inside invisible and intangible text". So it's been redundant since Emacs-25 changed the default to t.
* Prefer defvar-keymap in several casesStefan Kangas2022-09-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/calc/calc-embed.el (calc-override-minor-modes-map): * lisp/calc/calc-yank.el (calc-edit-mode-map): * lisp/calc/calc.el (calc-trail-mode-map): * lisp/cedet/semantic/mru-bookmark.el (semantic-mru-bookmark-mode-map): * lisp/cedet/semantic/util-modes.el (semantic-highlight-edits-mode-map) (semantic-show-unmatched-syntax-mode-map) (semantic-show-parser-state-mode-map) (semantic-stickyfunc-mode-map, semantic-highlight-func-mode-map): * lisp/cedet/srecode/srt-mode.el (srecode-template-mode-map): * lisp/gnus/gnus-art.el (gnus-prev-page-map, gnus-next-page-map): * lisp/gnus/gnus-search.el (gnus-search-minibuffer-map): * lisp/gnus/score-mode.el (gnus-score-mode-map): * lisp/gnus/smime.el (smime-mode-map): * lisp/indent.el (edit-tab-stops-map): * lisp/isearch.el (minibuffer-local-isearch-map): * lisp/printing.el (pr-interface-map): * lisp/progmodes/prog-mode.el (prog-mode-map): * lisp/progmodes/subword.el (subword-mode-map): * lisp/reveal.el (reveal-mode-map): * lisp/strokes.el (strokes-mode-map): * lisp/textmodes/flyspell.el (flyspell-mouse-map): * lisp/textmodes/less-css-mode.el (less-css-mode-map): * lisp/textmodes/remember.el (remember-mode-map) (remember-notes-mode-map): * lisp/wid-browse.el (widget-browse-mode-map): * lisp/wid-edit.el (widget-key-sequence-map): Prefer defvar-keymap in some easy-to-convert cases.
* 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 a list of text properties to search in symlink filenames in WdiredJuri Linkov2022-08-27
| | | | | | | | | | | * lisp/dired-aux.el (dired-isearch-search-filenames): Use text properties 'dired-filename' and 'dired-symlink-filename'. * lisp/dired.el (dired-font-lock-keywords): Add text property 'dired-symlink-filename' on symlinks. * lisp/isearch.el (isearch-search-fun-in-text-property): Support a list of text properties (bug#57293).
* * lisp/isearch.el (isearch-mode-help): Make compat alias obsolete.Stefan Kangas2022-08-09
|
* Wrap around the search on typing a letter (bug#56535)Juri Linkov2022-08-01
| | | | | | | * doc/emacs/search.texi (Repeat Isearch): Improve values no/no-ding. * lisp/isearch.el (isearch-search-and-update): Try to repeat the search on an error when isearch-wrap-pause is no/no-ding.
* * lisp/isearch.el (isearch-search-fun-in-noncontiguous-region): New function.Juri Linkov2022-07-08
| | | | | | | | | | | | (isearch-search-fun-in-text-property): Refactor body to 'search-within-boundaries', then call it (bug#14013). (search-within-boundaries): New function refactored from isearch-search-fun-in-text-property. * test/lisp/isearch-tests.el: Add tests for new search functions. (isearch--test-search-within-boundaries): New function. (isearch--test-search-fun-in-text-property) (isearch--test-search-fun-in-noncontiguous-region): New tests.
* Display the number of invisible matches for isearch-lazy-count (bug#40808)Juri Linkov2022-07-08
| | | | | | | | | | | | | | | | | | | | * lisp/isearch.el (lazy-count-invisible-format): New variable. (isearch-mode): Set isearch-lazy-count-invisible to nil. (isearch-lazy-count-format): Use lazy-count-invisible-format and isearch-lazy-count-invisible. (isearch-range-invisible): Handle the value 'can-be-opened' of 'search-invisible' and don't open overlays for it, just check if these overlays can be opened. (isearch-lazy-count-invisible): New variable. (isearch-lazy-highlight-new-loop): Set isearch-lazy-count-invisible to nil. (isearch-lazy-highlight-search): Let-bind search-invisible either to t for non-nil isearch-lazy-count, or to 'can-be-opened'. (isearch-lazy-highlight-match): Don't highlight matches intended to be counted only, not highlighted. (isearch-lazy-highlight-buffer-update): Separately count invisible matches by isearch-lazy-count-invisible. * lisp/info.el (Info-isearch-filter): Check if search-invisible is t.
* 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.
* * lisp/isearch.el (isearch-delete-char): Improve fix for bug#52248.Juri Linkov2022-06-28
| | | | | | When reaching the top of the stack where isearch-other-end is nil, still close unnecessary overlays for the previous position. (isearch-close-unnecessary-overlays): Rename arg BEG for consistency.
* Re-fix build warnings about subr-x defsubstsLars Ingebrigtsen2022-06-25
| | | | | | | | | | | | * lisp/term/haiku-win.el (require): * lisp/progmodes/elisp-mode.el (require): * lisp/isearch.el (require): Require subr-x at compile time, since these use defsubsts/macros from there. * lisp/emacs-lisp/subr-x.el (string-empty-p): Move from here... * lisp/simple.el (string-empty-p): ... to here. This is to help with a build problem where files.el is using the defsubst, but requiring subr-x.el at compile time leads to load errors.
* 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.
* Update args of isearch-search-fun-in-text-property (bug#14013)Juri Linkov2022-06-15
| | | | | * lisp/isearch.el (isearch-search-fun-in-text-property): Swap signature args. * lisp/dired-aux.el (dired-isearch-search-filenames): Update the call.
* ; * lisp/isearch.el (isearch-search-fun-in-text-property): Doc fix.Eli Zaretskii2022-06-12
|
* * lisp/isearch.el (isearch-search-fun-in-text-property): Handle ^/$ specially.Juri Linkov2022-06-12
| | | | | When the regexp contains ^ or $ then use a temporary buffer to find matches at the beginning/end of the region with the given text property (bug#14013).
* New function isearch-search-fun-in-text-property (bug#14013).Juri Linkov2022-06-10
| | | | | | | | * lisp/dired-aux.el (dired-isearch-search-filenames): Move most of the body to the new function isearch-search-fun-in-text-property. * lisp/isearch.el (isearch-search-fun-in-text-property): New function refactored from dired-isearch-search-filenames.
* Fix last change in minibuffer-lazy-highlight-setupAugusto Stoffel2022-05-18
| | | | | * lisp/isearch.el (minibuffer-lazy-highlight-setup): Apply advices buffer-locally.
* Make minibuffer lazy highlight setup buffer-local where appropriateAugusto Stoffel2022-05-15
| | | | | | | | * lisp/isearch.el (minibuffer-lazy-highlight-setup): Modify hooks buffer-locally, so that recursive minibuffers are not affected by the special behavior of lazy-highlight. Also make 'isearch-filter-predicate' buffer-local, so that isearch in the minibuffer is not affected by the region filter (bug#55110).
* Add char-folding of double quotes in isearch-fold-quotes-mode (bug#24510)Juri Linkov2022-05-06
| | | | | | | | * lisp/isearch.el (isearch-fold-quotes-mode): Add char-folding of double quotation marks. * test/lisp/subr-tests.el (test-local-set-state): Test values after setting state.
* Char-fold quotation characters in *info* and *Help*Lars Ingebrigtsen2022-05-06
| | | | | | | * lisp/info.el (Info-mode): * lisp/help-mode.el (help-mode): Use it. * lisp/isearch.el (isearch-fold-quotes-mode): New minor mode (bug#24510).
* Merge from origin/emacs-28Eli Zaretskii2022-04-28
|\ | | | | | | | | # Conflicts: # lisp/progmodes/xref.el
| * ; Fix last change in isearch.elEli Zaretskii2022-04-21
| | | | | | | | | | | | * lisp/isearch.el (isearch-occur): Move the recent addition to doc string from here... (isearch-query-replace-regexp): ...to here.
| * 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)
* | Make isearch respond to 'mouse-yank-at-point'Lars Ingebrigtsen2022-04-27
| | | | | | | | | | | | | | | | * doc/emacs/killing.texi (Secondary Selection): Document it. * lisp/isearch.el (isearch-mouse-2): Make isearch respond to mouse-yank-at-point (bug#7787). * lisp/mouse.el (mouse-yank-at-point): Mention it.
* | Make isearch-lax-whitespace a user optionLars Ingebrigtsen2022-04-18
| | | | | | | | | | * lisp/isearch.el (isearch-lax-whitespace): Make into a defcustom (bug#20351).
* | Rewrite the minibuffer lazy highlight featureAugusto Stoffel2022-04-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new API was discussed in bug#53126. It's more robust and easier to use in complex cases like that of 'query-replace'. * etc/NEWS: Amend the feature announcement * lisp/isearch.el (isearch-edit-string): Use new API. (minibuffer-lazy-highlight-transform, minibuffer-lazy-highlight--overlay, minibuffer-lazy-highlight--count, minibuffer-lazy-highlight--after-change, minibuffer-lazy-highlight--exit) Remove helper functions, which are now kept together with the lazy highlight configuration variables within a closure. (minibuffer-lazy-highlight-setup): This function now takes the lazy highlighting configuration variables as argument, and returns a closure that is intended to run as part of the minibuffer setup.
* | 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.
* | Always run 'isearch-lazy-count-update-hook' with point at matchAugusto Stoffel2022-03-27
| | | | | | | | | | | | * lisp/isearch.el (isearch-lazy-highlight-buffer-update): Run 'isearch-lazy-count-update-hook' outside of save-excursion, so point is at the current match.
* | Fix regression in isearch-yank-char-in-minibufferAugusto Stoffel2022-03-23
| | | | | | | | | | | | * lisp/isearch.el (isearch-yank-char-in-minibuffer): Select the original window in order to restore point. This is needed when minibuffer lazy highlight is in effect.
* | Add lazy highlight to 'isearch-edit-string'Augusto Stoffel2022-03-20
| | | | | | | | | | | | * lisp/isearch.el (isearch-edit-string): Activate lazy highlight and lazy count, provided 'isearch-lazy-highlight' respectively 'isearch-lazy-count' are non-nil.
* | Allow lazy highlight and match count while reading from minibufferAugusto Stoffel2022-03-20
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/isearch.el (minibuffer-lazy-highlight-setup): New function, can be added to 'minibuffer-setup-hook' to enable lazy highlight and count while reading from minibuffer. (minibuffer-lazy-count-format, minibuffer-lazy-highlight-transform, minibuffer-lazy-highlight--overlay, minibuffer-lazy-highlight--count, minibuffer-lazy-highlight--after-change, minibuffer-lazy-highlight--exit): Auxiliary variables and functions implementing the lazy highlight functionality while reading from minibuffer.
* | New hook, lazy-count-update-hookAugusto Stoffel2022-03-20
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/isearch.el (lazy-count-update-hook): New hook allowing to display the lazy count in special ways. (isearch-lazy-highlight-new-loop, isearch-lazy-highlight-buffer-update): Run `lazy-count-update-hook' at appropriate times. * lisp/comint.el (comint-history-isearch-setup, comint-history-isearch-end): Make sure no lazy count is displayed. * lisp/simple.el (minibuffer-history-isearch-setup): Make sure no lazy count is displayed.
* | Add a :distant-foreground to the lazy-highlight faceLars Ingebrigtsen2022-02-05
| | | | | | | | | | * lisp/isearch.el (lazy-highlight): Add a :distant-foreground colour so that the text is always legible (bug#16969).
* | * lisp/isearch.el: Put 'isearch-scroll' property on two new symbols.Juri Linkov2022-01-29
| | | | | | | | | | Put 'isearch-scroll' property on new commands 'recenter-other-window' and 'context-menu-open'.
* | Improve documentation of 'isearch-emoji-by-name'Eli Zaretskii2022-01-13
| | | | | | | | | | | | | | | | | | | | | | * lisp/isearch.el (isearch-menu-bar-map, isearch-emoji-by-name): Fix wording of documentation. * etc/NEWS: Fix wording of the 'isearch-emoji-by-name' entry. * doc/emacs/search.texi (Special Isearch): Fix wording of the documentation of 'isearch-emoji-by-name'; move it out of the enumeration that deals with non-ASCII characters in general.
* | Add isearch-emoji-by-nameDaniel Martín2022-01-12
| | | | | | | | | | | | | | | | | | | | * lisp/isearch.el (isearch-emoji-by-name): Add a new command to insert Emoji characters into incremental search strings. (Bug#52605) (isearch-mode-map): Bind it to 'C-x 8 e RET'. (isearch-menu-bar-map): Add it to the menu bar. * doc/emacs/search.texi (Special Isearch): Update the documentation to mention the new command. * etc/NEWS: And advertise it.
* | 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/isearch.el: Don't display "Pending" for lax and toggle commands.Juri Linkov2021-12-19
| | | | | | | | | | | | | | | | | | * lisp/isearch.el (isearch-message-prefix): Display "Pending" only when isearch-adjusted is 't' (bug#52356). (isearch-define-mode-toggle): Set isearch-adjusted to 'toggle' instead of 't'. (isearch-search-fun-default): Set isearch-adjusted to 'lax' instead of 't'.
* | * lisp/isearch.el (isearch-delete-char): Reopen hidden overlays (bug#52248).Juri Linkov2021-12-04
| | | | | | | | | | | | (isearch-filter-visible): Move text-property-not-all higher to not call isearch-range-invisible on inhibit-isearch text. Remove min/max since arguments are always in the right order.
* | Merge from origin/emacs-28Stefan Kangas2021-12-02
|\| | | | | | | | | | | | | | | | | | | f38dfa56a0 ; Update loaddefs files. b3d4b18507 ; make change-history-commit 334ff0232e * lisp/repeat.el: Use same logic for repeat-check-key and ... 8230a47ecc * lisp/help.el (help--analyze-key): Prefer posn-set-point ... # Conflicts: # lisp/ldefs-boot.el