@c Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
-@node Display, Search, Registers, Top
+@node Display
@chapter Controlling the Display
Since only part of a large buffer fits in the window, Emacs has to
prompts for a regular expression, and displays only faces with names
matching that regular expression (@pxref{Regexps}).
+@vindex frame-background-mode
It's possible for a given face to look different in different
frames. For instance, some text terminals do not support all face
attributes, particularly font, height, and width, and some support a
-limited range of colors.
+limited range of colors. In addition, most Emacs faces are defined so
+that their attributes are different on light and dark frame
+backgrounds, for reasons of legibility. By default, Emacs
+automatically chooses which set of face attributes to display on each
+frame, based on the frame's current background color. However, you
+can override this by giving the variable @code{frame-background-mode}
+a non-@code{nil} value. A value of @code{dark} makes Emacs treat all
+frames as if they have a dark background, whereas a value of
+@code{light} makes it treat all frames as if they have a light
+background.
@cindex background color
@cindex default face
- You can customize a face to alter its appearance, and save those
-changes for future Emacs sessions. @xref{Face Customization}. A face
-does not have to specify every single attribute; often it inherits
-most attributes from another face. Any ultimately unspecified
-attribute is taken from the face named @code{default}.
+ You can customize a face to alter its attributes, and save those
+customizations for future Emacs sessions. @xref{Face Customization},
+for details.
The @code{default} face is the default for displaying text, and all
of its attributes are specified. Its background color is also used as
@cindex whitespace, trailing
@vindex show-trailing-whitespace
It is easy to leave unnecessary spaces at the end of a line, or
-empty lines at the end of a file, without realizing it. In most
-cases, this @dfn{trailing whitespace} has no effect, but there are
-special circumstances where it matters, and it can be a nuisance.
+empty lines at the end of a buffer, without realizing it. In most
+cases, this @dfn{trailing whitespace} has no effect, but sometimes it
+can be a nuisance.
You can make trailing whitespace at the end of a line visible by
setting the buffer-local variable @code{show-trailing-whitespace} to
present.
@findex delete-trailing-whitespace
+@vindex delete-trailing-lines
Type @kbd{M-x delete-trailing-whitespace} to delete all trailing
-whitespace within the buffer. If the region is active, it deletes all
-trailing whitespace in the region instead.
+whitespace. This command deletes all extra spaces at the end of each
+line in the buffer, and all empty lines at the end of the buffer; to
+ignore the latter, change the variable @code{delete-trailing-lines} to
+@code{nil}. If the region is active, the command instead deletes
+extra spaces at the end of each line in the region.
@vindex indicate-empty-lines
@cindex unused lines