diff options
| -rw-r--r-- | doc/emacs/search.texi | 12 | ||||
| -rw-r--r-- | doc/lispref/searching.texi | 74 | ||||
| -rw-r--r-- | lisp/emacs-lisp/lisp-mode.el | 2 | ||||
| -rw-r--r-- | lisp/textmodes/picture.el | 2 |
4 files changed, 45 insertions, 45 deletions
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index 45378d95f65..2a816221235 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi | |||
| @@ -950,8 +950,8 @@ features used mainly in Lisp programs. | |||
| 950 | @dfn{special constructs} and the rest are @dfn{ordinary}. An ordinary | 950 | @dfn{special constructs} and the rest are @dfn{ordinary}. An ordinary |
| 951 | character matches that same character and nothing else. The special | 951 | character matches that same character and nothing else. The special |
| 952 | characters are @samp{$^.*+?[\}. The character @samp{]} is special if | 952 | characters are @samp{$^.*+?[\}. The character @samp{]} is special if |
| 953 | it ends a character alternative (see below). The character @samp{-} | 953 | it ends a bracket expression (see below). The character @samp{-} |
| 954 | is special inside a character alternative. Any other character | 954 | is special inside a bracket expression. Any other character |
| 955 | appearing in a regular expression is ordinary, unless a @samp{\} | 955 | appearing in a regular expression is ordinary, unless a @samp{\} |
| 956 | precedes it. (When you use regular expressions in a Lisp program, | 956 | precedes it. (When you use regular expressions in a Lisp program, |
| 957 | each @samp{\} must be doubled, see the example near the end of this | 957 | each @samp{\} must be doubled, see the example near the end of this |
| @@ -1033,11 +1033,11 @@ you search for @samp{a.*?$} against the text @samp{abbab} followed by | |||
| 1033 | a newline, it matches the whole string. Since it @emph{can} match | 1033 | a newline, it matches the whole string. Since it @emph{can} match |
| 1034 | starting at the first @samp{a}, it does. | 1034 | starting at the first @samp{a}, it does. |
| 1035 | 1035 | ||
| 1036 | @cindex bracket expression | ||
| 1036 | @cindex set of alternative characters, in regular expressions | 1037 | @cindex set of alternative characters, in regular expressions |
| 1037 | @cindex character set, in regular expressions | 1038 | @cindex character set, in regular expressions |
| 1038 | @item @kbd{[ @dots{} ]} | 1039 | @item @kbd{[ @dots{} ]} |
| 1039 | is a @dfn{set of alternative characters}, or a @dfn{character set}, | 1040 | is a @dfn{bracket expression}, which matches one of a set of characters. |
| 1040 | beginning with @samp{[} and terminated by @samp{]}. | ||
| 1041 | 1041 | ||
| 1042 | In the simplest case, the characters between the two brackets are what | 1042 | In the simplest case, the characters between the two brackets are what |
| 1043 | this set can match. Thus, @samp{[ad]} matches either one @samp{a} or | 1043 | this set can match. Thus, @samp{[ad]} matches either one @samp{a} or |
| @@ -1057,7 +1057,7 @@ Greek letters. | |||
| 1057 | @cindex character classes, in regular expressions | 1057 | @cindex character classes, in regular expressions |
| 1058 | You can also include certain special @dfn{character classes} in a | 1058 | You can also include certain special @dfn{character classes} in a |
| 1059 | character set. A @samp{[:} and balancing @samp{:]} enclose a | 1059 | character set. A @samp{[:} and balancing @samp{:]} enclose a |
| 1060 | character class inside a set of alternative characters. For instance, | 1060 | character class inside a bracket expression. For instance, |
| 1061 | @samp{[[:alnum:]]} matches any letter or digit. @xref{Char Classes,,, | 1061 | @samp{[[:alnum:]]} matches any letter or digit. @xref{Char Classes,,, |
| 1062 | elisp, The Emacs Lisp Reference Manual}, for a list of character | 1062 | elisp, The Emacs Lisp Reference Manual}, for a list of character |
| 1063 | classes. | 1063 | classes. |
| @@ -1125,7 +1125,7 @@ no preceding expression on which the @samp{*} can act. It is poor practice | |||
| 1125 | to depend on this behavior; it is better to quote the special character anyway, | 1125 | to depend on this behavior; it is better to quote the special character anyway, |
| 1126 | regardless of where it appears. | 1126 | regardless of where it appears. |
| 1127 | 1127 | ||
| 1128 | As a @samp{\} is not special inside a set of alternative characters, it can | 1128 | As a @samp{\} is not special inside a bracket expression, it can |
| 1129 | never remove the special meaning of @samp{-}, @samp{^} or @samp{]}. | 1129 | never remove the special meaning of @samp{-}, @samp{^} or @samp{]}. |
| 1130 | You should not quote these characters when they have no special | 1130 | You should not quote these characters when they have no special |
| 1131 | meaning. This would not clarify anything, since backslashes | 1131 | meaning. This would not clarify anything, since backslashes |
diff --git a/doc/lispref/searching.texi b/doc/lispref/searching.texi index 608abae762c..28230cea643 100644 --- a/doc/lispref/searching.texi +++ b/doc/lispref/searching.texi | |||
| @@ -278,10 +278,10 @@ character is a simple regular expression that matches that character | |||
| 278 | and nothing else. The special characters are @samp{.}, @samp{*}, | 278 | and nothing else. The special characters are @samp{.}, @samp{*}, |
| 279 | @samp{+}, @samp{?}, @samp{[}, @samp{^}, @samp{$}, and @samp{\}; no new | 279 | @samp{+}, @samp{?}, @samp{[}, @samp{^}, @samp{$}, and @samp{\}; no new |
| 280 | special characters will be defined in the future. The character | 280 | special characters will be defined in the future. The character |
| 281 | @samp{]} is special if it ends a character alternative (see later). | 281 | @samp{]} is special if it ends a bracket expression (see later). |
| 282 | The character @samp{-} is special inside a character alternative. A | 282 | The character @samp{-} is special inside a bracket expression. A |
| 283 | @samp{[:} and balancing @samp{:]} enclose a character class inside a | 283 | @samp{[:} and balancing @samp{:]} enclose a character class inside a |
| 284 | character alternative. Any other character appearing in a regular | 284 | bracket expression. Any other character appearing in a regular |
| 285 | expression is ordinary, unless a @samp{\} precedes it. | 285 | expression is ordinary, unless a @samp{\} precedes it. |
| 286 | 286 | ||
| 287 | For example, @samp{f} is not a special character, so it is ordinary, and | 287 | For example, @samp{f} is not a special character, so it is ordinary, and |
| @@ -374,19 +374,19 @@ expression @samp{c[ad]*?a}, applied to that same string, matches just | |||
| 374 | permits the whole expression to match is @samp{d}.) | 374 | permits the whole expression to match is @samp{d}.) |
| 375 | 375 | ||
| 376 | @item @samp{[ @dots{} ]} | 376 | @item @samp{[ @dots{} ]} |
| 377 | @cindex character alternative (in regexp) | 377 | @cindex bracket expression (in regexp) |
| 378 | @cindex @samp{[} in regexp | 378 | @cindex @samp{[} in regexp |
| 379 | @cindex @samp{]} in regexp | 379 | @cindex @samp{]} in regexp |
| 380 | is a @dfn{character alternative}, which begins with @samp{[} and is | 380 | is a @dfn{bracket expression}, which begins with @samp{[} and is |
| 381 | terminated by @samp{]}. In the simplest case, the characters between | 381 | terminated by @samp{]}. In the simplest case, the characters between |
| 382 | the two brackets are what this character alternative can match. | 382 | the two brackets are what this bracket expression can match. |
| 383 | 383 | ||
| 384 | Thus, @samp{[ad]} matches either one @samp{a} or one @samp{d}, and | 384 | Thus, @samp{[ad]} matches either one @samp{a} or one @samp{d}, and |
| 385 | @samp{[ad]*} matches any string composed of just @samp{a}s and @samp{d}s | 385 | @samp{[ad]*} matches any string composed of just @samp{a}s and @samp{d}s |
| 386 | (including the empty string). It follows that @samp{c[ad]*r} | 386 | (including the empty string). It follows that @samp{c[ad]*r} |
| 387 | matches @samp{cr}, @samp{car}, @samp{cdr}, @samp{caddaar}, etc. | 387 | matches @samp{cr}, @samp{car}, @samp{cdr}, @samp{caddaar}, etc. |
| 388 | 388 | ||
| 389 | You can also include character ranges in a character alternative, by | 389 | You can also include character ranges in a bracket expression, by |
| 390 | writing the starting and ending characters with a @samp{-} between them. | 390 | writing the starting and ending characters with a @samp{-} between them. |
| 391 | Thus, @samp{[a-z]} matches any lower-case @acronym{ASCII} letter. | 391 | Thus, @samp{[a-z]} matches any lower-case @acronym{ASCII} letter. |
| 392 | Ranges may be intermixed freely with individual characters, as in | 392 | Ranges may be intermixed freely with individual characters, as in |
| @@ -395,7 +395,7 @@ or @samp{$}, @samp{%} or period. However, the ending character of one | |||
| 395 | range should not be the starting point of another one; for example, | 395 | range should not be the starting point of another one; for example, |
| 396 | @samp{[a-m-z]} should be avoided. | 396 | @samp{[a-m-z]} should be avoided. |
| 397 | 397 | ||
| 398 | A character alternative can also specify named character classes | 398 | A bracket expression can also specify named character classes |
| 399 | (@pxref{Char Classes}). For example, @samp{[[:ascii:]]} matches any | 399 | (@pxref{Char Classes}). For example, @samp{[[:ascii:]]} matches any |
| 400 | @acronym{ASCII} character. Using a character class is equivalent to | 400 | @acronym{ASCII} character. Using a character class is equivalent to |
| 401 | mentioning each of the characters in that class; but the latter is not | 401 | mentioning each of the characters in that class; but the latter is not |
| @@ -404,9 +404,9 @@ different characters. A character class should not appear as the | |||
| 404 | lower or upper bound of a range. | 404 | lower or upper bound of a range. |
| 405 | 405 | ||
| 406 | The usual regexp special characters are not special inside a | 406 | The usual regexp special characters are not special inside a |
| 407 | character alternative. A completely different set of characters is | 407 | bracket expression. A completely different set of characters is |
| 408 | special: @samp{]}, @samp{-} and @samp{^}. | 408 | special: @samp{]}, @samp{-} and @samp{^}. |
| 409 | To include @samp{]} in a character alternative, put it at the | 409 | To include @samp{]} in a bracket expression, put it at the |
| 410 | beginning. To include @samp{^}, put it anywhere but at the beginning. | 410 | beginning. To include @samp{^}, put it anywhere but at the beginning. |
| 411 | To include @samp{-}, put it at the end. Thus, @samp{[]^-]} matches | 411 | To include @samp{-}, put it at the end. Thus, @samp{[]^-]} matches |
| 412 | all three of these special characters. You cannot use @samp{\} to | 412 | all three of these special characters. You cannot use @samp{\} to |
| @@ -444,7 +444,7 @@ characters and raw 8-bit bytes, but not non-ASCII characters. This | |||
| 444 | feature is intended for searching text in unibyte buffers and strings. | 444 | feature is intended for searching text in unibyte buffers and strings. |
| 445 | @end enumerate | 445 | @end enumerate |
| 446 | 446 | ||
| 447 | Some kinds of character alternatives are not the best style even | 447 | Some kinds of bracket expressions are not the best style even |
| 448 | though they have a well-defined meaning in Emacs. They include: | 448 | though they have a well-defined meaning in Emacs. They include: |
| 449 | 449 | ||
| 450 | @enumerate | 450 | @enumerate |
| @@ -458,7 +458,7 @@ Unicode character escapes can help here; for example, for most programmers | |||
| 458 | @samp{[ก-ฺ฿-๛]} is less clear than @samp{[\u0E01-\u0E3A\u0E3F-\u0E5B]}. | 458 | @samp{[ก-ฺ฿-๛]} is less clear than @samp{[\u0E01-\u0E3A\u0E3F-\u0E5B]}. |
| 459 | 459 | ||
| 460 | @item | 460 | @item |
| 461 | Although a character alternative can include duplicates, it is better | 461 | Although a bracket expression can include duplicates, it is better |
| 462 | style to avoid them. For example, @samp{[XYa-yYb-zX]} is less clear | 462 | style to avoid them. For example, @samp{[XYa-yYb-zX]} is less clear |
| 463 | than @samp{[XYa-z]}. | 463 | than @samp{[XYa-z]}. |
| 464 | 464 | ||
| @@ -469,30 +469,30 @@ is simpler to list the characters. For example, | |||
| 469 | than @samp{[ij]}, and @samp{[i-k]} is less clear than @samp{[ijk]}. | 469 | than @samp{[ij]}, and @samp{[i-k]} is less clear than @samp{[ijk]}. |
| 470 | 470 | ||
| 471 | @item | 471 | @item |
| 472 | Although a @samp{-} can appear at the beginning of a character | 472 | Although a @samp{-} can appear at the beginning of a bracket |
| 473 | alternative or as the upper bound of a range, it is better style to | 473 | expression or as the upper bound of a range, it is better style to |
| 474 | put @samp{-} by itself at the end of a character alternative. For | 474 | put @samp{-} by itself at the end of a bracket expression. For |
| 475 | example, although @samp{[-a-z]} is valid, @samp{[a-z-]} is better | 475 | example, although @samp{[-a-z]} is valid, @samp{[a-z-]} is better |
| 476 | style; and although @samp{[*--]} is valid, @samp{[*+,-]} is clearer. | 476 | style; and although @samp{[*--]} is valid, @samp{[*+,-]} is clearer. |
| 477 | @end enumerate | 477 | @end enumerate |
| 478 | 478 | ||
| 479 | @item @samp{[^ @dots{} ]} | 479 | @item @samp{[^ @dots{} ]} |
| 480 | @cindex @samp{^} in regexp | 480 | @cindex @samp{^} in regexp |
| 481 | @samp{[^} begins a @dfn{complemented character alternative}. This | 481 | @samp{[^} begins a @dfn{complemented bracket expression}. This |
| 482 | matches any character except the ones specified. Thus, | 482 | matches any character except the ones specified. Thus, |
| 483 | @samp{[^a-z0-9A-Z]} matches all characters @emph{except} ASCII letters and | 483 | @samp{[^a-z0-9A-Z]} matches all characters @emph{except} ASCII letters and |
| 484 | digits. | 484 | digits. |
| 485 | 485 | ||
| 486 | @samp{^} is not special in a character alternative unless it is the first | 486 | @samp{^} is not special in a bracket expression unless it is the first |
| 487 | character. The character following the @samp{^} is treated as if it | 487 | character. The character following the @samp{^} is treated as if it |
| 488 | were first (in other words, @samp{-} and @samp{]} are not special there). | 488 | were first (in other words, @samp{-} and @samp{]} are not special there). |
| 489 | 489 | ||
| 490 | A complemented character alternative can match a newline, unless newline is | 490 | A complemented bracket expression can match a newline, unless newline is |
| 491 | mentioned as one of the characters not to match. This is in contrast to | 491 | mentioned as one of the characters not to match. This is in contrast to |
| 492 | the handling of regexps in programs such as @code{grep}. | 492 | the handling of regexps in programs such as @code{grep}. |
| 493 | 493 | ||
| 494 | You can specify named character classes, just like in character | 494 | You can specify named character classes, just like in bracket |
| 495 | alternatives. For instance, @samp{[^[:ascii:]]} matches any | 495 | expressions. For instance, @samp{[^[:ascii:]]} matches any |
| 496 | non-@acronym{ASCII} character. @xref{Char Classes}. | 496 | non-@acronym{ASCII} character. @xref{Char Classes}. |
| 497 | 497 | ||
| 498 | @item @samp{^} | 498 | @item @samp{^} |
| @@ -556,7 +556,7 @@ that matches only empty strings, as Emacs has bugs in this area. | |||
| 556 | For example, it is unwise to use @samp{\b*}, which can be omitted | 556 | For example, it is unwise to use @samp{\b*}, which can be omitted |
| 557 | without changing the documented meaning of the regular expression. | 557 | without changing the documented meaning of the regular expression. |
| 558 | 558 | ||
| 559 | As a @samp{\} is not special inside a character alternative, it can | 559 | As a @samp{\} is not special inside a bracket expression, it can |
| 560 | never remove the special meaning of @samp{-}, @samp{^} or @samp{]}. | 560 | never remove the special meaning of @samp{-}, @samp{^} or @samp{]}. |
| 561 | You should not quote these characters when they have no special | 561 | You should not quote these characters when they have no special |
| 562 | meaning. This would not clarify anything, since backslashes | 562 | meaning. This would not clarify anything, since backslashes |
| @@ -565,23 +565,23 @@ special meaning, as in @samp{[^\]} (@code{"[^\\]"} for Lisp string | |||
| 565 | syntax), which matches any single character except a backslash. | 565 | syntax), which matches any single character except a backslash. |
| 566 | 566 | ||
| 567 | In practice, most @samp{]} that occur in regular expressions close a | 567 | In practice, most @samp{]} that occur in regular expressions close a |
| 568 | character alternative and hence are special. However, occasionally a | 568 | bracket expression and hence are special. However, occasionally a |
| 569 | regular expression may try to match a complex pattern of literal | 569 | regular expression may try to match a complex pattern of literal |
| 570 | @samp{[} and @samp{]}. In such situations, it sometimes may be | 570 | @samp{[} and @samp{]}. In such situations, it sometimes may be |
| 571 | necessary to carefully parse the regexp from the start to determine | 571 | necessary to carefully parse the regexp from the start to determine |
| 572 | which square brackets enclose a character alternative. For example, | 572 | which square brackets enclose a bracket expression. For example, |
| 573 | @samp{[^][]]} consists of the complemented character alternative | 573 | @samp{[^][]]} consists of the complemented bracket expression |
| 574 | @samp{[^][]} (which matches any single character that is not a square | 574 | @samp{[^][]} (which matches any single character that is not a square |
| 575 | bracket), followed by a literal @samp{]}. | 575 | bracket), followed by a literal @samp{]}. |
| 576 | 576 | ||
| 577 | The exact rules are that at the beginning of a regexp, @samp{[} is | 577 | The exact rules are that at the beginning of a regexp, @samp{[} is |
| 578 | special and @samp{]} not. This lasts until the first unquoted | 578 | special and @samp{]} not. This lasts until the first unquoted |
| 579 | @samp{[}, after which we are in a character alternative; @samp{[} is | 579 | @samp{[}, after which we are in a bracket expression; @samp{[} is |
| 580 | no longer special (except when it starts a character class) but @samp{]} | 580 | no longer special (except when it starts a character class) but @samp{]} |
| 581 | is special, unless it immediately follows the special @samp{[} or that | 581 | is special, unless it immediately follows the special @samp{[} or that |
| 582 | @samp{[} followed by a @samp{^}. This lasts until the next special | 582 | @samp{[} followed by a @samp{^}. This lasts until the next special |
| 583 | @samp{]} that does not end a character class. This ends the character | 583 | @samp{]} that does not end a character class. This ends the bracket |
| 584 | alternative and restores the ordinary syntax of regular expressions; | 584 | expression and restores the ordinary syntax of regular expressions; |
| 585 | an unquoted @samp{[} is special again and a @samp{]} not. | 585 | an unquoted @samp{[} is special again and a @samp{]} not. |
| 586 | 586 | ||
| 587 | @node Char Classes | 587 | @node Char Classes |
| @@ -592,8 +592,8 @@ an unquoted @samp{[} is special again and a @samp{]} not. | |||
| 592 | @cindex alpha character class, regexp | 592 | @cindex alpha character class, regexp |
| 593 | @cindex xdigit character class, regexp | 593 | @cindex xdigit character class, regexp |
| 594 | 594 | ||
| 595 | Below is a table of the classes you can use in a character | 595 | Below is a table of the classes you can use in a bracket |
| 596 | alternative, and what they mean. Note that the @samp{[} and @samp{]} | 596 | expression, and what they mean. Note that the @samp{[} and @samp{]} |
| 597 | characters that enclose the class name are part of the name, so a | 597 | characters that enclose the class name are part of the name, so a |
| 598 | regular expression using these classes needs one more pair of | 598 | regular expression using these classes needs one more pair of |
| 599 | brackets. For example, a regular expression matching a sequence of | 599 | brackets. For example, a regular expression matching a sequence of |
| @@ -920,7 +920,7 @@ with a symbol-constituent character. | |||
| 920 | 920 | ||
| 921 | @kindex invalid-regexp | 921 | @kindex invalid-regexp |
| 922 | Not every string is a valid regular expression. For example, a string | 922 | Not every string is a valid regular expression. For example, a string |
| 923 | that ends inside a character alternative without a terminating @samp{]} | 923 | that ends inside a bracket expression without a terminating @samp{]} |
| 924 | is invalid, and so is a string that ends with a single @samp{\}. If | 924 | is invalid, and so is a string that ends with a single @samp{\}. If |
| 925 | an invalid regular expression is passed to any of the search functions, | 925 | an invalid regular expression is passed to any of the search functions, |
| 926 | an @code{invalid-regexp} error is signaled. | 926 | an @code{invalid-regexp} error is signaled. |
| @@ -957,7 +957,7 @@ deciphered as follows: | |||
| 957 | 957 | ||
| 958 | @table @code | 958 | @table @code |
| 959 | @item [.?!] | 959 | @item [.?!] |
| 960 | The first part of the pattern is a character alternative that matches | 960 | The first part of the pattern is a bracket expression that matches |
| 961 | any one of three characters: period, question mark, and exclamation | 961 | any one of three characters: period, question mark, and exclamation |
| 962 | mark. The match must begin with one of these three characters. (This | 962 | mark. The match must begin with one of these three characters. (This |
| 963 | is one point where the new default regexp used by Emacs differs from | 963 | is one point where the new default regexp used by Emacs differs from |
| @@ -969,7 +969,7 @@ The second part of the pattern matches any closing braces and quotation | |||
| 969 | marks, zero or more of them, that may follow the period, question mark | 969 | marks, zero or more of them, that may follow the period, question mark |
| 970 | or exclamation mark. The @code{\"} is Lisp syntax for a double-quote in | 970 | or exclamation mark. The @code{\"} is Lisp syntax for a double-quote in |
| 971 | a string. The @samp{*} at the end indicates that the immediately | 971 | a string. The @samp{*} at the end indicates that the immediately |
| 972 | preceding regular expression (a character alternative, in this case) may be | 972 | preceding regular expression (a bracket expression, in this case) may be |
| 973 | repeated zero or more times. | 973 | repeated zero or more times. |
| 974 | 974 | ||
| 975 | @item \\($\\|@ $\\|\t\\|@ @ \\) | 975 | @item \\($\\|@ $\\|\t\\|@ @ \\) |
| @@ -1920,7 +1920,7 @@ attempts. Other zero-width assertions may also bring benefits by | |||
| 1920 | causing a match to fail early. | 1920 | causing a match to fail early. |
| 1921 | 1921 | ||
| 1922 | @item | 1922 | @item |
| 1923 | Avoid or-patterns in favor of character alternatives: write | 1923 | Avoid or-patterns in favor of bracket expressions: write |
| 1924 | @samp{[ab]} instead of @samp{a\|b}. Recall that @samp{\s-} and @samp{\sw} | 1924 | @samp{[ab]} instead of @samp{a\|b}. Recall that @samp{\s-} and @samp{\sw} |
| 1925 | are equivalent to @samp{[[:space:]]} and @samp{[[:word:]]}, respectively. | 1925 | are equivalent to @samp{[[:space:]]} and @samp{[[:word:]]}, respectively. |
| 1926 | 1926 | ||
| @@ -3012,7 +3012,7 @@ but does not support all the Emacs escapes. | |||
| 3012 | @item | 3012 | @item |
| 3013 | In POSIX BREs, it is an implementation option whether @samp{^} is special | 3013 | In POSIX BREs, it is an implementation option whether @samp{^} is special |
| 3014 | after @samp{\(}; GNU @command{grep} treats it like Emacs does. | 3014 | after @samp{\(}; GNU @command{grep} treats it like Emacs does. |
| 3015 | In POSIX EREs, @samp{^} is always special outside of character alternatives, | 3015 | In POSIX EREs, @samp{^} is always special outside of bracket expressions, |
| 3016 | which means the ERE @samp{x^} never matches. | 3016 | which means the ERE @samp{x^} never matches. |
| 3017 | In Emacs regular expressions, @samp{^} is special only at the | 3017 | In Emacs regular expressions, @samp{^} is special only at the |
| 3018 | beginning of the regular expression, or after @samp{\(}, @samp{\(?:} | 3018 | beginning of the regular expression, or after @samp{\(}, @samp{\(?:} |
| @@ -3021,7 +3021,7 @@ or @samp{\|}. | |||
| 3021 | @item | 3021 | @item |
| 3022 | In POSIX BREs, it is an implementation option whether @samp{$} is special | 3022 | In POSIX BREs, it is an implementation option whether @samp{$} is special |
| 3023 | before @samp{\)}; GNU @command{grep} treats it like Emacs does. | 3023 | before @samp{\)}; GNU @command{grep} treats it like Emacs does. |
| 3024 | In POSIX EREs, @samp{$} is always special outside of character alternatives, | 3024 | In POSIX EREs, @samp{$} is always special outside of bracket expressions, |
| 3025 | which means the ERE @samp{$x} never matches. | 3025 | which means the ERE @samp{$x} never matches. |
| 3026 | In Emacs regular expressions, @samp{$} is special only at the | 3026 | In Emacs regular expressions, @samp{$} is special only at the |
| 3027 | end of the regular expression, or before @samp{\)} or @samp{\|}. | 3027 | end of the regular expression, or before @samp{\)} or @samp{\|}. |
| @@ -3049,8 +3049,8 @@ character classes @samp{[:ascii:]}, @samp{[:multibyte:]}, | |||
| 3049 | @samp{[:nonascii:]}, @samp{[:unibyte:]}, and @samp{[:word:]}. | 3049 | @samp{[:nonascii:]}, @samp{[:unibyte:]}, and @samp{[:word:]}. |
| 3050 | 3050 | ||
| 3051 | @item | 3051 | @item |
| 3052 | BRE and ERE alternatives can contain collating symbols and equivalence | 3052 | BREs and EREs can contain collating symbols and equivalence |
| 3053 | class expressions, e.g., @samp{[[.ch.]d[=a=]]}. | 3053 | class expressions within bracket expressions, e.g., @samp{[[.ch.]d[=a=]]}. |
| 3054 | Emacs regular expressions do not support this. | 3054 | Emacs regular expressions do not support this. |
| 3055 | 3055 | ||
| 3056 | @item | 3056 | @item |
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 9914ededb85..1990630608d 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el | |||
| @@ -1453,7 +1453,7 @@ and initial semicolons." | |||
| 1453 | ;; are buffer-local, but we avoid changing them so that they can be set | 1453 | ;; are buffer-local, but we avoid changing them so that they can be set |
| 1454 | ;; to make `forward-paragraph' and friends do something the user wants. | 1454 | ;; to make `forward-paragraph' and friends do something the user wants. |
| 1455 | ;; | 1455 | ;; |
| 1456 | ;; `paragraph-start': The `(' in the character alternative and the | 1456 | ;; `paragraph-start': The `(' in the bracket expression and the |
| 1457 | ;; left-singlequote plus `(' sequence after the \\| alternative prevent | 1457 | ;; left-singlequote plus `(' sequence after the \\| alternative prevent |
| 1458 | ;; sexps and backquoted sexps that follow a docstring from being filled | 1458 | ;; sexps and backquoted sexps that follow a docstring from being filled |
| 1459 | ;; with the docstring. This setting has the consequence of inhibiting | 1459 | ;; with the docstring. This setting has the consequence of inhibiting |
diff --git a/lisp/textmodes/picture.el b/lisp/textmodes/picture.el index 9aa9b72c513..f98c3963b6f 100644 --- a/lisp/textmodes/picture.el +++ b/lisp/textmodes/picture.el | |||
| @@ -383,7 +383,7 @@ Interactively, ARG is the numeric argument, and defaults to 1." | |||
| 383 | The syntax for this variable is like the syntax used inside of `[...]' | 383 | The syntax for this variable is like the syntax used inside of `[...]' |
| 384 | in a regular expression--but without the `[' and the `]'. | 384 | in a regular expression--but without the `[' and the `]'. |
| 385 | It is NOT a regular expression, and should follow the usual | 385 | It is NOT a regular expression, and should follow the usual |
| 386 | rules for the contents of a character alternative. | 386 | rules for the contents of a bracket expression. |
| 387 | It defines a set of \"interesting characters\" to look for when setting | 387 | It defines a set of \"interesting characters\" to look for when setting |
| 388 | \(or searching for) tab stops, initially \"!-~\" (all printing characters). | 388 | \(or searching for) tab stops, initially \"!-~\" (all printing characters). |
| 389 | For example, suppose that you are editing a table which is formatted thus: | 389 | For example, suppose that you are editing a table which is formatted thus: |