Commit 61cfa852 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

*** empty log message ***

parent 0a50b993
......@@ -9,7 +9,7 @@
A @var{frame} is a rectangle on the screen that contains one or more
Emacs windows. A frame initially contains a single main window (plus
perhaps a minibuffer window) which you can subdivide vertically or
perhaps a minibuffer window), which you can subdivide vertically or
horizontally into smaller windows.
@cindex terminal frame
......@@ -66,7 +66,7 @@ variable @code{default-frame-alist}; parameters not specified there
either default from the standard X defaults file and X resources.
The set of possible parameters depends in principle on what kind of
window system Emacs uses to display its the frames. @xref{X Frame
window system Emacs uses to display its frames. @xref{X Frame
Parameters}, for documentation of individual parameters you can specify
when creating an X window frame.
@end defun
......@@ -251,11 +251,11 @@ The type of icon to use for this frame when it is iconified.
Non-@code{nil} specifies a bitmap icon, @code{nil} a text icon.
@item foreground-color
The color to use for the inside of a character. This is a string; the X
The color to use for the image of a character. This is a string; the X
server defines the meaningful color names.
@item background-color
The color to use for the background of text.
The color to use for the background of characters.
@item mouse-color
The color for the mouse pointer.
......@@ -303,7 +303,7 @@ it and see if it works.)
@subsection Frame Size And Position
You can read or change the size and position of a frame using the
frame parameters @code{left}, @code{top}, @code{height} and
frame parameters @code{left}, @code{top}, @code{height}, and
@code{width}. Whatever geometry parameters you don't specify are chosen
by the window manager in its usual fashion.
......@@ -311,7 +311,7 @@ by the window manager in its usual fashion.
@defun set-frame-position frame left top
This function sets the position of the top left corner of
@var{frame}---to @var{left} and @var{top}. These arguments are measured
@var{frame} to @var{left} and @var{top}. These arguments are measured
in pixels, counting from the top left corner of the screen.
@end defun
......@@ -330,10 +330,10 @@ pixels. If you don't supply @var{frame}, they use the selected frame.
@defun frame-char-height &optional frame
@defunx frame-char-width &optional frame
These functions return the height and width, respectively, of a
character in @var{frame}, measured in pixels. The values depend on the
choice of font. If you don't supply @var{frame}, these functions use
the selected frame.
These functions return the height and width of a character in
@var{frame}, measured in pixels. The values depend on the choice of
font. If you don't supply @var{frame}, these functions use the selected
frame.
@end defun
@defun set-frame-size frame cols rows
......@@ -354,7 +354,7 @@ Size}.
@defun x-parse-geometry geom
@cindex geometry specification
The function @code{x-parse-geometry} converts a standard X windows
geometry string to an alist which you can use as part of the argument to
geometry string to an alist that you can use as part of the argument to
@code{make-frame}.
The alist describes which parameters were specified in @var{geom}, and
......@@ -454,7 +454,6 @@ one), and then it moves back to the top.
@defun frame-top-window frame
This returns the topmost, leftmost window of frame @var{frame}.
This is a window
@end defun
At any time, exactly one window on any frame is @dfn{selected within the
......@@ -463,7 +462,7 @@ frame also selects this window. You can get the frame's current
selected window with @code{frame-selected-window}.
@defun frame-selected-window frame
This function returns the window on @var{frame} which is selected within
This function returns the window on @var{frame} that is selected within
@var{frame}.
@end defun
......@@ -482,7 +481,7 @@ must use the minibuffer window of some other frame. When you create the
frame, you can specify explicitly the frame on which to find the
minibuffer to use. If you don't, then the minibuffer is found in the
frame which is the value of the variable
@code{default-minibuffer-frame}. Its value should be a frame which does
@code{default-minibuffer-frame}. Its value should be a frame that does
have a minibuffer.
If you use a minibuffer-only frame, you might want that frame to raise
......@@ -534,7 +533,7 @@ Don't call it for any other reason.
@defun redirect-frame-focus frame focus-frame
This function redirects focus from @var{frame} to @var{focus-frame}.
This means that @var{focus-frame} will receive subsequent keystrokes and
This means that @var{focus-frame} will receive subsequent keystrokes
intended for @var{frame}. After such an event, the value of
@code{last-event-frame} will be @var{focus-frame}. Also, switch-frame
events specifying @var{frame} will instead select @var{focus-frame}.
......@@ -547,7 +546,7 @@ One use of focus redirection is for frames that don't have minibuffers.
These frames use minibuffers on other frames. Activating a minibuffer
on another frame redirects focus to that frame. This puts the focus on
the minibuffer's frame, where it belongs, even though the mouse remains
in the frame which activated the minibuffer.
in the frame that activated the minibuffer.
Selecting a frame can also change focus redirections. Selecting frame
@code{bar}, when @code{foo} had been selected, changes any redirections
......@@ -573,7 +572,7 @@ change it.
A frame may be @dfn{visible}, @dfn{invisible}, or @dfn{iconified}. If
it is visible, you can see its contents. If it is iconified, the
frame's contents do not appear on the screen, but an icon does. If the
frame is invisible, it doesn't show in the screen, not even as an icon.
frame is invisible, it doesn't show on the screen, not even as an icon.
@deffn Command make-frame-visible &optional frame
This function makes frame @var{frame} visible. If you omit @var{frame},
......@@ -646,7 +645,7 @@ for any frame using frame parameters. @xref{X Frame Parameters}.
all their properties, and the window configuration of each one.
@defun current-frame-configuration
This function returns a frame configuration list which describes
This function returns a frame configuration list that describes
the current arrangement of frames and their contents.
@end defun
......@@ -660,7 +659,7 @@ This function restores the state of frames described in
@cindex mouse tracking
@cindex tracking the mouse
Sometimes it is useful to @dfn{track} the mouse, which means, to display
Sometimes it is useful to @dfn{track} the mouse, which means to display
something to indicate where the mouse is and move the indicator as the
mouse moves. For efficient mouse tracking, you need a way to wait until
the mouse actually moves.
......@@ -911,7 +910,7 @@ independently. The usual values of @var{type} are @code{PRIMARY} and
with X Window System conventions. The default is @code{PRIMARY}.
@end defun
@defun x-get-selection type data-type
@defun x-get-selection &optional type data-type
This function accesses selections set up by Emacs or by other X
clients. It takes two optional arguments, @var{type} and
@var{data-type}. The default for @var{type}, the selection type, is
......@@ -1004,14 +1003,14 @@ is much slower.
@node Resources
@section X Resources
@defun x-get-resource attribute &optional name class
@defun x-get-resource attribute &optional component subclass
The function @code{x-get-resource} retrieves a resource value from the X
Windows defaults database.
Resources are indexed by a combination of a @dfn{key} and a @dfn{class}.
This function searches using a key of the form
@samp{@var{instance}.@var{attribute}}, using the name under which Emacs
was invoked as @var{instance}, and using @samp{Emacs} as the class.
@samp{@var{instance}.@var{attribute}} (where @var{instance} is the name
under which Emacs was invoked), and using @samp{Emacs} as the class.
The optional arguments @var{component} and @var{subclass} add to the key
and the class, respectively. You must specify both of them or neither.
......
......@@ -80,8 +80,11 @@ upper bound and returns @code{nil}. (It would be more consistent now
to return the new position of point in that case, but some programs
may depend on a value of @code{nil}.)
If @var{repeat} is non-@code{nil}, then the search is repeated that
many times. Point is positioned at the end of the last match.
If @var{repeat} is supplied (it must be a positive number), then the
search is repeated that many times (each time starting at the end of the
previous time's match). If these successive searches succeed, the
function succeeds, moving point and returning its new value. Otherwise
the search fails.
@end deffn
@deffn Command search-backward string &optional limit noerror repeat
......@@ -165,13 +168,14 @@ regexps; the following section says how to search for them.
@node Syntax of Regexps
@subsection Syntax of Regular Expressions
Regular expressions have a syntax in which a few characters are special
constructs and the rest are @dfn{ordinary}. An ordinary character is a
simple regular expression which matches that character and nothing else.
The special characters are @samp{$}, @samp{^}, @samp{.}, @samp{*},
@samp{+}, @samp{?}, @samp{[}, @samp{]} and @samp{\}; no new special
characters will be defined in the future. Any other character appearing
in a regular expression is ordinary, unless a @samp{\} precedes it.
Regular expressions have a syntax in which a few characters are
special constructs and the rest are @dfn{ordinary}. An ordinary
character is a simple regular expression that matches that character and
nothing else. The special characters are @samp{.}, @samp{*}, @samp{+},
@samp{?}, @samp{[}, @samp{]}, @samp{^}, @samp{$}, and @samp{\}; no new
special characters will be defined in the future. Any other character
appearing in a regular expression is ordinary, unless a @samp{\}
precedes it.
For example, @samp{f} is not a special character, so it is ordinary, and
therefore @samp{f} is a regular expression that matches the string
......@@ -180,7 +184,7 @@ therefore @samp{f} is a regular expression that matches the string
only @samp{o}.@refill
Any two regular expressions @var{a} and @var{b} can be concatenated. The
result is a regular expression which matches a string if @var{a} matches
result is a regular expression that matches a string if @var{a} matches
some amount of the beginning of that string and @var{b} matches the rest of
the string.@refill
......@@ -255,14 +259,14 @@ inside character sets: @samp{]}, @samp{-} and @samp{^}.@refill
characters with a @samp{-} between them. Thus, @samp{[a-z]} matches any
lower case letter. Ranges may be intermixed freely with individual
characters, as in @samp{[a-z$%.]}, which matches any lower case letter
or @samp{$}, @samp{%} or a period.@refill
or @samp{$}, @samp{%}, or a period.@refill
To include a @samp{]} in a character set, make it the first character.
For example, @samp{[]a]} matches @samp{]} or @samp{a}. To include a
@samp{-}, write @samp{-} as the first character in the set, or put
@samp{-}, write @samp{-} as the first character in the set, or put it
immediately after a range. (You can replace one individual character
@var{c} with the range @samp{@var{c}-@var{c}} to make a place to put the
@samp{-}). There is no way to write a set containing just @samp{-} and
@samp{-}.) There is no way to write a set containing just @samp{-} and
@samp{]}.
To include @samp{^} in a set, put it anywhere but at the beginning of
......@@ -284,21 +288,21 @@ newline is mentioned as one of the characters not to match.
@item ^
@cindex @samp{^} in regexp
@cindex beginning of line in regexp
is a special character that matches the empty string, but only at
the beginning of a line in the text being matched. Otherwise it fails
to match anything. Thus, @samp{^foo} matches a @samp{foo} which occurs
at the beginning of a line.
is a special character that matches the empty string, but only at the
beginning of a line in the text being matched. Otherwise it fails to
match anything. Thus, @samp{^foo} matches a @samp{foo} that occurs at
the beginning of a line.
When matching a string, @samp{^} matches at the beginning of the string
or after a newline character @samp{\n}.
When matching a string instead of a buffer, @samp{^} matches at the
beginning of the string or after a newline character @samp{\n}.
@item $
@cindex @samp{$} in regexp
is similar to @samp{^} but matches only at the end of a line. Thus,
@samp{x+$} matches a string of one @samp{x} or more at the end of a line.
When matching a string, @samp{$} matches at the end of the string
or before a newline character @samp{\n}.
When matching a string instead of a buffer, @samp{$} matches at the end
of the string or before a newline character @samp{\n}.
@item \
@cindex @samp{\} in regexp
......@@ -306,8 +310,8 @@ has two functions: it quotes the special characters (including
@samp{\}), and it introduces additional special constructs.
Because @samp{\} quotes special characters, @samp{\$} is a regular
expression which matches only @samp{$}, and @samp{\[} is a regular
expression which matches only @samp{[}, and so on.
expression that matches only @samp{$}, and @samp{\[} is a regular
expression that matches only @samp{[}, and so on.
Note that @samp{\} also has special meaning in the read syntax of Lisp
strings (@pxref{String Type}), and must be quoted with @samp{\}. For
......@@ -322,13 +326,12 @@ example, the regular expression that matches the @samp{\} character is
are treated as ordinary ones if they are in contexts where their special
meanings make no sense. For example, @samp{*foo} treats @samp{*} as
ordinary since there is no preceding expression on which the @samp{*}
can act. It is poor practice to depend on this behavior; better to
quote the special character anyway, regardless of where it
appears.@refill
can act. It is poor practice to depend on this behavior; quote the
special character anyway, regardless of where it appears.@refill
For the most part, @samp{\} followed by any character matches only
that character. However, there are several exceptions: characters
which, when preceded by @samp{\}, are special constructs. Such
that, when preceded by @samp{\}, are special constructs. Such
characters are always ordinary when encountered on their own. Here
is a table of @samp{\} constructs:
......@@ -371,13 +374,13 @@ To record a matched substring for future reference.
@end enumerate
This last application is not a consequence of the idea of a
parenthetical grouping; it is a separate feature which happens to be
parenthetical grouping; it is a separate feature that happens to be
assigned as a second meaning to the same @samp{\( @dots{} \)} construct
because there is no conflict in practice between the two meanings.
Here is an explanation of this feature:
@item \@var{digit}
matches the same text which matched the @var{digit}th occurrence of a
matches the same text that matched the @var{digit}th occurrence of a
@samp{\( @dots{} \)} construct.
In other words, after the end of a @samp{\( @dots{} \)} construct. the
......@@ -404,12 +407,12 @@ determines which characters these are. @xref{Syntax Tables}.
@item \W
@cindex @samp{\W} in regexp
matches any character that is not a word-constituent.
matches any character that is not a word constituent.
@item \s@var{code}
@cindex @samp{\s} in regexp
matches any character whose syntax is @var{code}. Here @var{code} is a
character which represents a syntax code: thus, @samp{w} for word
character that represents a syntax code: thus, @samp{w} for word
constituent, @samp{-} for whitespace, @samp{(} for open parenthesis,
etc. @xref{Syntax Tables}, for a list of syntax codes and the
characters that stand for them.
......@@ -419,7 +422,7 @@ characters that stand for them.
matches any character whose syntax is not @var{code}.
@end table
These regular expression constructs match the empty string---that is,
The following regular expression constructs match the empty string---that is,
they don't use up any characters---but whether they match depends on the
context.
......@@ -463,7 +466,7 @@ matches the empty string, but only at the end of a word.
@kindex invalid-regexp
Not every string is a valid regular expression. For example, a string
with unbalanced square brackets is invalid (with a few exceptions, such
as @samp{[]]}, and so is a string that ends with a single @samp{\}. If
as @samp{[]]}), and so is a string that ends with a single @samp{\}. If
an invalid regular expression is passed to any of the search functions,
an @code{invalid-regexp} error is signaled.
......@@ -481,13 +484,13 @@ string match when calling a function that wants a regular expression.
One use of @code{regexp-quote} is to combine an exact string match with
context described as a regular expression. For example, this searches
for the string which is the value of @code{string}, surrounded by
for the string that is the value of @code{string}, surrounded by
whitespace:
@example
@group
(re-search-forward
(concat "\\s " (regexp-quote string) "\\s "))
(concat "\\s-" (regexp-quote string) "\\s-"))
@end group
@end example
@end defun
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment