diff options
| author | Eli Zaretskii | 2015-12-01 21:29:14 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2015-12-01 21:29:14 +0200 |
| commit | cef6c89175cd93be94a412ceb1b1e38381d209b8 (patch) | |
| tree | dc092d590c28a40589afda9517f930b7d8c129e7 | |
| parent | bdebeb77a001fc4d9ee8392829cd7bc6cd11d7d1 (diff) | |
| download | emacs-cef6c89175cd93be94a412ceb1b1e38381d209b8.tar.gz emacs-cef6c89175cd93be94a412ceb1b1e38381d209b8.zip | |
More accurate documentation of lax whitespace matching
* lisp/isearch.el (isearch-forward-word, isearch-forward-symbol)
(word-search-backward, word-search-forward)
(word-search-backward-lax, word-search-forward-lax): Mention in
doc strings that toggling lax whitespace matching has no effect on
these commands.
* doc/emacs/search.texi (Word Search, Symbol Search): Clarify that
lax whitespace matching has no effect on these commands.
| -rw-r--r-- | doc/emacs/search.texi | 10 | ||||
| -rw-r--r-- | lisp/isearch.el | 18 |
2 files changed, 18 insertions, 10 deletions
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index 81b4f87462e..d377dda0789 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi | |||
| @@ -610,8 +610,9 @@ so that the matching can proceed incrementally as you type. This | |||
| 610 | additional laxity does not apply to the lazy highlight | 610 | additional laxity does not apply to the lazy highlight |
| 611 | (@pxref{Incremental Search}), which always matches whole words. | 611 | (@pxref{Incremental Search}), which always matches whole words. |
| 612 | 612 | ||
| 613 | The word search commands don't perform character folding and cannot | 613 | The word search commands don't perform character folding, and |
| 614 | support lax whitespace matching (@pxref{Lax Search}). | 614 | toggling lax whitespace matching (@pxref{Lax Search, lax space |
| 615 | matching}) has no effect on them. | ||
| 615 | 616 | ||
| 616 | @kindex M-s M-w | 617 | @kindex M-s M-w |
| 617 | @findex eww-search-word | 618 | @findex eww-search-word |
| @@ -669,8 +670,9 @@ search. In nonincremental symbol searches, the beginning and end of | |||
| 669 | the search string are required to match the beginning and end of a | 670 | the search string are required to match the beginning and end of a |
| 670 | symbol, respectively. | 671 | symbol, respectively. |
| 671 | 672 | ||
| 672 | The symbol search commands don't perform character folding and | 673 | The symbol search commands don't perform character folding, and |
| 673 | cannot support lax whitespace matching (@pxref{Lax Search}). | 674 | toggling lax whitespace matching (@pxref{Lax Search, lax space |
| 675 | matching}) has no effect on them. | ||
| 674 | 676 | ||
| 675 | @node Regexp Search | 677 | @node Regexp Search |
| 676 | @section Regular Expression Search | 678 | @section Regular Expression Search |
diff --git a/lisp/isearch.el b/lisp/isearch.el index 229121d55b1..8c98d36f4aa 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el | |||
| @@ -785,7 +785,8 @@ With a prefix argument, do a regular string search instead. | |||
| 785 | Like ordinary incremental search except that your input is treated | 785 | Like ordinary incremental search except that your input is treated |
| 786 | as a sequence of words without regard to how the words are separated. | 786 | as a sequence of words without regard to how the words are separated. |
| 787 | See the command `isearch-forward' for more information. | 787 | See the command `isearch-forward' for more information. |
| 788 | This command does not support character folding or lax space matching." | 788 | This command does not support character folding, and lax space matching |
| 789 | has no effect on it." | ||
| 789 | (interactive "P\np") | 790 | (interactive "P\np") |
| 790 | (isearch-mode t nil nil (not no-recursive-edit) (null not-word))) | 791 | (isearch-mode t nil nil (not no-recursive-edit) (null not-word))) |
| 791 | 792 | ||
| @@ -795,7 +796,8 @@ The prefix argument is currently unused. | |||
| 795 | Like ordinary incremental search except that your input is treated | 796 | Like ordinary incremental search except that your input is treated |
| 796 | as a symbol surrounded by symbol boundary constructs \\_< and \\_>. | 797 | as a symbol surrounded by symbol boundary constructs \\_< and \\_>. |
| 797 | See the command `isearch-forward' for more information. | 798 | See the command `isearch-forward' for more information. |
| 798 | This command does not support character folding or lax space matching." | 799 | This command does not support character folding, and lax space matching |
| 800 | has no effect on it." | ||
| 799 | (interactive "P\np") | 801 | (interactive "P\np") |
| 800 | (isearch-mode t nil nil (not no-recursive-edit) 'isearch-symbol-regexp)) | 802 | (isearch-mode t nil nil (not no-recursive-edit) 'isearch-symbol-regexp)) |
| 801 | 803 | ||
| @@ -1625,7 +1627,8 @@ Optional fourth argument is repeat count--search for successive occurrences. | |||
| 1625 | Relies on the function `word-search-regexp' to convert a sequence | 1627 | Relies on the function `word-search-regexp' to convert a sequence |
| 1626 | of words in STRING to a regexp used to search words without regard | 1628 | of words in STRING to a regexp used to search words without regard |
| 1627 | to punctuation. | 1629 | to punctuation. |
| 1628 | This command does not support character folding or lax space matching." | 1630 | This command does not support character folding, and lax space matching |
| 1631 | has no effect on it." | ||
| 1629 | (interactive "sWord search backward: ") | 1632 | (interactive "sWord search backward: ") |
| 1630 | (re-search-backward (word-search-regexp string nil) bound noerror count)) | 1633 | (re-search-backward (word-search-regexp string nil) bound noerror count)) |
| 1631 | 1634 | ||
| @@ -1641,7 +1644,8 @@ Optional fourth argument is repeat count--search for successive occurrences. | |||
| 1641 | Relies on the function `word-search-regexp' to convert a sequence | 1644 | Relies on the function `word-search-regexp' to convert a sequence |
| 1642 | of words in STRING to a regexp used to search words without regard | 1645 | of words in STRING to a regexp used to search words without regard |
| 1643 | to punctuation. | 1646 | to punctuation. |
| 1644 | This command does not support character folding or lax space matching." | 1647 | This command does not support character folding, and lax space matching |
| 1648 | has no effect on it." | ||
| 1645 | (interactive "sWord search: ") | 1649 | (interactive "sWord search: ") |
| 1646 | (re-search-forward (word-search-regexp string nil) bound noerror count)) | 1650 | (re-search-forward (word-search-regexp string nil) bound noerror count)) |
| 1647 | 1651 | ||
| @@ -1661,7 +1665,8 @@ Optional fourth argument is repeat count--search for successive occurrences. | |||
| 1661 | Relies on the function `word-search-regexp' to convert a sequence | 1665 | Relies on the function `word-search-regexp' to convert a sequence |
| 1662 | of words in STRING to a regexp used to search words without regard | 1666 | of words in STRING to a regexp used to search words without regard |
| 1663 | to punctuation. | 1667 | to punctuation. |
| 1664 | This command does not support character folding or lax space matching." | 1668 | This command does not support character folding, and lax space matching |
| 1669 | has no effect on it." | ||
| 1665 | (interactive "sWord search backward: ") | 1670 | (interactive "sWord search backward: ") |
| 1666 | (re-search-backward (word-search-regexp string t) bound noerror count)) | 1671 | (re-search-backward (word-search-regexp string t) bound noerror count)) |
| 1667 | 1672 | ||
| @@ -1681,7 +1686,8 @@ Optional fourth argument is repeat count--search for successive occurrences. | |||
| 1681 | Relies on the function `word-search-regexp' to convert a sequence | 1686 | Relies on the function `word-search-regexp' to convert a sequence |
| 1682 | of words in STRING to a regexp used to search words without regard | 1687 | of words in STRING to a regexp used to search words without regard |
| 1683 | to punctuation. | 1688 | to punctuation. |
| 1684 | This command does not support character folding or lax space matching." | 1689 | This command does not support character folding, and lax space matching |
| 1690 | has no effect on it." | ||
| 1685 | (interactive "sWord search: ") | 1691 | (interactive "sWord search: ") |
| 1686 | (re-search-forward (word-search-regexp string t) bound noerror count)) | 1692 | (re-search-forward (word-search-regexp string t) bound noerror count)) |
| 1687 | 1693 | ||