aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorChong Yidong2011-01-31 18:54:50 -0500
committerChong Yidong2011-01-31 18:54:50 -0500
commit14beddf4711854b01d400f36166dc71eb39435bb (patch)
tree04fd96bb0f5dcf5f3aa4e9f39a537edc61038f83 /doc
parent2a4466ca2001c29fd654420b081b780981333dc5 (diff)
parent113ef437f21c6ea1b65abe668feb86f1622a9f2e (diff)
downloademacs-14beddf4711854b01d400f36166dc71eb39435bb.tar.gz
emacs-14beddf4711854b01d400f36166dc71eb39435bb.zip
Merge changes from emacs-23 branch
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs/ChangeLog8
-rw-r--r--doc/emacs/files.texi33
-rw-r--r--doc/emacs/search.texi113
-rw-r--r--doc/lispref/ChangeLog11
-rw-r--r--doc/lispref/display.texi5
-rw-r--r--doc/lispref/elisp.texi5
-rw-r--r--doc/lispref/keymaps.texi2
-rw-r--r--doc/lispref/vol1.texi5
-rw-r--r--doc/lispref/vol2.texi5
9 files changed, 101 insertions, 86 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index c5b31d70139..961fa9fb491 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,11 @@
12011-01-31 Chong Yidong <cyd@stupidchicken.com>
2
3 * search.texi (Regexps): Copyedits. Mention character classes
4 (Bug#7809).
5
6 * files.texi (File Aliases): Restore explanatory text from Eli
7 Zaretskii, accidentally removed in 2011-01-08 commit.
8
12011-01-29 Eli Zaretskii <eliz@gnu.org> 92011-01-29 Eli Zaretskii <eliz@gnu.org>
2 10
3 * makefile.w32-in (MAKEINFO): Remove options, leave only program name. 11 * makefile.w32-in (MAKEINFO): Remove options, leave only program name.
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index 0ebf59a9f37..40bd065610c 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -1183,26 +1183,23 @@ implies the effect of @code{find-file-existing-other-name}.
1183@cindex directory name abbreviation 1183@cindex directory name abbreviation
1184@vindex directory-abbrev-alist 1184@vindex directory-abbrev-alist
1185 Sometimes, a directory is ordinarily accessed through a symbolic 1185 Sometimes, a directory is ordinarily accessed through a symbolic
1186link, and you may want Emacs to preferentially display its ``linked'' 1186link, and you may want Emacs to preferentially show its ``linked''
1187name instead of its truename. To do this, customize the variable 1187name. To do this, customize @code{directory-abbrev-alist}. Each
1188@code{directory-abbrev-alist}. Each element in this list should have 1188element in this list should have the form @code{(@var{from}
1189the form @code{(@var{from} . @var{to})}, which says to replace 1189. @var{to})}, which means to replace @var{from} with @var{to} whenever
1190@var{from} with @var{to} when it appears in a directory name. For 1190@var{from} appears in a directory name. The @var{from} string is a
1191this feature to work properly, @var{from} and @var{to} should point to 1191regular expression (@pxref{Regexps}). It is matched against directory
1192the same file. The @var{from} string is actually a regular expression 1192names anchored at the first character, and should start with @samp{\`}
1193(@pxref{Regexps}); it should always start with @samp{\`}, to avoid 1193(to support directory names with embedded newlines, which would defeat
1194matching to an incorrect part of the original directory name. The 1194@samp{^}). The @var{to} string should be an ordinary absolute
1195@var{to} string should be an ordinary absolute directory name. Do not 1195directory name pointing to the same directory. Do not use @samp{~} to
1196use @samp{~} to stand for a home directory in the @var{to} string; 1196stand for a home directory in the @var{to} string; Emacs performs
1197Emacs performs these substitutions separately. 1197these substitutions separately. Here's an example, from a system on
1198 1198which @file{/home/fsf} is normally accessed through a symbolic link
1199 Here's an example, from a system on which file system 1199named @file{/fsf}:
1200@file{/home/fsf} and so on are normally accessed through symbolic
1201links named @file{/fsf} and so on.
1202 1200
1203@example 1201@example
1204(("\\`/home/fsf" . "/fsf") 1202(("\\`/home/fsf" . "/fsf"))
1205 ("\\`/home/gd" . "/gd"))
1206@end example 1203@end example
1207 1204
1208@node Directories 1205@node Directories
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi
index 99fde1d7a04..df0579ab9ea 100644
--- a/doc/emacs/search.texi
+++ b/doc/emacs/search.texi
@@ -545,21 +545,20 @@ Search}.
545@cindex syntax of regexps 545@cindex syntax of regexps
546 546
547 This manual describes regular expression features that users 547 This manual describes regular expression features that users
548typically want to use. There are additional features that are 548typically use. @xref{Regular Expressions,,, elisp, The Emacs Lisp
549mainly used in Lisp programs; see @ref{Regular Expressions,,, 549Reference Manual}, for additional features used mainly in Lisp
550elisp, The Emacs Lisp Reference Manual}. 550programs.
551 551
552 Regular expressions have a syntax in which a few characters are 552 Regular expressions have a syntax in which a few characters are
553special constructs and the rest are @dfn{ordinary}. An ordinary 553special constructs and the rest are @dfn{ordinary}. An ordinary
554character is a simple regular expression which matches that same 554character matches that same character and nothing else. The special
555character and nothing else. The special characters are @samp{$}, 555characters are @samp{$^.*+?[\}. The character @samp{]} is special if
556@samp{^}, @samp{.}, @samp{*}, @samp{+}, @samp{?}, @samp{[}, and 556it ends a character alternative (see later). The character @samp{-}
557@samp{\}. The character @samp{]} is special if it ends a character 557is special inside a character alternative. Any other character
558alternative (see later). The character @samp{-} is special inside a 558appearing in a regular expression is ordinary, unless a @samp{\}
559character alternative. Any other character appearing in a regular 559precedes it. (When you use regular expressions in a Lisp program,
560expression is ordinary, unless a @samp{\} precedes it. (When you use 560each @samp{\} must be doubled, see the example near the end of this
561regular expressions in a Lisp program, each @samp{\} must be doubled, 561section.)
562see the example near the end of this section.)
563 562
564 For example, @samp{f} is not a special character, so it is ordinary, and 563 For example, @samp{f} is not a special character, so it is ordinary, and
565therefore @samp{f} is a regular expression that matches the string 564therefore @samp{f} is a regular expression that matches the string
@@ -569,28 +568,27 @@ only @samp{o}. (When case distinctions are being ignored, these regexps
569also match @samp{F} and @samp{O}, but we consider this a generalization 568also match @samp{F} and @samp{O}, but we consider this a generalization
570of ``the same string,'' rather than an exception.) 569of ``the same string,'' rather than an exception.)
571 570
572 Any two regular expressions @var{a} and @var{b} can be concatenated. The 571 Any two regular expressions @var{a} and @var{b} can be concatenated.
573result is a regular expression which matches a string if @var{a} matches 572The result is a regular expression which matches a string if @var{a}
574some amount of the beginning of that string and @var{b} matches the rest of 573matches some amount of the beginning of that string and @var{b}
575the string.@refill 574matches the rest of the string. For example, concatenating the
576 575regular expressions @samp{f} and @samp{o} gives the regular expression
577 As a simple example, we can concatenate the regular expressions @samp{f} 576@samp{fo}, which matches only the string @samp{fo}. Still trivial.
578and @samp{o} to get the regular expression @samp{fo}, which matches only 577To do something nontrivial, you need to use one of the special
579the string @samp{fo}. Still trivial. To do something nontrivial, you 578characters. Here is a list of them.
580need to use one of the special characters. Here is a list of them.
581 579
582@table @asis 580@table @asis
583@item @kbd{.}@: @r{(Period)} 581@item @kbd{.}@: @r{(Period)}
584is a special character that matches any single character except a newline. 582is a special character that matches any single character except a
585Using concatenation, we can make regular expressions like @samp{a.b}, which 583newline. For example, the regular expressions @samp{a.b} matches any
586matches any three-character string that begins with @samp{a} and ends with 584three-character string that begins with @samp{a} and ends with
587@samp{b}.@refill 585@samp{b}.
588 586
589@item @kbd{*} 587@item @kbd{*}
590is not a construct by itself; it is a postfix operator that means to 588is not a construct by itself; it is a postfix operator that means to
591match the preceding regular expression repetitively as many times as 589match the preceding regular expression repetitively any number of
592possible. Thus, @samp{o*} matches any number of @samp{o}s (including no 590times, as many times as possible. Thus, @samp{o*} matches any number
593@samp{o}s). 591of @samp{o}s, including no @samp{o}s.
594 592
595@samp{*} always applies to the @emph{smallest} possible preceding 593@samp{*} always applies to the @emph{smallest} possible preceding
596expression. Thus, @samp{fo*} has a repeating @samp{o}, not a repeating 594expression. Thus, @samp{fo*} has a repeating @samp{o}, not a repeating
@@ -609,22 +607,21 @@ With this choice, the rest of the regexp matches successfully.@refill
609 607
610@item @kbd{+} 608@item @kbd{+}
611is a postfix operator, similar to @samp{*} except that it must match 609is a postfix operator, similar to @samp{*} except that it must match
612the preceding expression at least once. So, for example, @samp{ca+r} 610the preceding expression at least once. Thus, @samp{ca+r} matches the
613matches the strings @samp{car} and @samp{caaaar} but not the string 611strings @samp{car} and @samp{caaaar} but not the string @samp{cr},
614@samp{cr}, whereas @samp{ca*r} matches all three strings. 612whereas @samp{ca*r} matches all three strings.
615 613
616@item @kbd{?} 614@item @kbd{?}
617is a postfix operator, similar to @samp{*} except that it can match the 615is a postfix operator, similar to @samp{*} except that it can match
618preceding expression either once or not at all. For example, 616the preceding expression either once or not at all. Thus, @samp{ca?r}
619@samp{ca?r} matches @samp{car} or @samp{cr}; nothing else. 617matches @samp{car} or @samp{cr}, and nothing else.
620 618
621@item @kbd{*?}, @kbd{+?}, @kbd{??} 619@item @kbd{*?}, @kbd{+?}, @kbd{??}
622@cindex non-greedy regexp matching 620@cindex non-greedy regexp matching
623are non-greedy variants of the operators above. The normal operators 621are non-@dfn{greedy} variants of the operators above. The normal
624@samp{*}, @samp{+}, @samp{?} are @dfn{greedy} in that they match as 622operators @samp{*}, @samp{+}, @samp{?} match as much as they can, as
625much as they can, as long as the overall regexp can still match. With 623long as the overall regexp can still match. With a following
626a following @samp{?}, they are non-greedy: they will match as little 624@samp{?}, they will match as little as possible.
627as possible.
628 625
629Thus, both @samp{ab*} and @samp{ab*?} can match the string @samp{a} 626Thus, both @samp{ab*} and @samp{ab*?} can match the string @samp{a}
630and the string @samp{abbbb}; but if you try to match them both against 627and the string @samp{abbbb}; but if you try to match them both against
@@ -640,29 +637,30 @@ a newline, it matches the whole string. Since it @emph{can} match
640starting at the first @samp{a}, it does. 637starting at the first @samp{a}, it does.
641 638
642@item @kbd{\@{@var{n}\@}} 639@item @kbd{\@{@var{n}\@}}
643is a postfix operator that specifies repetition @var{n} times---that 640is a postfix operator specifying @var{n} repetitions---that is, the
644is, the preceding regular expression must match exactly @var{n} times 641preceding regular expression must match exactly @var{n} times in a
645in a row. For example, @samp{x\@{4\@}} matches the string @samp{xxxx} 642row. For example, @samp{x\@{4\@}} matches the string @samp{xxxx} and
646and nothing else. 643nothing else.
647 644
648@item @kbd{\@{@var{n},@var{m}\@}} 645@item @kbd{\@{@var{n},@var{m}\@}}
649is a postfix operator that specifies repetition between @var{n} and 646is a postfix operator specifying between @var{n} and @var{m}
650@var{m} times---that is, the preceding regular expression must match 647repetitions---that is, the preceding regular expression must match at
651at least @var{n} times, but no more than @var{m} times. If @var{m} is 648least @var{n} times, but no more than @var{m} times. If @var{m} is
652omitted, then there is no upper limit, but the preceding regular 649omitted, then there is no upper limit, but the preceding regular
653expression must match at least @var{n} times.@* @samp{\@{0,1\@}} is 650expression must match at least @var{n} times.@* @samp{\@{0,1\@}} is
654equivalent to @samp{?}. @* @samp{\@{0,\@}} is equivalent to 651equivalent to @samp{?}. @* @samp{\@{0,\@}} is equivalent to
655@samp{*}. @* @samp{\@{1,\@}} is equivalent to @samp{+}. 652@samp{*}. @* @samp{\@{1,\@}} is equivalent to @samp{+}.
656 653
657@item @kbd{[ @dots{} ]} 654@item @kbd{[ @dots{} ]}
658is a @dfn{character set}, which begins with @samp{[} and is terminated 655is a @dfn{character set}, beginning with @samp{[} and terminated by
659by @samp{]}. In the simplest case, the characters between the two 656@samp{]}.
660brackets are what this set can match.
661 657
662Thus, @samp{[ad]} matches either one @samp{a} or one @samp{d}, and 658In the simplest case, the characters between the two brackets are what
663@samp{[ad]*} matches any string composed of just @samp{a}s and @samp{d}s 659this set can match. Thus, @samp{[ad]} matches either one @samp{a} or
664(including the empty string), from which it follows that @samp{c[ad]*r} 660one @samp{d}, and @samp{[ad]*} matches any string composed of just
665matches @samp{cr}, @samp{car}, @samp{cdr}, @samp{caddaar}, etc. 661@samp{a}s and @samp{d}s (including the empty string). It follows that
662@samp{c[ad]*r} matches @samp{cr}, @samp{car}, @samp{cdr},
663@samp{caddaar}, etc.
666 664
667You can also include character ranges in a character set, by writing the 665You can also include character ranges in a character set, by writing the
668starting and ending characters with a @samp{-} between them. Thus, 666starting and ending characters with a @samp{-} between them. Thus,
@@ -671,9 +669,12 @@ intermixed freely with individual characters, as in @samp{[a-z$%.]},
671which matches any lower-case @acronym{ASCII} letter or @samp{$}, @samp{%} or 669which matches any lower-case @acronym{ASCII} letter or @samp{$}, @samp{%} or
672period. 670period.
673 671
674Note that the usual regexp special characters are not special inside a 672You can also include certain special @dfn{character classes} in a
675character set. A completely different set of special characters exists 673character set. A @samp{[:} and balancing @samp{:]} enclose a
676inside character sets: @samp{]}, @samp{-} and @samp{^}. 674character class inside a character alternative. For instance,
675@samp{[[:alnum:]]} matches any letter or digit. @xref{Char Classes,,,
676elisp, The Emacs Lisp Reference Manual}, for a list of character
677classes.
677 678
678To include a @samp{]} in a character set, you must make it the first 679To include a @samp{]} in a character set, you must make it the first
679character. For example, @samp{[]a]} matches @samp{]} or @samp{a}. To 680character. For example, @samp{[]a]} matches @samp{]} or @samp{a}. To
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index be8803d4cb2..063ea78c09a 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,14 @@
12011-01-28 Chong Yidong <cyd@stupidchicken.com>
2
3 * vol1.texi (Top):
4 * vol2.texi (Top):
5 * elisp.texi (Top):
6 * display.texi (Display Property): Shorten the menu description of
7 the "Other Display Specs" node (Bug#7816).
8
9 * keymaps.texi (Defining Menus): Add "menu item" and "extended
10 menu item" concept index entries (Bug#7805).
11
12011-01-29 Eli Zaretskii <eliz@gnu.org> 122011-01-29 Eli Zaretskii <eliz@gnu.org>
2 13
3 * makefile.w32-in (texinfodir): New variable. 14 * makefile.w32-in (texinfodir): New variable.
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 9bc80a77742..80a035aa346 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -3657,9 +3657,8 @@ display specifications and what they mean.
3657* Replacing Specs:: Display specs that replace the text. 3657* Replacing Specs:: Display specs that replace the text.
3658* Specified Space:: Displaying one space with a specified width. 3658* Specified Space:: Displaying one space with a specified width.
3659* Pixel Specification:: Specifying space width or height in pixels. 3659* Pixel Specification:: Specifying space width or height in pixels.
3660* Other Display Specs:: Displaying an image; magnifying text; moving it 3660* Other Display Specs:: Displaying an image; adjusting the height,
3661 up or down on the page; adjusting the width 3661 spacing, and other properties of text.
3662 of spaces within text.
3663* Display Margins:: Displaying text or images to the side of the main text. 3662* Display Margins:: Displaying text or images to the side of the main text.
3664@end menu 3663@end menu
3665 3664
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi
index 0214bb9d10c..ad7931d45b4 100644
--- a/doc/lispref/elisp.texi
+++ b/doc/lispref/elisp.texi
@@ -1330,9 +1330,8 @@ The @code{display} Property
1330* Replacing Specs:: Display specs that replace the text. 1330* Replacing Specs:: Display specs that replace the text.
1331* Specified Space:: Displaying one space with a specified width. 1331* Specified Space:: Displaying one space with a specified width.
1332* Pixel Specification:: Specifying space width or height in pixels. 1332* Pixel Specification:: Specifying space width or height in pixels.
1333* Other Display Specs:: Displaying an image; magnifying text; moving it 1333* Other Display Specs:: Displaying an image; adjusting the height,
1334 up or down on the page; adjusting the width 1334 spacing, and other properties of text.
1335 of spaces within text.
1336* Display Margins:: Displaying text or images to the side of 1335* Display Margins:: Displaying text or images to the side of
1337 the main text. 1336 the main text.
1338 1337
diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi
index a9a30abd1ed..4a2964b9b6c 100644
--- a/doc/lispref/keymaps.texi
+++ b/doc/lispref/keymaps.texi
@@ -1972,6 +1972,7 @@ feature.
1972@cindex defining menus 1972@cindex defining menus
1973@cindex menu prompt string 1973@cindex menu prompt string
1974@cindex prompt string (of menu) 1974@cindex prompt string (of menu)
1975@cindex menu item
1975 1976
1976A keymap acts as a menu if it has an @dfn{overall prompt string}, 1977A keymap acts as a menu if it has an @dfn{overall prompt string},
1977which is a string that appears as an element of the keymap. 1978which is a string that appears as an element of the keymap.
@@ -2073,6 +2074,7 @@ of menus in advance. To force recalculation of the menu bar, call
2073@node Extended Menu Items 2074@node Extended Menu Items
2074@subsubsection Extended Menu Items 2075@subsubsection Extended Menu Items
2075@kindex menu-item 2076@kindex menu-item
2077@cindex extended menu item
2076 2078
2077 An extended-format menu item is a more flexible and also cleaner 2079 An extended-format menu item is a more flexible and also cleaner
2078alternative to the simple format. You define an event type with a 2080alternative to the simple format. You define an event type with a
diff --git a/doc/lispref/vol1.texi b/doc/lispref/vol1.texi
index 93e6cc31ec2..ad8ff0819ca 100644
--- a/doc/lispref/vol1.texi
+++ b/doc/lispref/vol1.texi
@@ -1351,9 +1351,8 @@ The @code{display} Property
1351* Replacing Specs:: Display specs that replace the text. 1351* Replacing Specs:: Display specs that replace the text.
1352* Specified Space:: Displaying one space with a specified width. 1352* Specified Space:: Displaying one space with a specified width.
1353* Pixel Specification:: Specifying space width or height in pixels. 1353* Pixel Specification:: Specifying space width or height in pixels.
1354* Other Display Specs:: Displaying an image; magnifying text; moving it 1354* Other Display Specs:: Displaying an image; adjusting the height,
1355 up or down on the page; adjusting the width 1355 spacing, and other properties of text.
1356 of spaces within text.
1357* Display Margins:: Displaying text or images to the side of 1356* Display Margins:: Displaying text or images to the side of
1358 the main text. 1357 the main text.
1359 1358
diff --git a/doc/lispref/vol2.texi b/doc/lispref/vol2.texi
index 6833e5219f3..7832b3a8614 100644
--- a/doc/lispref/vol2.texi
+++ b/doc/lispref/vol2.texi
@@ -1350,9 +1350,8 @@ The @code{display} Property
1350* Replacing Specs:: Display specs that replace the text. 1350* Replacing Specs:: Display specs that replace the text.
1351* Specified Space:: Displaying one space with a specified width. 1351* Specified Space:: Displaying one space with a specified width.
1352* Pixel Specification:: Specifying space width or height in pixels. 1352* Pixel Specification:: Specifying space width or height in pixels.
1353* Other Display Specs:: Displaying an image; magnifying text; moving it 1353* Other Display Specs:: Displaying an image; adjusting the height,
1354 up or down on the page; adjusting the width 1354 spacing, and other properties of text.
1355 of spaces within text.
1356* Display Margins:: Displaying text or images to the side of 1355* Display Margins:: Displaying text or images to the side of
1357 the main text. 1356 the main text.
1358 1357