aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2011-10-17 21:42:28 -0400
committerChong Yidong2011-10-17 21:42:28 -0400
commitd366bd532dcd13baa89962e9ab7443cb4dd76772 (patch)
tree2fc24b1765222230cd2c3ad796a981002d011deb
parentaa22bff2be02d0b3f1264276afc04e47d53cd421 (diff)
downloademacs-d366bd532dcd13baa89962e9ab7443cb4dd76772.tar.gz
emacs-d366bd532dcd13baa89962e9ab7443cb4dd76772.zip
Edits to Display chapter of Emacs manual.
* doc/emacs/display.texi (Faces): Simplify discussion. Move documentation of list-faces-display here, from Standard Faces node. Note special role of `default' background. (Standard Faces): Note special role of `default' background. Note that region face may be taken fom GTK. Add xref to Text Display. (Text Scale): Rename from "Temporary Face Changes". Callers changed. Don't bother documenting variable-pitch-mode. (Font Lock): Copyedits. Remove font-lock-maximum-size. (Useless Whitespace): Simplify description of delete-trailing-whitespace. Note active region case. (Text Display): Fix description of escape-glyph face assignment. Remove unibye mode discussion. Update some parts for Unicode. Move glyphless chars documentation to Lisp manual. * doc/emacs/frames.texi (Tooltips): Document x-gtk-use-system-tooltips. * doc/lispref/display.texi (Glyphless Chars): New node.
-rw-r--r--doc/emacs/ChangeLog18
-rw-r--r--doc/emacs/basic.texi2
-rw-r--r--doc/emacs/display.texi493
-rw-r--r--doc/emacs/emacs.texi2
-rw-r--r--doc/emacs/frames.texi9
-rw-r--r--doc/emacs/macos.texi12
-rw-r--r--doc/lispref/ChangeLog4
-rw-r--r--doc/lispref/display.texi94
-rw-r--r--doc/lispref/elisp.texi3
-rw-r--r--doc/lispref/vol1.texi3
-rw-r--r--doc/lispref/vol2.texi3
-rw-r--r--etc/NEWS7
12 files changed, 359 insertions, 291 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index a39b703b4dd..5f7f63fca31 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,21 @@
12011-10-18 Chong Yidong <cyd@gnu.org>
2
3 * display.texi (Faces): Simplify discussion. Move documentation
4 of list-faces-display here, from Standard Faces node. Note
5 special role of `default' background.
6 (Standard Faces): Note special role of `default' background. Note
7 that region face may be taken fom GTK. Add xref to Text Display.
8 (Text Scale): Rename from "Temporary Face Changes". Callers
9 changed. Don't bother documenting variable-pitch-mode.
10 (Font Lock): Copyedits. Remove font-lock-maximum-size.
11 (Useless Whitespace): Simplify description of
12 delete-trailing-whitespace. Note active region case.
13 (Text Display): Fix description of escape-glyph face assignment.
14 Remove unibye mode discussion. Update some parts for Unicode.
15 Move glyphless chars documentation to Lisp manual.
16
17 * frames.texi (Tooltips): Document x-gtk-use-system-tooltips.
18
12011-10-15 Chong Yidong <cyd@stupidchicken.com> 192011-10-15 Chong Yidong <cyd@stupidchicken.com>
2 20
3 * display.texi (Scrolling): Tweak explanation of scroll direction. 21 * display.texi (Scrolling): Tweak explanation of scroll direction.
diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi
index e4e7dadd548..714e03720bc 100644
--- a/doc/emacs/basic.texi
+++ b/doc/emacs/basic.texi
@@ -109,7 +109,7 @@ command provides completion (@pxref{Completion}). If you enter a
109code-point, it should be a hexadecimal number (which is the convention 109code-point, it should be a hexadecimal number (which is the convention
110for Unicode). The command then inserts the corresponding character 110for Unicode). The command then inserts the corresponding character
111into the buffer. For example, both of the following insert the 111into the buffer. For example, both of the following insert the
112infinity sign (Unicode code-point @code{#x221E}): 112infinity sign (Unicode code-point @code{U+221E}):
113 113
114@example 114@example
115@kbd{C-x 8 @key{RET} infinity @key{RET}} 115@kbd{C-x 8 @key{RET} infinity @key{RET}}
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi
index d2f49c62e4a..68b2209ffba 100644
--- a/doc/emacs/display.texi
+++ b/doc/emacs/display.texi
@@ -21,7 +21,7 @@ the text is displayed.
21* Follow Mode:: Follow mode lets two windows scroll as one. 21* Follow Mode:: Follow mode lets two windows scroll as one.
22* Faces:: How to change the display style using faces. 22* Faces:: How to change the display style using faces.
23* Standard Faces:: Emacs' predefined faces. 23* Standard Faces:: Emacs' predefined faces.
24* Temporary Face Changes:: Commands to temporarily modify the default text face 24* Text Scale:: Increasing or decreasing text size in a buffer.
25* Font Lock:: Minor mode for syntactic highlighting using faces. 25* Font Lock:: Minor mode for syntactic highlighting using faces.
26* Highlight Interactively:: Tell Emacs what text to highlight. 26* Highlight Interactively:: Tell Emacs what text to highlight.
27* Fringes:: Enabling or disabling window fringes. 27* Fringes:: Enabling or disabling window fringes.
@@ -55,7 +55,7 @@ direction that the window moves relative to the text; this terminology
55was taken up by Emacs before the modern meaning of ``scrolling up'' 55was taken up by Emacs before the modern meaning of ``scrolling up''
56and ``scrolling down'' became widely adopted. Hence the strange 56and ``scrolling down'' became widely adopted. Hence the strange
57result that @key{PageDown} scrolls ``up'' in the Emacs sense. In this 57result that @key{PageDown} scrolls ``up'' in the Emacs sense. In this
58manual, we refer to scrolling ``foward'' and ``backward'' where 58manual, we refer to scrolling ``forward'' and ``backward'' where
59possible, in order to minimize confusion. 59possible, in order to minimize confusion.
60 60
61 The portion of a buffer displayed in a window always contains point. 61 The portion of a buffer displayed in a window always contains point.
@@ -439,76 +439,69 @@ one large window.
439@section Faces: Controlling Text Display Style 439@section Faces: Controlling Text Display Style
440@cindex faces 440@cindex faces
441 441
442 Emacs can display text in several different styles, which are called 442 Emacs can display text in several different styles, called
443@dfn{faces}. Each face can specify various @dfn{face attributes}, 443@dfn{faces}. Each face can specify various @dfn{face attributes},
444such as the font, height, weight and slant, the foreground and 444such as the font, height, weight, slant, foreground and background
445background color, and underlining or overlining. A face does not have 445color, and underlining or overlining. Most major modes assign faces
446to specify all of these attributes; often it inherits most of them 446to the text automatically, via Font Lock mode. @xref{Font Lock}, for
447from another face. 447more information about how these faces are assigned.
448 448
449 On a text-only terminal, not all face attributes are meaningful. 449@findex list-faces-display
450Some text-only terminals support inverse video, bold, and underline 450 To see what faces are currently defined, and what they look like,
451attributes; some support colors. Text-only terminals generally do not 451type @kbd{M-x list-faces-display}. With a prefix argument, this
452support changing the height, width or font. 452prompts for a regular expression, and displays only faces with names
453 453matching that regular expression (@pxref{Regexps}).
454 Most major modes assign faces to the text automatically through the 454
455work of Font Lock mode. @xref{Font Lock}, for more information about 455 It's possible for a given face to look different in different
456Font Lock mode and syntactic highlighting. You can print the current 456frames. For instance, some text-only terminals do not support all
457buffer with the highlighting that appears on your screen using the 457face attributes, particularly font, height, and width, and some
458command @code{ps-print-buffer-with-faces}. @xref{PostScript}. 458support a limited range of colors. The @code{list-faces-display}
459 459command shows the appearance for the selected frame.
460 Enriched mode, the mode for editing formatted text, provides
461commands and menus for specifying faces for text in the buffer.
462@xref{Format Faces}.
463 460
464@cindex face colors, setting 461@cindex face colors, setting
465 To alter the appearance of a face, use the customization buffer. 462@cindex background color
466@xref{Face Customization}. You can also use X resources to specify 463@cindex default face
467attributes of any particular face (@pxref{Resources}). When 464 You can customize a face to alter its appearance, and save those
468displaying a character, any attribute that isn't specified by its face 465changes for future Emacs sessions. @xref{Face Customization}. A face
469is taken from the @code{default} face, whose attributes reflect the 466does not have to specify every single attribute; often it inherits
470default settings of the frame itself. 467most attributes from another face. Any ultimately unspecified
468attribute is taken from a face named @code{default}, whose attributes
469are all specified. The @code{default} face is the default for
470displaying text, and its background color is also used as the frame's
471background color.
472
473 You can also use X resources to specify attributes of any particular
474face. @xref{Resources}.
471 475
472@findex set-face-foreground 476@findex set-face-foreground
473@findex set-face-background 477@findex set-face-background
474 You can also change the foreground and background colors of a 478 You can also change the foreground and background colors of a face
475specific face with @kbd{M-x set-face-foreground} and @kbd{M-x 479with @kbd{M-x set-face-foreground} and @kbd{M-x set-face-background}.
476set-face-background}. These commands prompt in the minibuffer for a 480These commands prompt in the minibuffer for a face name and a color
477face name and a color name, with completion, and then set that face to 481name, with completion, and then set that face to use the specified
478use the specified color. @xref{Face Customization}, for information 482color (@pxref{Face Customization}, for information about color names).
479about color names. These commands affect the face colors on all 483They affect the face colors on all frames, but their effects do not
480frames, both existing and those to be created in the future. These 484persist for future Emacs sessions, unlike using the customization
481changes do not, however, persist for future Emacs sessions; to make 485buffer or X resources. You can also use frame parameters to set
482lasting changes, use the customization buffer (@pxref{Face 486foreground and background colors for a specific frame; see @ref{Frame
483Customization}). 487Parameters}.
484 488
485 You can also set foreground and background colors for the current 489 Emacs can display variable-width fonts, but some Emacs commands,
486frame only; see @ref{Frame Parameters}. 490particularly indentation commands, do not account for variable
487 491character display widths. Therefore, we recommend not using
488 Emacs can display variable-width fonts, but some of the Emacs 492variable-width fonts for most faces, particularly those assigned by
489commands that calculate width and indentation do not know how to 493Font Lock mode.
490calculate variable widths. This can sometimes lead to incorrect
491results when you use variable-width fonts. In particular, indentation
492commands can give inconsistent results, so we recommend you avoid
493variable-width fonts, especially for editing program source code.
494 494
495@node Standard Faces 495@node Standard Faces
496@section Standard Faces 496@section Standard Faces
497 497
498@findex list-faces-display
499 To see what faces are currently defined, and what they look like,
500type @kbd{M-x list-faces-display}. It's possible for a given face to
501look different in different frames; this command shows the appearance
502in the frame in which you type it. With a prefix argument, this
503prompts for a regular expression, and displays only faces with names
504matching that regular expression.
505
506 Here are the standard faces for specifying text appearance. You can 498 Here are the standard faces for specifying text appearance. You can
507apply them to specific text when you want the effects they produce. 499apply them to specific text when you want the effects they produce.
508 500
509@table @code 501@table @code
510@item default 502@item default
511This face is used for ordinary text that doesn't specify any face. 503This face is used for ordinary text that doesn't specify any face.
504Its background color is used as the frame's background color.
512@item bold 505@item bold
513This face uses a bold variant of the default font. 506This face uses a bold variant of the default font.
514@item italic 507@item italic
@@ -535,37 +528,38 @@ their own faces for this purpose.)
535 528
536@table @code 529@table @code
537@item highlight 530@item highlight
538This face is used for highlighting portions of text, in various modes. 531This face is used for text highlighting in various contexts, such as
539For example, mouse-sensitive text is highlighted using this face. 532when the mouse cursor is moved over a hyperlink.
540@item isearch 533@item isearch
541This face is used for highlighting the current Isearch match 534This face is used to highlight the current Isearch match
542(@pxref{Incremental Search}). 535(@pxref{Incremental Search}).
543@item query-replace 536@item query-replace
544This face is used for highlighting the current Query Replace match 537This face is used to highlight the current Query Replace match
545(@pxref{Replace}). 538(@pxref{Replace}).
546@item lazy-highlight 539@item lazy-highlight
547This face is used for lazy highlighting of Isearch and Query Replace 540This face is used to highlight ``lazy matches'' for Isearch and Query
548matches other than the current one. 541Replace (matches other than the current one).
549@item region 542@item region
550This face is used for displaying a selected region (@pxref{Mark}). 543This face is used for displaying an active region (@pxref{Mark}).
544When Emacs is built with GTK support, its colors are taken from the
545current GTK theme.
551@item secondary-selection 546@item secondary-selection
552This face is used for displaying a secondary X selection (@pxref{Secondary 547This face is used for displaying a secondary X selection (@pxref{Secondary
553Selection}). 548Selection}).
554@item trailing-whitespace 549@item trailing-whitespace
555The face for highlighting excess spaces and tabs at the end of a line 550The face for highlighting excess spaces and tabs at the end of a line
556when @code{show-trailing-whitespace} is non-@code{nil}; see 551when @code{show-trailing-whitespace} is non-@code{nil} (@pxref{Useless
557@ref{Useless Whitespace}. 552Whitespace}).
558@item nobreak-space
559The face for displaying the character ``nobreak space.''
560@item escape-glyph 553@item escape-glyph
561The face for highlighting the @samp{\} or @samp{^} that indicates 554The face for displaying control characters and escape sequences
562a control character. It's also used when @samp{\} indicates a 555(@pxref{Text Display}).
563nobreak space or nobreak (soft) hyphen. 556@item nobreak-space
557The face for displaying ``non-breaking'' space characters (@pxref{Text
558Display}).
564@end table 559@end table
565 560
566 These faces control the appearance of parts of the Emacs frame. 561 The following faces control the appearance of parts of the Emacs
567They exist as faces to provide a consistent way to customize the 562frame:
568appearance of these parts of the frame.
569 563
570@table @code 564@table @code
571@item mode-line 565@item mode-line
@@ -588,11 +582,8 @@ at the top of a window just as the mode line appears at the bottom.
588Most windows do not have a header line---only some special modes, such 582Most windows do not have a header line---only some special modes, such
589Info mode, create one. 583Info mode, create one.
590@item vertical-border 584@item vertical-border
591This face is used for the vertical divider between windows. 585This face is used for the vertical divider between windows on
592By default this face inherits from the @code{mode-line-inactive} face 586text-only terminals.
593on character terminals. On graphical displays the foreground color of
594this face is used for the vertical line between windows without
595scrollbars.
596@item minibuffer-prompt 587@item minibuffer-prompt
597@cindex @code{minibuffer-prompt} face 588@cindex @code{minibuffer-prompt} face
598@vindex minibuffer-prompt-properties 589@vindex minibuffer-prompt-properties
@@ -607,35 +598,37 @@ The face for the fringes to the left and right of windows on graphic
607displays. (The fringes are the narrow portions of the Emacs frame 598displays. (The fringes are the narrow portions of the Emacs frame
608between the text area and the window's right and left borders.) 599between the text area and the window's right and left borders.)
609@xref{Fringes}. 600@xref{Fringes}.
610@item scroll-bar
611This face determines the visual appearance of the scroll bar.
612@xref{Scroll Bars}.
613@item border
614This face determines the color of the frame border.
615@item cursor 601@item cursor
616This face determines the color of the cursor. 602This face determines the color of the text cursor.
603@item tooltip
604This face is used for tooltip text. By default, if Emacs is built
605with GTK support, tooltips are drawn via GTK and this face has no
606effect. @xref{Tooltips}.
617@item mouse 607@item mouse
618This face determines the color of the mouse pointer. 608This face determines the color of the mouse pointer.
609@end table
610
611 The following faces likewise control the appearance of parts of the
612Emacs frame, but only on text-only terminals, or when Emacs is built
613on X with no toolkit support. (For all other cases, the appearance of
614the respective frame elements is determined by system-wide settings.)
615
616@table @code
617@item scroll-bar
618This face determines the visual appearance of the scroll bar.
619@xref{Scroll Bars}.
619@item tool-bar 620@item tool-bar
620This face determines the color of tool bar icons. @xref{Tool Bars}. 621This face determines the color of tool bar icons. @xref{Tool Bars}.
621@item tooltip
622This face is used for tooltips. @xref{Tooltips}.
623@item menu 622@item menu
624@cindex menu bar appearance 623@cindex menu bar appearance
625@cindex @code{menu} face, no effect if customized 624@cindex @code{menu} face, no effect if customized
626@cindex customization of @code{menu} face 625@cindex customization of @code{menu} face
627This face determines the colors and font of Emacs's menus. @xref{Menu 626This face determines the colors and font of Emacs's menus. @xref{Menu
628Bars}. This has no effect in Emacs built with GTK and in the 627Bars}.
629MS-Windows/Mac ports; you need to use system-wide styles and options
630to change the appearance of GTK, Windows, or Mac menus. Setting the
631font of LessTif/Motif menus is currently not supported; attempts to
632set the font are ignored in this case.
633@end table 628@end table
634 629
635@node Temporary Face Changes 630@node Text Scale
636@section Temporary Face Changes 631@section Text Scale
637
638The following commands change the default face within a buffer.
639 632
640@cindex adjust buffer face height 633@cindex adjust buffer face height
641@findex text-scale-adjust 634@findex text-scale-adjust
@@ -652,9 +645,11 @@ determine which action to take.
652 645
653 The final key of these commands may be repeated without the leading 646 The final key of these commands may be repeated without the leading
654@kbd{C-x}. For instance, @kbd{C-x C-= C-= C-=} increases the face 647@kbd{C-x}. For instance, @kbd{C-x C-= C-= C-=} increases the face
655height by three steps. Each step scales the height of the default 648height by three steps. Each step scales the text height by a factor
656face by the value of the variable @code{text-scale-mode-step}. As a 649of 1.2; to change this factor, customize the variable
657special case, an argument of 0 removes any scaling currently active. 650@code{text-scale-mode-step}. As an exception, a numeric argument of 0
651to the @code{text-scale-adjust} command restores the default height,
652similar to typing @kbd{C-x C-0}.
658 653
659@cindex increase buffer face height 654@cindex increase buffer face height
660@findex text-scale-increase 655@findex text-scale-increase
@@ -668,21 +663,14 @@ You may find it convenient to bind to these commands, rather than
668 663
669@cindex set buffer face height 664@cindex set buffer face height
670@findex text-scale-set 665@findex text-scale-set
671The command @code{text-scale-set} sets the height of the default face 666 The command @code{text-scale-set} scales the height of the default
672in the current buffer to an absolute level specified by its prefix 667face in the current buffer to an absolute level specified by its
673argument. 668prefix argument.
674 669
675@findex text-scale-mode 670@findex text-scale-mode
676 The above commands automatically enable or disable the minor mode 671 The above commands automatically enable the minor mode
677@code{text-scale-mode}, depending on whether the current font scaling 672@code{text-scale-mode} if the current font scaling is other than 1,
678is other than 1 or not. 673and disable it otherwise.
679
680@cindex variable pitch mode
681@findex variable-pitch-mode
682 To temporarily change the face in the current buffer to a
683variable-pitch (``proportional'') font, use the command @kbd{M-x
684variable-pitch-mode} to enable or disable the Variable Pitch minor
685mode.
686 674
687@node Font Lock 675@node Font Lock
688@section Font Lock mode 676@section Font Lock mode
@@ -691,41 +679,36 @@ mode.
691@cindex syntax highlighting and coloring 679@cindex syntax highlighting and coloring
692 680
693 Font Lock mode is a minor mode, always local to a particular buffer, 681 Font Lock mode is a minor mode, always local to a particular buffer,
694which highlights (or ``fontifies'') the buffer contents according to 682which assigns faces to (or @dfn{fontifies}) the text in the buffer.
695the syntax of the text you are editing. It can recognize comments and 683Each buffer's major mode tells Font Lock mode which text to fontify;
696strings in most programming languages; in several languages, it can 684for instance, programming language modes fontify syntactically
697also recognize and properly highlight various other important 685relevant constructs like comments, strings, and function names.
698constructs, such as names of functions being defined or reserved
699keywords. Some special modes, such as Occur mode and Info mode, have
700completely specialized ways of assigning fonts for Font Lock mode.
701 686
702@findex font-lock-mode 687@findex font-lock-mode
703 Font Lock mode is turned on by default in all modes which support it. 688 Font Lock mode is enabled by default. To toggle it in the current
704You can toggle font-lock for each buffer with the command @kbd{M-x 689buffer, type @kbd{M-x font-lock-mode}. A positive numeric argument
705font-lock-mode}. Using a positive argument unconditionally turns Font 690unconditionally enables Font Lock mode, and a negative or zero
706Lock mode on, and a negative or zero argument turns it off. 691argument disables it.
707 692
708@findex global-font-lock-mode 693@findex global-font-lock-mode
709@vindex global-font-lock-mode 694@vindex global-font-lock-mode
710 If you do not wish Font Lock mode to be turned on by default, 695 To toggle Font Lock mode in all buffers, type @kbd{M-x
711customize the variable @code{global-font-lock-mode} using the Customize 696global-font-lock-mode}. To impose this setting for future Emacs
712interface (@pxref{Easy Customization}), or use the function 697sessions, customize the variable @code{global-font-lock-mode}
713@code{global-font-lock-mode} in your @file{.emacs} file, like this: 698(@pxref{Easy Customization}), or add the following line to your init
699file:
714 700
715@example 701@example
716(global-font-lock-mode 0) 702(global-font-lock-mode 0)
717@end example 703@end example
718 704
719@noindent
720This variable, like all the variables that control Font Lock mode,
721take effect whenever fontification is done; that is, potentially at
722any time.
723
724@findex turn-on-font-lock 705@findex turn-on-font-lock
725 If you have disabled Global Font Lock mode, you can still enable Font 706@noindent
707If you have disabled Global Font Lock mode, you can still enable Font
726Lock for specific major modes by adding the function 708Lock for specific major modes by adding the function
727@code{turn-on-font-lock} to the mode hooks (@pxref{Hooks}). For 709@code{turn-on-font-lock} to the mode hooks (@pxref{Hooks}). For
728example, to enable Font Lock mode for editing C files, you can do this: 710example, to enable Font Lock mode for editing C files, you can do
711this:
729 712
730@example 713@example
731(add-hook 'c-mode-hook 'turn-on-font-lock) 714(add-hook 'c-mode-hook 'turn-on-font-lock)
@@ -739,27 +722,19 @@ use that customization buffer to customize the appearance of these
739faces. @xref{Face Customization}. 722faces. @xref{Face Customization}.
740 723
741@vindex font-lock-maximum-decoration 724@vindex font-lock-maximum-decoration
742 The variable @code{font-lock-maximum-decoration} specifies the 725 You can customize the variable @code{font-lock-maximum-decoration}
743preferred level of fontification, for modes that provide multiple 726to alter the amount of fontification applied by Font Lock mode, for
744levels. Level 1 is the least amount of fontification; some modes 727major modes that support this feature. The value should be a number
745support levels as high as 3. The normal default is ``as high as 728(with 1 representing a minimal amount of fontification; some modes
746possible.'' You can specify an integer, which applies to all modes, or 729support levels as high as 3); or @code{t}, meaning ``as high as
747you can specify different numbers for particular major modes; for 730possible'' (the default). You can also specify different numbers for
748example, to use level 1 for C/C++ modes, and the default level 731particular major modes; for example, to use level 1 for C/C++ modes,
749otherwise, use this: 732and the default level otherwise, use the value
750 733
751@example 734@example
752(setq font-lock-maximum-decoration 735'((c-mode . 1) (c++-mode . 1)))
753 '((c-mode . 1) (c++-mode . 1)))
754@end example 736@end example
755 737
756@vindex font-lock-maximum-size
757 Fontification can be too slow for large buffers, so you can suppress
758it for buffers above a certain size. The variable
759@code{font-lock-maximum-size} specifies a buffer size, beyond which
760buffer fontification is suppressed.
761
762@c @w is used below to prevent a bad page-break.
763@vindex font-lock-beginning-of-syntax-function 738@vindex font-lock-beginning-of-syntax-function
764@cindex incorrect fontification 739@cindex incorrect fontification
765@cindex parenthesis in column zero and fontification 740@cindex parenthesis in column zero and fontification
@@ -768,11 +743,10 @@ buffer fontification is suppressed.
768relies on analysis of the syntactic structure of the buffer text. For 743relies on analysis of the syntactic structure of the buffer text. For
769the sake of speed, some modes, including Lisp mode, rely on a special 744the sake of speed, some modes, including Lisp mode, rely on a special
770convention: an open-parenthesis or open-brace in the leftmost column 745convention: an open-parenthesis or open-brace in the leftmost column
771always defines the @w{beginning} of a defun, and is thus always 746always defines the beginning of a defun, and is thus always outside
772outside any string or comment. (@xref{Left Margin Paren}.) If you 747any string or comment. Therefore, you should avoid placing a an
773don't follow this convention, Font Lock mode can misfontify the text 748open-parenthesis or open-brace in the leftmost column, if it is inside
774that follows an open-parenthesis or open-brace in the leftmost column 749a string or comment. @xref{Left Margin Paren}, for details.
775that is inside a string or comment.
776 750
777@cindex slow display during scrolling 751@cindex slow display during scrolling
778 The variable @code{font-lock-beginning-of-syntax-function}, which is 752 The variable @code{font-lock-beginning-of-syntax-function}, which is
@@ -788,11 +762,11 @@ considerably slow down redisplay while scrolling, particularly if you
788are close to the end of a large buffer. 762are close to the end of a large buffer.
789 763
790@findex font-lock-add-keywords 764@findex font-lock-add-keywords
791 Font Lock highlighting patterns already exist for many modes, but you 765 Font Lock highlighting patterns already exist for most modes, but
792may want to fontify additional patterns. You can use the function 766you may want to fontify additional patterns. You can use the function
793@code{font-lock-add-keywords}, to add your own highlighting patterns for 767@code{font-lock-add-keywords}, to add your own highlighting patterns
794a particular mode. For example, to highlight @samp{FIXME:} words in C 768for a particular mode. For example, to highlight @samp{FIXME:} words
795comments, use this: 769in C comments, use this:
796 770
797@example 771@example
798(add-hook 'c-mode-hook 772(add-hook 'c-mode-hook
@@ -803,19 +777,20 @@ comments, use this:
803@end example 777@end example
804 778
805@findex font-lock-remove-keywords 779@findex font-lock-remove-keywords
806 To remove keywords from the font-lock highlighting patterns, use the 780@noindent
781To remove keywords from the font-lock highlighting patterns, use the
807function @code{font-lock-remove-keywords}. @xref{Search-based 782function @code{font-lock-remove-keywords}. @xref{Search-based
808Fontification,,, elisp, The Emacs Lisp Reference Manual}. 783Fontification,,, elisp, The Emacs Lisp Reference Manual}.
809 784
810@cindex just-in-time (JIT) font-lock 785@cindex just-in-time (JIT) font-lock
811@cindex background syntax highlighting 786@cindex background syntax highlighting
812 Fontifying large buffers can take a long time. To avoid large 787 Fontifying large buffers can take a long time. To avoid large
813delays when a file is visited, Emacs fontifies only the visible 788delays when a file is visited, Emacs initially fontifies only the
814portion of a buffer. As you scroll through the buffer, each portion 789visible portion of a buffer. As you scroll through the buffer, each
815that becomes visible is fontified as soon as it is displayed; this 790portion that becomes visible is fontified as soon as it is displayed;
816type of Font Lock is called @dfn{Just-In-Time} (or @dfn{JIT}) Lock. 791this type of Font Lock is called @dfn{Just-In-Time} (or @dfn{JIT})
817You can control how JIT Lock behaves, including telling it to perform 792Lock. You can control how JIT Lock behaves, including telling it to
818fontification while idle, by customizing variables in the 793perform fontification while idle, by customizing variables in the
819customization group @samp{jit-lock}. @xref{Specific Customization}. 794customization group @samp{jit-lock}. @xref{Specific Customization}.
820 795
821@node Highlight Interactively 796@node Highlight Interactively
@@ -826,7 +801,7 @@ customization group @samp{jit-lock}. @xref{Specific Customization}.
826 801
827@findex highlight-changes-mode 802@findex highlight-changes-mode
828Highlight Changes mode is a minor mode that @dfn{highlights} the parts 803Highlight Changes mode is a minor mode that @dfn{highlights} the parts
829of the buffer were changed most recently, by giving that text a 804of the buffer that were changed most recently, by giving that text a
830different face. To enable or disable Highlight Changes mode, use 805different face. To enable or disable Highlight Changes mode, use
831@kbd{M-x highlight-changes-mode}. 806@kbd{M-x highlight-changes-mode}.
832 807
@@ -931,21 +906,23 @@ mode's symbol is a member of the list @code{hi-lock-exclude-modes}.
931display symbols that provide information about the text in the window. 906display symbols that provide information about the text in the window.
932 907
933 The most common use of the fringes is to indicate a continuation 908 The most common use of the fringes is to indicate a continuation
934line, when one line of text is split into multiple lines on the 909line (@pxref{Continuation Lines}). When one line of text is split
935screen. The left fringe shows a curving arrow for each screen line 910into multiple screen lines, the left fringe shows a curving arrow for
936except the first, indicating that ``this is not the real beginning.'' 911each screen line except the first, indicating that ``this is not the
937The right fringe shows a curving arrow for each screen line except the 912real beginning.'' The right fringe shows a curving arrow for each
938last, indicating that ``this is not the real end.'' If the line's 913screen line except the last, indicating that ``this is not the real
939direction is right-to-left (@pxref{Bidirectional Editing}), the 914end.'' If the line's direction is right-to-left (@pxref{Bidirectional
940meaning of the curving arrows in the left and right fringes are 915Editing}), the meanings of the curving arrows in the fringes are
941swapped. 916swapped.
942 917
943 The fringes indicate line truncation with short horizontal arrows 918 The fringes indicate line truncation with short horizontal arrows
944meaning ``there's more text on this line which is scrolled 919meaning ``there's more text on this line which is scrolled
945horizontally out of view;'' clicking the mouse on one of the arrows 920horizontally out of view.'' Clicking the mouse on one of the arrows
946scrolls the display horizontally in the direction of the arrow. The 921scrolls the display horizontally in the direction of the arrow.
947fringes can also indicate other things, such as empty lines, or where a 922
948program you are debugging is executing (@pxref{Debuggers}). 923 The fringes can also indicate other things, such as buffer
924boundaries (@pxref{Displaying Boundaries}), and where a program you
925are debugging is executing (@pxref{Debuggers}).
949 926
950@findex set-fringe-style 927@findex set-fringe-style
951@findex fringe-mode 928@findex fringe-mode
@@ -958,10 +935,10 @@ for the selected frame, use @kbd{M-x set-fringe-style}.
958 935
959@vindex indicate-buffer-boundaries 936@vindex indicate-buffer-boundaries
960 On a graphical display, Emacs can indicate the buffer boundaries in 937 On a graphical display, Emacs can indicate the buffer boundaries in
961the fringes. It indicates the first line and the last line with 938the fringes. If you enable this feature, the first line and the last
962angle images in the fringes. This can be combined with up and down 939line are marked with angle images in the fringes. This can be
963arrow images which say whether it is possible to scroll the window up 940combined with up and down arrow images which say whether it is
964and down. 941possible to scroll the window.
965 942
966 The buffer-local variable @code{indicate-buffer-boundaries} controls 943 The buffer-local variable @code{indicate-buffer-boundaries} controls
967how the buffer boundaries and window scrolling is indicated in the 944how the buffer boundaries and window scrolling is indicated in the
@@ -1006,25 +983,22 @@ the location of point is enough to show you that the spaces are
1006present. 983present.
1007 984
1008@findex delete-trailing-whitespace 985@findex delete-trailing-whitespace
1009 Type @kbd{M-x delete-trailing-whitespace @key{RET}} to delete all 986 Type @kbd{M-x delete-trailing-whitespace} to delete all trailing
1010trailing whitespace within the buffer's accessible portion 987whitespace within the buffer. If the region is active, it deletes all
1011(@pxref{Narrowing}). This command does not remove newline characters. 988trailing whitespace in the region instead.
1012 989
1013@vindex indicate-empty-lines 990@vindex indicate-empty-lines
1014@cindex unused lines 991@cindex unused lines
1015@cindex fringes, and unused line indication 992@cindex fringes, and unused line indication
1016 Emacs can indicate unused lines at the end of the window with a 993 On graphical displays, Emacs can indicate unused lines at the end of
1017small image in the left fringe (@pxref{Fringes}). The image appears 994the window with a small image in the left fringe (@pxref{Fringes}).
1018for window lines that do not correspond to any buffer text. Blank 995The image appears for window lines that do not correspond to any
1019lines at the end of the buffer then stand out because they do not have 996buffer text. Blank lines at the end of the buffer then stand out
1020this image in the fringe. 997because they do not have this image in the fringe. To enable this
1021 998feature, set the buffer-local variable @code{indicate-empty-lines} to
1022 To enable this feature, set the buffer-local variable 999a non-@code{nil} value. You can enable or disable this feature for
1023@code{indicate-empty-lines} to a non-@code{nil} value. You can enable 1000all new buffers by setting the default value of this variable,
1024or disable this feature for all new buffers by setting the default 1001e.g.@:@code{(setq-default indicate-empty-lines t)}.
1025value of this variable, e.g.@: @code{(setq-default
1026indicate-empty-lines t)};. (This feature currently doesn't work on
1027text-only terminals.)
1028 1002
1029@node Selective Display 1003@node Selective Display
1030@section Selective Display 1004@section Selective Display
@@ -1178,11 +1152,10 @@ percentage of the total charge.
1178@cindex mode line, 3D appearance 1152@cindex mode line, 3D appearance
1179@cindex attributes of mode line, changing 1153@cindex attributes of mode line, changing
1180@cindex non-integral number of lines in a window 1154@cindex non-integral number of lines in a window
1181 By default, the mode line is drawn on graphics displays with 1155 On a graphical display, the mode line is drawn as a 3D box. If you
11823D-style highlighting, like that of a button when it is not being 1156don't like this effect, you can disable it by customizing the
1183pressed. If you don't like this effect, you can disable the 3D 1157@code{mode-line} face and setting its @code{box} attribute to
1184highlighting of the mode line, by customizing the attributes of the 1158@code{nil}. @xref{Face Customization}.
1185@code{mode-line} face. @xref{Face Customization}.
1186 1159
1187@cindex non-selected windows, mode line appearance 1160@cindex non-selected windows, mode line appearance
1188 By default, the mode line of nonselected windows is displayed in a 1161 By default, the mode line of nonselected windows is displayed in a
@@ -1210,51 +1183,45 @@ formats by setting each of the variables @code{eol-mnemonic-unix},
1210@node Text Display 1183@node Text Display
1211@section How Text Is Displayed 1184@section How Text Is Displayed
1212@cindex characters (in text) 1185@cindex characters (in text)
1186@cindex printing character
1213 1187
1214 @acronym{ASCII} printing characters (octal codes 040 through 0176) in Emacs 1188 Most characters are @dfn{printing characters}: when they appear in a
1215buffers are displayed with their graphics, as are non-@acronym{ASCII} multibyte 1189buffer, they are displayed literally on the screen. Printing
1216printing characters (octal codes above 0400). 1190characters include @acronym{ASCII} numbers, letters, and punctuation
1191characters, as well as many non-@acronym{ASCII} characters.
1217 1192
1218@vindex tab-width 1193@vindex tab-width
1219 Some @acronym{ASCII} control characters are displayed in special 1194@cindex control character
1220ways. The newline character (octal code 012) is displayed by starting 1195 The @acronym{ASCII} character set contains non-printing @dfn{control
1221a new line. The tab character (octal code 011) is displayed by moving 1196characters}. Two of these are displayed specially: the newline
1222to the next tab stop column (normally every 8 columns). The number of 1197character (Unicode code point @code{U+000A}) is displayed by starting
1223spaces per tab is controlled by the variable @code{tab-width}, which 1198a new line, while the tab character (@code{U+0009}) is displayed as a
1224must have an integer value between 1 and 1000, inclusive, and is made 1199space that extends to the next tab stop column (normally every 8
1225buffer-local by changing it. Note that how the tab character in the buffer 1200columns). The number of spaces per tab is controlled by the
1226is displayed has nothing to do with the definition of @key{TAB} as a 1201buffer-local variable @code{tab-width}, which must have an integer
1227command. 1202value between 1 and 1000, inclusive. Note that how the tab character
1228 1203in the buffer is displayed has nothing to do with the definition of
1229 Other @acronym{ASCII} control characters are normally displayed as a caret 1204@key{TAB} as a command.
1230(@samp{^}) followed by the non-control version of the character; thus, 1205
1231control-A is displayed as @samp{^A}. The caret appears in face 1206 Other @acronym{ASCII} control characters are displayed as a caret
1232@code{escape-glyph}. 1207(@samp{^}) followed by the non-control version of the character, with
1233 1208the @code{escape-glyph} face. For instance, the @samp{control-A}
1234 Non-@acronym{ASCII} characters 0200 through 0237 (octal) are 1209character, @code{U+0001}, is displayed as @samp{^A}.
1235displayed with octal escape sequences; thus, character code 0230
1236(octal) is displayed as @samp{\230}. The backslash appears in face
1237@code{escape-glyph}.
1238 1210
1239@vindex ctl-arrow 1211@vindex ctl-arrow
1240 If the variable @code{ctl-arrow} is @code{nil}, control characters in 1212 The non-@acronym{ASCII}, non-printing characters @code{U+0080}
1241the buffer are displayed with octal escape sequences, except for newline 1213(octal 200) through @code{U+009F} (octal 237) are displayed as octal
1242and tab. Altering the value of @code{ctl-arrow} makes it local to the 1214escape sequences, with the @code{escape-glyph} face. For instance,
1243current buffer; until that time, the default value is in effect. The 1215character code @code{U+0098} (octal 230) is displayed as @samp{\230}.
1244default is initially @code{t}. 1216If you change the buffer-local variable @code{ctl-arrow} to
1245 1217@code{nil}, @acronym{ASCII} control characters are also displayed as
1246 The display of character codes 0240 through 0377 (octal) may be 1218octal escape sequences instead of caret escape sequences.
1247either as escape sequences or as graphics. They do not normally occur
1248in multibyte buffers, but if they do, they are displayed as Latin-1
1249graphics. In unibyte mode, if you enable European display they are
1250displayed using their graphics (assuming your terminal supports them),
1251otherwise as escape sequences. @xref{Unibyte Mode}.
1252 1219
1253@vindex nobreak-char-display 1220@vindex nobreak-char-display
1254@cindex no-break space, display 1221@cindex non-breaking space, display
1255@cindex no-break hyphen, display 1222@cindex non-breaking hyphen, display
1256@cindex soft hyphen, display 1223@cindex soft hyphen, display
1257 Some character sets define ``no-break'' versions of the space and 1224 There are two special ``non-breaking'' versions of the space and
1258hyphen characters, which are used where a line should not be broken. 1225hyphen characters, which are used where a line should not be broken.
1259Emacs normally displays these characters with special faces 1226Emacs normally displays these characters with special faces
1260(respectively, @code{nobreak-space} and @code{escape-glyph}) to 1227(respectively, @code{nobreak-space} and @code{escape-glyph}) to
@@ -1269,45 +1236,13 @@ elisp, The Emacs Lisp Reference Manual}.
1269 1236
1270@cindex glyphless characters 1237@cindex glyphless characters
1271@cindex characters with no font glyphs 1238@cindex characters with no font glyphs
1272 On graphics displays, some characters could have no glyphs in any of 1239 On graphical displays, some characters may have no glyphs in any of
1273the fonts available to Emacs. On text terminals, some characters 1240the fonts available to Emacs. These @dfn{glyphless characters} are
1274could be impossible to encode with the terminal coding system 1241normally displayed as boxes containing the hexadecimal character code.
1275(@pxref{Terminal Coding}). Emacs can display such @dfn{glyphless} 1242You can control the display method by customizing the variable
1276characters using one of the following methods: 1243@code{glyphless-char-display-control}. @xref{Glyphless Chars,,
1277 1244Glyphless Character Display, elisp, The Emacs Lisp Reference Manual},
1278@table @code 1245for details.
1279@item zero-width
1280Don't display the character.
1281
1282@item thin-space
1283Display a thin space, 1-pixel wide on graphics displays or 1-character
1284wide on text terminals.
1285
1286@item empty-box
1287Display an empty box.
1288
1289@item acronym
1290Display the acronym of the character's name (such as @sc{zwnj} or
1291@sc{rlm}) in a box.
1292
1293@item hex-code
1294Display the Unicode codepoint of the character in hexadecimal
1295notation, in a box.
1296@end table
1297
1298@noindent
1299@cindex @code{glyphless-char} face
1300With the exception of @code{zero-width}, all other methods draw these
1301characters in a special face @code{glyphless-char}, which you can
1302customize.
1303
1304@vindex glyphless-char-display-control
1305@vindex char-acronym-table
1306To control what glyphless characters are displayed using which method,
1307customize the variable @code{glyphless-char-display-control}; see its
1308doc string for the details. For even finer control, set the elements
1309of 2 char-tables: @code{glyphless-char-display} and
1310@code{char-acronym-table}.
1311 1246
1312@node Cursor Display 1247@node Cursor Display
1313@section Displaying the Cursor 1248@section Displaying the Cursor
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
index 8a15c783fc0..44f1aed134e 100644
--- a/doc/emacs/emacs.texi
+++ b/doc/emacs/emacs.texi
@@ -350,7 +350,7 @@ Controlling the Display
350* Follow Mode:: Follow mode lets two windows scroll as one. 350* Follow Mode:: Follow mode lets two windows scroll as one.
351* Faces:: How to change the display style using faces. 351* Faces:: How to change the display style using faces.
352* Standard Faces:: Emacs' predefined faces. 352* Standard Faces:: Emacs' predefined faces.
353* Temporary Face Changes:: Commands to temporarily modify the default text face 353* Text Scale:: Increasing or decreasing text size in a buffer.
354* Font Lock:: Minor mode for syntactic highlighting using faces. 354* Font Lock:: Minor mode for syntactic highlighting using faces.
355* Highlight Interactively:: Tell Emacs what text to highlight. 355* Highlight Interactively:: Tell Emacs what text to highlight.
356* Fringes:: Enabling or disabling window fringes. 356* Fringes:: Enabling or disabling window fringes.
diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi
index 14fdb3121a4..4c239d364f0 100644
--- a/doc/emacs/frames.texi
+++ b/doc/emacs/frames.texi
@@ -299,7 +299,7 @@ you can access them without having to display the menu bar.
299 299
300@item S-Mouse-1 300@item S-Mouse-1
301This menu is for changing the default face within the window's buffer. 301This menu is for changing the default face within the window's buffer.
302@xref{Temporary Face Changes}. 302@xref{Text Scale}.
303@end table 303@end table
304 304
305@node Mode Line Mouse 305@node Mode Line Mouse
@@ -1185,6 +1185,13 @@ options for displaying tooltips, use @kbd{M-x customize-group
1185@key{RET} tooltip @key{RET}}. @xref{X Resources}, for information on 1185@key{RET} tooltip @key{RET}}. @xref{X Resources}, for information on
1186customizing the windows that display tooltips. 1186customizing the windows that display tooltips.
1187 1187
1188@vindex x-gtk-use-system-tooltips
1189 If Emacs is built with GTK support, it displays tooltips via GTK,
1190using the default appearance of GTK tooltips. To disable this, change
1191the variable @code{x-gtk-use-system-tooltips} to @code{nil}. If you
1192do this, or if Emacs is built without GTK support, the @code{tooltip}
1193face specifies most attributes of the tooltip text.
1194
1188@node Mouse Avoidance 1195@node Mouse Avoidance
1189@section Mouse Avoidance 1196@section Mouse Avoidance
1190@cindex avoiding mouse in the way of your typing 1197@cindex avoiding mouse in the way of your typing
diff --git a/doc/emacs/macos.texi b/doc/emacs/macos.texi
index 85d92c9fcd7..f4a5a2858cf 100644
--- a/doc/emacs/macos.texi
+++ b/doc/emacs/macos.texi
@@ -54,12 +54,12 @@ to change the foreground color of the face at that position (if the
54instead). To discard the settings, create a new frame and close the 54instead). To discard the settings, create a new frame and close the
55altered one. 55altered one.
56 56
57 @key{S-Mouse-1} (i.e., clicking the left mouse button 57 @key{S-Mouse-1} (i.e., clicking the left mouse button while holding
58while holding down the @key{Shift} key) adjusts the region to the 58down the @key{Shift} key) adjusts the region to the click position,
59click position, just like @key{Mouse-3} (@code{mouse-save-then-kill}); 59just like @key{Mouse-3} (@code{mouse-save-then-kill}); it does not pop
60it does not pop up a menu for changing the default face, as 60up a menu for changing the default face, as @key{S-Mouse-1} normally
61@key{S-Mouse-1} normally does (@pxref{Temporary Face Changes}). This 61does (@pxref{Text Scale}). This change makes Emacs behave more like
62change makes Emacs behave more like other Mac / GNUstep applications. 62other Mac / GNUstep applications.
63 63
64 When you open or save files using the menus, or using the 64 When you open or save files using the menus, or using the
65@key{Cmd-o} and @key{Cmd-S} bindings, Emacs uses graphical file 65@key{Cmd-o} and @key{Cmd-S} bindings, Emacs uses graphical file
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 345e69e6989..490280dae29 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,7 @@
12011-10-18 Chong Yidong <cyd@gnu.org>
2
3 * display.texi (Glyphless Chars): New node.
4
12011-10-13 Chong Yidong <cyd@stupidchicken.com> 52011-10-13 Chong Yidong <cyd@stupidchicken.com>
2 6
3 * text.texi (Yanking): Document yank-excluded-properties. 7 * text.texi (Yanking): Document yank-excluded-properties.
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 18cb93557e9..034d92f78c3 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -36,6 +36,7 @@ that Emacs presents to the user.
36* Window Systems:: Which window system is being used. 36* Window Systems:: Which window system is being used.
37* Bidirectional Display:: Display of bidirectional scripts, such as 37* Bidirectional Display:: Display of bidirectional scripts, such as
38 Arabic and Farsi. 38 Arabic and Farsi.
39* Glyphless Chars:: How glyphless characters are drawn.
39@end menu 40@end menu
40 41
41@node Refresh Screen 42@node Refresh Screen
@@ -6242,3 +6243,96 @@ affect all Emacs frames and windows.
6242appropriate mirrored character in the reordered text. Lisp programs 6243appropriate mirrored character in the reordered text. Lisp programs
6243can affect the mirrored display by changing this property. Again, any 6244can affect the mirrored display by changing this property. Again, any
6244such changes affect all of Emacs display. 6245such changes affect all of Emacs display.
6246
6247@node Glyphless Chars
6248@section Glyphless Character Display
6249@cindex glyphless characters
6250
6251 @dfn{Glyphless characters} are not displayed in the usual way when
6252they appear in a buffer, but in some special way (e.g. as a box
6253containing a hexadecimal code). These include characters that cannot
6254be displayed with any available font (on a graphical display), or that
6255cannot be encoded by the terminal's coding system (on a text-only
6256terminal). Specific characters can also be defined to be glyphless.
6257
6258@defvar glyphless-char-display
6259The value of this variable is a char-table that defines glyphless
6260characters and how they are displayed. If an entry is @code{nil}, the
6261corresponding character is displayed in its usual way. Otherwise, an
6262entry should be one of the following display methods:
6263
6264@table @asis
6265@item @code{zero-width}
6266Don't display the character.
6267
6268@item @code{thin-space}
6269Display a thin space, 1-pixel wide on graphical displays, or
62701-character wide on text-only terminals.
6271
6272@item @code{empty-box}
6273Display an empty box.
6274
6275@item @code{hex-code}
6276Display a box containing the Unicode codepoint of the character, in
6277hexadecimal notation.
6278
6279@item an @acronym{ASCII} string
6280Display a box containing that string.
6281@end table
6282
6283@noindent
6284Except for @code{zero-width}, these methods display using the
6285@code{glyphless-char} face.
6286
6287An entry can also be a cons cell @code{(@var{graphical}
6288. @var{text})}, where @var{graphical} and @var{text} are the display
6289methods on graphical displays and text-only terminals respectively.
6290
6291The char-table has one extra slot, which determines how to display any
6292character that cannot be displayed with any available font, or cannot
6293be encoded by the terminal's coding system. Its value should be one
6294of the above display methods, except @code{zero-width} or a cons cell.
6295@end defvar
6296
6297@defopt glyphless-char-display-control
6298This user option provides a convenient way to set
6299@code{glyphless-char-display} for groups of similar characters. It
6300takes effect via a custom @code{:set} function (@pxref{Variable
6301Definitions}), which update @code{glyphless-char-display}.
6302
6303Its value should be an alist of elements @code{(@var{group}
6304. @var{method})}, where @var{group} is a symbol specifying a group of
6305characters, and @var{method} is a symbol specifying how to display
6306them.
6307
6308@var{group} should be one of the following:
6309
6310@table @code
6311@item c0-control
6312@acronym{ASCII} control characters @code{U+0000} to @code{U+001F},
6313excluding the newline and tab characters (normally displayed as escape
6314sequences like @samp{^A}; @pxref{Text Display,, How Text Is Displayed,
6315emacs, The GNU Emacs Manual}).
6316
6317@item c1-control
6318Non-@acronym{ASCII}, non-printing characters @code{U+0080} to
6319@code{U+009F} (normally displayed as octal escape sequences like
6320@samp{\230}).
6321
6322@item format-control
6323Characters of Unicode General Category `Cf', such as @samp{U+200E}
6324(Left-to-Right Mark), but excluding characters that have graphic
6325images, such as @samp{U+00AD} (Soft Hyphen).
6326
6327@item no-font
6328Characters for there is no suitable font, or which cannot be encoded
6329by the terminal's coding system.
6330@end table
6331
6332@c FIXME: this can also be `acronym', but that's not currently
6333@c completely implemented; it applies only to the format-control
6334@c group, and only works if the acronym is in `char-acronym-table'.
6335The @var{method} symbol should be one of @code{zero-width},
6336@code{thin-space}, @code{empty-box}, or @code{hex-code}. These have
6337the same meanings as in @code{glyphless-char-display}, above.
6338@end defopt
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi
index 8350c9b7080..cefa917a4e1 100644
--- a/doc/lispref/elisp.texi
+++ b/doc/lispref/elisp.texi
@@ -1278,6 +1278,9 @@ Emacs Display
1278* Display Tables:: How to specify other conventions. 1278* Display Tables:: How to specify other conventions.
1279* Beeping:: Audible signal to the user. 1279* Beeping:: Audible signal to the user.
1280* Window Systems:: Which window system is being used. 1280* Window Systems:: Which window system is being used.
1281* Bidirectional Display:: Display of bidirectional scripts, such as
1282 Arabic and Farsi.
1283* Glyphless Chars:: How glyphless characters are drawn.
1281 1284
1282The Echo Area 1285The Echo Area
1283 1286
diff --git a/doc/lispref/vol1.texi b/doc/lispref/vol1.texi
index 0fa23d6412c..914ba5b1fd8 100644
--- a/doc/lispref/vol1.texi
+++ b/doc/lispref/vol1.texi
@@ -1299,6 +1299,9 @@ Emacs Display
1299* Display Tables:: How to specify other conventions. 1299* Display Tables:: How to specify other conventions.
1300* Beeping:: Audible signal to the user. 1300* Beeping:: Audible signal to the user.
1301* Window Systems:: Which window system is being used. 1301* Window Systems:: Which window system is being used.
1302* Bidirectional Display:: Display of bidirectional scripts, such as
1303 Arabic and Farsi.
1304* Glyphless Chars:: How glyphless characters are drawn.
1302 1305
1303The Echo Area 1306The Echo Area
1304 1307
diff --git a/doc/lispref/vol2.texi b/doc/lispref/vol2.texi
index 2469a742900..1f84b267c9b 100644
--- a/doc/lispref/vol2.texi
+++ b/doc/lispref/vol2.texi
@@ -1298,6 +1298,9 @@ Emacs Display
1298* Display Tables:: How to specify other conventions. 1298* Display Tables:: How to specify other conventions.
1299* Beeping:: Audible signal to the user. 1299* Beeping:: Audible signal to the user.
1300* Window Systems:: Which window system is being used. 1300* Window Systems:: Which window system is being used.
1301* Bidirectional Display:: Display of bidirectional scripts, such as
1302 Arabic and Farsi.
1303* Glyphless Chars:: How glyphless characters are drawn.
1301 1304
1302The Echo Area 1305The Echo Area
1303 1306
diff --git a/etc/NEWS b/etc/NEWS
index e12fe52e614..ce30ebb22b0 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -236,10 +236,10 @@ is taken from the desktop settings.
236The frame-parameter tool-bar-position controls this. It takes the values 236The frame-parameter tool-bar-position controls this. It takes the values
237top, left, right or bottom. The Options => Show/Hide menu has entries 237top, left, right or bottom. The Options => Show/Hide menu has entries
238for this. 238for this.
239 239+++
240*** The colors for selected text (the `region' face) are taken from 240*** The colors for selected text (the `region' face) are taken from
241the GTK theme when Emacs is built with GTK. 241the GTK theme when Emacs is built with GTK.
242 242+++
243*** Emacs uses GTK tooltips by default if built with GTK. You can turn that 243*** Emacs uses GTK tooltips by default if built with GTK. You can turn that
244off by customizing x-gtk-use-system-tooltips. 244off by customizing x-gtk-use-system-tooltips.
245 245
@@ -1146,6 +1146,7 @@ combined with minibuffer-local-must-match-map.
1146*** New variable `completing-read-function' allows overriding the 1146*** New variable `completing-read-function' allows overriding the
1147behavior of `completing-read'. 1147behavior of `completing-read'.
1148 1148
1149+++
1149** `glyphless-char-display' can now distinguish between graphical and 1150** `glyphless-char-display' can now distinguish between graphical and
1150text terminal display, via a char-table entry that is a cons cell. 1151text terminal display, via a char-table entry that is a cons cell.
1151 1152
@@ -1311,7 +1312,7 @@ Use `filter-buffer-substring-functions' instead.
1311*** `byte-compile-disable-print-circle' is obsolete. 1312*** `byte-compile-disable-print-circle' is obsolete.
1312 1313
1313*** `deferred-action-list' and `deferred-action-function' are obsolete. 1314*** `deferred-action-list' and `deferred-action-function' are obsolete.
1314 1315+++
1315*** `font-lock-maximum-size' is obsolete. 1316*** `font-lock-maximum-size' is obsolete.
1316 1317
1317 1318