comparison lispref/display.texi @ 9009:7cdfcd5e71ff

entered into RCS
author Richard M. Stallman <rms@gnu.org>
date Thu, 22 Sep 1994 22:00:06 +0000
parents b05788fd41f0
children 0a84a40f16d5
comparison
equal deleted inserted replaced
9008:be396da9c611 9009:7cdfcd5e71ff
46 46
47 Normally, suspending and resuming Emacs also refreshes the screen. 47 Normally, suspending and resuming Emacs also refreshes the screen.
48 Some terminal emulators record separate contents for display-oriented 48 Some terminal emulators record separate contents for display-oriented
49 programs such as Emacs and for ordinary sequential display. If you are 49 programs such as Emacs and for ordinary sequential display. If you are
50 using such a terminal, you might want to inhibit the redisplay on 50 using such a terminal, you might want to inhibit the redisplay on
51 resumption. @xref{Suspending Emacs}. 51 resumption.
52 52
53 @defvar no-redraw-on-reenter 53 @defvar no-redraw-on-reenter
54 @cindex suspend (cf. @code{no-redraw-on-reenter}) 54 @cindex suspend (cf. @code{no-redraw-on-reenter})
55 @cindex resume (cf. @code{no-redraw-on-reenter}) 55 @cindex resume (cf. @code{no-redraw-on-reenter})
56 This variable controls whether Emacs redraws the entire screen after it 56 This variable controls whether Emacs redraws the entire screen after it
69 @cindex screen size 69 @cindex screen size
70 @cindex display lines 70 @cindex display lines
71 @cindex display columns 71 @cindex display columns
72 @cindex resize redisplay 72 @cindex resize redisplay
73 73
74 The screen size functions report or tell Emacs the height or width of 74 The screen size functions access or specify the height or width of
75 the terminal. When you are using multiple frames, they apply to the 75 the terminal. When you are using multiple frames, they apply to the
76 selected frame (@pxref{Frames}). 76 selected frame (@pxref{Frames}).
77 77
78 @defun screen-height 78 @defun screen-height
79 This function returns the number of lines on the screen that are 79 This function returns the number of lines on the screen that are
240 the text. Outline mode uses this variant. In the second variant, the 240 the text. Outline mode uses this variant. In the second variant, the
241 choice of lines to hide is made automatically based on indentation. 241 choice of lines to hide is made automatically based on indentation.
242 This variant is designed as a user-level feature. 242 This variant is designed as a user-level feature.
243 243
244 The way you control explicit selective display is by replacing a 244 The way you control explicit selective display is by replacing a
245 newline (control-j) with a carriage return (control-m). The text which 245 newline (control-j) with a carriage return (control-m). The text that
246 was formerly a line following that newline is now invisible. Strictly 246 was formerly a line following that newline is now invisible. Strictly
247 speaking, it is temporarily no longer a line at all, since only newlines 247 speaking, it is temporarily no longer a line at all, since only newlines
248 can separate lines; it is now part of the previous line. 248 can separate lines; it is now part of the previous line.
249 249
250 Selective display does not directly affect editing commands. For 250 Selective display does not directly affect editing commands. For
348 to a particular line in a buffer. For example, in the modes used for 348 to a particular line in a buffer. For example, in the modes used for
349 interface to debuggers, the overlay arrow indicates the line of code 349 interface to debuggers, the overlay arrow indicates the line of code
350 about to be executed. 350 about to be executed.
351 351
352 @defvar overlay-arrow-string 352 @defvar overlay-arrow-string
353 This variable holds the string to display as an arrow, or @code{nil} if 353 This variable holds the string to display to call attention to a
354 the arrow feature is not in use. 354 particular line, or @code{nil} if the arrow feature is not in use.
355 @end defvar 355 @end defvar
356 356
357 @defvar overlay-arrow-position 357 @defvar overlay-arrow-position
358 This variable holds a marker which indicates where to display the arrow. 358 This variable holds a marker that indicates where to display the overlay
359 It should point at the beginning of a line. The arrow text appears at 359 arrow. It should point at the beginning of a line. The arrow text
360 the beginning of that line, overlaying any text that would otherwise 360 appears at the beginning of that line, overlaying any text that would
361 appear. Since the arrow is usually short, and the line usually begins 361 otherwise appear. Since the arrow is usually short, and the line
362 with indentation, normally nothing significant is overwritten. 362 usually begins with indentation, normally nothing significant is
363 363 overwritten.
364 The overlay string is displayed only in the buffer which this marker 364
365 The overlay string is displayed only in the buffer that this marker
365 points into. Thus, only one buffer can have an overlay arrow at any 366 points into. Thus, only one buffer can have an overlay arrow at any
366 given time. 367 given time.
367 @c !!! overlay-arrow-position: but the overlay string may remain in the display 368 @c !!! overlay-arrow-position: but the overlay string may remain in the display
368 @c of some other buffer until an update is required. This should be fixed 369 @c of some other buffer until an update is required. This should be fixed
369 @c now. Is it? 370 @c now. Is it?
417 @end group 418 @end group
418 @end example 419 @end example
419 @end defspec 420 @end defspec
420 421
421 @defvar temp-buffer-show-function 422 @defvar temp-buffer-show-function
422 If this variable, if non-@code{nil}, @code{with-output-to-temp-buffer} 423 If this variable is non-@code{nil}, @code{with-output-to-temp-buffer}
423 calls it as a function to do the job of displaying a help buffer. The 424 calls it as a function to do the job of displaying a help buffer. The
424 function gets one argument, which is the buffer it should display. 425 function gets one argument, which is the buffer it should display.
425 426
426 In Emacs versions 18 and earlier, this variable was called 427 In Emacs versions 18 and earlier, this variable was called
427 @code{temp-buffer-show-hook}. 428 @code{temp-buffer-show-hook}.
481 @node Overlays 482 @node Overlays
482 @section Overlays 483 @section Overlays
483 @cindex overlays 484 @cindex overlays
484 485
485 You can use @dfn{overlays} to alter the appearance of a buffer's text on 486 You can use @dfn{overlays} to alter the appearance of a buffer's text on
486 the screen. An overlay is an object which belongs to a particular 487 the screen. An overlay is an object that belongs to a particular
487 buffer, and has a specified beginning and end. It also has properties 488 buffer, and has a specified beginning and end. It also has properties
488 that you can examine and set; these affect the display of the text 489 that you can examine and set; these affect the display of the text
489 within the overlay. 490 within the overlay.
490 491
491 @menu 492 @menu
600 601
601 This section describes the functions to create, delete and move 602 This section describes the functions to create, delete and move
602 overlays, and to examine their contents. 603 overlays, and to examine their contents.
603 604
604 @defun make-overlay start end &optional buffer 605 @defun make-overlay start end &optional buffer
605 This function creates and returns an overlay which belongs to 606 This function creates and returns an overlay that belongs to
606 @var{buffer} and ranges from @var{start} to @var{end}. Both @var{start} 607 @var{buffer} and ranges from @var{start} to @var{end}. Both @var{start}
607 and @var{end} must specify buffer positions; they may be integers or 608 and @var{end} must specify buffer positions; they may be integers or
608 markers. If @var{buffer} is omitted, the overlay is created in the 609 markers. If @var{buffer} is omitted, the overlay is created in the
609 current buffer. 610 current buffer.
610 @end defun 611 @end defun
733 zero, which is used for all text that doesn't somehow specify another 734 zero, which is used for all text that doesn't somehow specify another
734 face. 735 face.
735 736
736 @item 737 @item
737 With text properties. A character may have a @code{face} property; if so, 738 With text properties. A character may have a @code{face} property; if so,
738 it's displayed with that face. @xref{Special Properties}. 739 it is displayed with that face. @xref{Special Properties}.
739 740
740 If the character has a @code{mouse-face} property, that is used instead 741 If the character has a @code{mouse-face} property, that is used instead
741 of the @code{face} property when the mouse is ``near enough'' to the 742 of the @code{face} property when the mouse is ``near enough'' to the
742 character. 743 character.
743 744
801 otherwise, they affect all frames as well as the defaults that apply to 802 otherwise, they affect all frames as well as the defaults that apply to
802 new frames. 803 new frames.
803 804
804 @defun set-face-foreground face color &optional frame 805 @defun set-face-foreground face color &optional frame
805 @defunx set-face-background face color &optional frame 806 @defunx set-face-background face color &optional frame
806 These functions set the foreground (respectively, background) color of 807 These functions set the foreground (or background, respectively) color
807 face @var{face} to @var{color}. The argument @var{color} should be a 808 of face @var{face} to @var{color}. The argument @var{color} should be a
808 string, the name of a color. 809 string, the name of a color.
809 @end defun 810 @end defun
810 811
811 @defun set-face-font face font &optional frame 812 @defun set-face-font face font &optional frame
812 This function sets the font of face @var{face}. The argument @var{font} 813 This function sets the font of face @var{face}. The argument @var{font}
819 @end defun 820 @end defun
820 821
821 @defun invert-face face &optional frame 822 @defun invert-face face &optional frame
822 Swap the foreground and background colors of face @var{face}. If the 823 Swap the foreground and background colors of face @var{face}. If the
823 face doesn't specify both foreground and background, then its foreground 824 face doesn't specify both foreground and background, then its foreground
824 and background are set to the default background and foreground. 825 and background are set to the default background and foreground,
826 respectively.
825 @end defun 827 @end defun
826 828
827 These functions examine the attributes of a face. If you don't 829 These functions examine the attributes of a face. If you don't
828 specify @var{frame}, they refer to the default data for new frames. 830 specify @var{frame}, they refer to the default data for new frames.
829 831
830 @defun face-foreground face &optional frame 832 @defun face-foreground face &optional frame
831 @defunx face-background face &optional frame 833 @defunx face-background face &optional frame
832 These functions return the foreground (respectively, background) color 834 These functions return the foreground color (or background color,
833 of face @var{face}, as a string. 835 respectively) of face @var{face}, as a string.
834 @end defun 836 @end defun
835 837
836 @defun face-font face &optional frame 838 @defun face-font face &optional frame
837 This function returns the name of the font of face @var{face}. 839 This function returns the name of the font of face @var{face}.
838 @end defun 840 @end defun
968 @item 970 @item
969 Character code 10 is a newline. 971 Character code 10 is a newline.
970 972
971 @item 973 @item
972 All other codes in the range 0 through 31, and code 127, display in one 974 All other codes in the range 0 through 31, and code 127, display in one
973 of two ways according to the value of @code{ctl-arrow}. If it is is 975 of two ways according to the value of @code{ctl-arrow}. If it is
974 non-@code{nil}, these codes map to sequences of two glyphs, where the 976 non-@code{nil}, these codes map to sequences of two glyphs, where the
975 first glyph is the @sc{ASCII} code for @samp{^}. (A display table can 977 first glyph is the @sc{ASCII} code for @samp{^}. (A display table can
976 specify a glyph to use instead of @samp{^}.) Otherwise, these codes map 978 specify a glyph to use instead of @samp{^}.) Otherwise, these codes map
977 just like the codes in the range 128 to 255. 979 just like the codes in the range 128 to 255.
978 980
1181 ;; @r{(Codes 128--159 are the additional control characters.)} 1183 ;; @r{(Codes 128--159 are the additional control characters.)}
1182 (standard-display-8bit 160 255) 1184 (standard-display-8bit 160 255)
1183 @end example 1185 @end example
1184 1186
1185 If you are editing buffers written in the ISO Latin 1 character set and 1187 If you are editing buffers written in the ISO Latin 1 character set and
1186 your terminal doesn't handle anything but @sc{ASCII}, you can load the file 1188 your terminal doesn't handle anything but @sc{ASCII}, you can load the
1187 @file{iso-ascii} to set up a display table which makes the other ISO 1189 file @file{iso-ascii} to set up a display table that displays the other
1188 characters display as sequences of @sc{ASCII} characters. For example, the 1190 ISO characters as explanatory sequences of @sc{ASCII} characters. For
1189 character ``o with umlaut'' displays as @samp{@{"o@}}. 1191 example, the character ``o with umlaut'' displays as @samp{@{"o@}}.
1190 1192
1191 Some European countries have terminals that don't support ISO Latin 1 1193 Some European countries have terminals that don't support ISO Latin 1
1192 but do support the special characters for that country's language. You 1194 but do support the special characters for that country's language. You
1193 can define a display table to work one language using such terminals. 1195 can define a display table to work one language using such terminals.
1194 For an example, see @file{lisp/iso-swed.el}, which handles certain 1196 For an example, see @file{lisp/iso-swed.el}, which handles certain