diff options
| author | Richard M. Stallman | 2005-08-11 19:51:56 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-08-11 19:51:56 +0000 |
| commit | c118d09e26efd5263892492fe168020f8cea094f (patch) | |
| tree | 505bce0af537b745475cd0f0af9103f6d923c4fa | |
| parent | b95a0c80ae0397d4487058bd01d5aa1da87c4f4c (diff) | |
| download | emacs-c118d09e26efd5263892492fe168020f8cea094f.tar.gz emacs-c118d09e26efd5263892492fe168020f8cea094f.zip | |
(Regexp Backslash, Regexp Example): New nodes split out of Regexps.
| -rw-r--r-- | lispref/ChangeLog | 13 | ||||
| -rw-r--r-- | man/search.texi | 50 |
2 files changed, 33 insertions, 30 deletions
diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 0e28b7b2168..600da8aaf5f 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog | |||
| @@ -1,3 +1,16 @@ | |||
| 1 | 2005-08-11 Richard M. Stallman <rms@gnu.org> | ||
| 2 | |||
| 3 | * tips.texi (Key Binding Conventions, Programming Tips, Warning Tips): | ||
| 4 | New nodes split out of Coding Conventions. | ||
| 5 | |||
| 6 | * searching.texi (Regular Expressions): Document re-builder. | ||
| 7 | |||
| 8 | * os.texi (Time Parsing): New node split out of Time Conversion. | ||
| 9 | |||
| 10 | * processes.texi (Misc Network, Network Feature Testing) | ||
| 11 | (Network Options, Make Network): New nodes split out of | ||
| 12 | Low-Level Network. | ||
| 13 | |||
| 1 | 2005-08-09 Richard M. Stallman <rms@gnu.org> | 14 | 2005-08-09 Richard M. Stallman <rms@gnu.org> |
| 2 | 15 | ||
| 3 | * frames.texi (Geometry): New node, split from Size and Position. | 16 | * frames.texi (Geometry): New node, split from Size and Position. |
diff --git a/man/search.texi b/man/search.texi index a849e7dc1f5..f362e8e769e 100644 --- a/man/search.texi +++ b/man/search.texi | |||
| @@ -24,6 +24,8 @@ asks interactively which occurrences to replace. | |||
| 24 | * Word Search:: Search for sequence of words. | 24 | * Word Search:: Search for sequence of words. |
| 25 | * Regexp Search:: Search for match for a regexp. | 25 | * Regexp Search:: Search for match for a regexp. |
| 26 | * Regexps:: Syntax of regular expressions. | 26 | * Regexps:: Syntax of regular expressions. |
| 27 | * Regexp Backslash:: Regular expression constructs starting with `\'. | ||
| 28 | * Regexp Example:: A complex regular expression explained. | ||
| 27 | * Search Case:: To ignore case while searching, or not. | 29 | * Search Case:: To ignore case while searching, or not. |
| 28 | * Replace:: Search, and replace some or all matches. | 30 | * Replace:: Search, and replace some or all matches. |
| 29 | * Other Repeating Search:: Operating on all matches for some regexp. | 31 | * Other Repeating Search:: Operating on all matches for some regexp. |
| @@ -669,20 +671,26 @@ has two functions: it quotes the special characters (including | |||
| 669 | Because @samp{\} quotes special characters, @samp{\$} is a regular | 671 | Because @samp{\} quotes special characters, @samp{\$} is a regular |
| 670 | expression that matches only @samp{$}, and @samp{\[} is a regular | 672 | expression that matches only @samp{$}, and @samp{\[} is a regular |
| 671 | expression that matches only @samp{[}, and so on. | 673 | expression that matches only @samp{[}, and so on. |
| 674 | |||
| 675 | See the following section for the special constructs that begin | ||
| 676 | with @samp{\}. | ||
| 672 | @end table | 677 | @end table |
| 673 | 678 | ||
| 674 | Note: for historical compatibility, special characters are treated as | 679 | Note: for historical compatibility, special characters are treated as |
| 675 | ordinary ones if they are in contexts where their special meanings make no | 680 | ordinary ones if they are in contexts where their special meanings make no |
| 676 | sense. For example, @samp{*foo} treats @samp{*} as ordinary since there is | 681 | sense. For example, @samp{*foo} treats @samp{*} as ordinary since there is |
| 677 | no preceding expression on which the @samp{*} can act. It is poor practice | 682 | no preceding expression on which the @samp{*} can act. It is poor practice |
| 678 | to depend on this behavior; it is better to quote the special character anyway, | 683 | to depend on this behavior; it is better to quote the special character anyway, |
| 679 | regardless of where it appears.@refill | 684 | regardless of where it appears. |
| 685 | |||
| 686 | @node Regexp Backslash | ||
| 687 | @section Backslash in Regular Expressions | ||
| 680 | 688 | ||
| 681 | For the most part, @samp{\} followed by any character matches only that | 689 | For the most part, @samp{\} followed by any character matches only |
| 682 | character. However, there are several exceptions: two-character | 690 | that character. However, there are several exceptions: two-character |
| 683 | sequences starting with @samp{\} that have special meanings. The second | 691 | sequences starting with @samp{\} that have special meanings. The |
| 684 | character in the sequence is always an ordinary character when used on | 692 | second character in the sequence is always an ordinary character when |
| 685 | its own. Here is a table of @samp{\} constructs. | 693 | used on its own. Here is a table of @samp{\} constructs. |
| 686 | 694 | ||
| 687 | @table @kbd | 695 | @table @kbd |
| 688 | @item \| | 696 | @item \| |
| @@ -836,8 +844,11 @@ matches any character that does @emph{not} belong to category | |||
| 836 | The constructs that pertain to words and syntax are controlled by the | 844 | The constructs that pertain to words and syntax are controlled by the |
| 837 | setting of the syntax table (@pxref{Syntax}). | 845 | setting of the syntax table (@pxref{Syntax}). |
| 838 | 846 | ||
| 839 | Here is a complicated regexp. It is a simplified version of the | 847 | @node Regexp Example |
| 840 | regexp that Emacs uses, by default, to recognize the end of a sentence | 848 | @section Regular Expression Example |
| 849 | |||
| 850 | Here is a complicated regexp---a simplified version of the regexp | ||
| 851 | that Emacs uses, by default, to recognize the end of a sentence | ||
| 841 | together with any whitespace that follows. We show its Lisp syntax to | 852 | together with any whitespace that follows. We show its Lisp syntax to |
| 842 | distinguish the spaces from the tab characters. In Lisp syntax, the | 853 | distinguish the spaces from the tab characters. In Lisp syntax, the |
| 843 | string constant begins and ends with a double-quote. @samp{\"} stands | 854 | string constant begins and ends with a double-quote. @samp{\"} stands |
| @@ -864,27 +875,6 @@ for Lisp syntax. In commands that use ordinary minibuffer input to | |||
| 864 | read a regexp, you would quote the @kbd{C-j} by preceding it with a | 875 | read a regexp, you would quote the @kbd{C-j} by preceding it with a |
| 865 | @kbd{C-q} to prevent @kbd{C-j} from exiting the minibuffer. | 876 | @kbd{C-q} to prevent @kbd{C-j} from exiting the minibuffer. |
| 866 | 877 | ||
| 867 | @ignore | ||
| 868 | @c I commented this out because it is missing vital information | ||
| 869 | @c and therefore useless. For instance, what do you do to *use* the | ||
| 870 | @c regular expression when it is finished? What jobs is this good for? | ||
| 871 | @c -- rms | ||
| 872 | |||
| 873 | @findex re-builder | ||
| 874 | @cindex authoring regular expressions | ||
| 875 | For convenient interactive development of regular expressions, you | ||
| 876 | can use the @kbd{M-x re-builder} command. It provides a convenient | ||
| 877 | interface for creating regular expressions, by giving immediate visual | ||
| 878 | feedback. The buffer from which @code{re-builder} was invoked becomes | ||
| 879 | the target for the regexp editor, which pops in a separate window. At | ||
| 880 | all times, all the matches in the target buffer for the current | ||
| 881 | regular expression are highlighted. Each parenthesized sub-expression | ||
| 882 | of the regexp is shown in a distinct face, which makes it easier to | ||
| 883 | verify even very complex regexps. (On displays that don't support | ||
| 884 | colors, Emacs blinks the cursor around the matched text, as it does | ||
| 885 | for matching parens.) | ||
| 886 | @end ignore | ||
| 887 | |||
| 888 | @node Search Case | 878 | @node Search Case |
| 889 | @section Searching and Case | 879 | @section Searching and Case |
| 890 | 880 | ||