comparison lispref/frames.texi @ 52144:85f4da4e24de

(Parameter Access): Add modify-all-frames-parameters. (Window Frame Parameters): Make separate table of parameters that are coupled with specific face attributes. (Deleting Frames): delete-frame-hooks renamed to delete-frame-functions.
author Richard M. Stallman <rms@gnu.org>
date Wed, 06 Aug 2003 01:32:23 +0000
parents 23a1cea22d13
children 695cf19ef79e
comparison
equal deleted inserted replaced
52143:3b706f94b559 52144:85f4da4e24de
223 @code{(@var{parm} . @var{value})}, where @var{parm} is a symbol naming a 223 @code{(@var{parm} . @var{value})}, where @var{parm} is a symbol naming a
224 parameter. If you don't mention a parameter in @var{alist}, its value 224 parameter. If you don't mention a parameter in @var{alist}, its value
225 doesn't change. 225 doesn't change.
226 @end defun 226 @end defun
227 227
228 @defun modify-all-frames-parameters alist
229 This function alters the frame parameters of all existing frames
230 according to @var{alist}, then modifies @code{default-frame-alist}
231 to apply the same parameter values to frames that will be created
232 henceforth.
233 @end defun
234
228 @node Initial Parameters 235 @node Initial Parameters
229 @subsection Initial Frame Parameters 236 @subsection Initial Frame Parameters
230 237
231 You can specify the parameters for the initial startup frame 238 You can specify the parameters for the initial startup frame
232 by setting @code{initial-frame-alist} in your init file (@pxref{Init File}). 239 by setting @code{initial-frame-alist} in your init file (@pxref{Init File}).
421 428
422 @item buffer-list 429 @item buffer-list
423 A list of buffers that have been selected in this frame, 430 A list of buffers that have been selected in this frame,
424 ordered most-recently-selected first. 431 ordered most-recently-selected first.
425 432
426 @item font
427 The name of the font for displaying text in the frame. This is a
428 string, either a valid font name for your system or the name of an Emacs
429 fontset (@pxref{Fontsets}). Changing this frame parameter on a frame
430 also changes the font-related attributes of the default face on that
431 frame.
432
433 @item auto-raise 433 @item auto-raise
434 Whether selecting the frame raises it (non-@code{nil} means yes). 434 Whether selecting the frame raises it (non-@code{nil} means yes).
435 435
436 @item auto-lower 436 @item auto-lower
437 Whether deselecting the frame lowers it (non-@code{nil} means yes). 437 Whether deselecting the frame lowers it (non-@code{nil} means yes).
445 Whether the frame has scroll bars for horizontal scrolling 445 Whether the frame has scroll bars for horizontal scrolling
446 (non-@code{nil} means yes). (Horizontal scroll bars are not currently 446 (non-@code{nil} means yes). (Horizontal scroll bars are not currently
447 implemented.) 447 implemented.)
448 448
449 @item scroll-bar-width 449 @item scroll-bar-width
450 The width of the vertical scroll bar, in pixels. 450 The width of the vertical scroll bar, in pixels,
451 or @code{nil} meaning to use the default width.
451 452
452 @item icon-type 453 @item icon-type
453 The type of icon to use for this frame when it is iconified. If the 454 The type of icon to use for this frame when it is iconified. If the
454 value is a string, that specifies a file containing a bitmap to use. 455 value is a string, that specifies a file containing a bitmap to use.
455 Any other non-@code{nil} value specifies the default bitmap icon (a 456 Any other non-@code{nil} value specifies the default bitmap icon (a
457 458
458 @item icon-name 459 @item icon-name
459 The name to use in the icon for this frame, when and if the icon 460 The name to use in the icon for this frame, when and if the icon
460 appears. If this is @code{nil}, the frame's title is used. 461 appears. If this is @code{nil}, the frame's title is used.
461 462
462 @item foreground-color
463 The color to use for the image of a character. This is a string; the
464 window system defines the meaningful color names. Changing this
465 parameter is equivalent to changing the foreground color of the face
466 @code{default} on the frame in question.
467
468 @item background-color
469 The color to use for the background of characters. Changing this
470 parameter is equivalent to changing the foreground color of the face
471 @code{default} on the frame in question.
472
473 @item background-mode 463 @item background-mode
474 This parameter is either @code{dark} or @code{light}, according 464 This parameter is either @code{dark} or @code{light}, according
475 to whether the background color is a light one or a dark one. 465 to whether the background color is a light one or a dark one.
476
477 @item mouse-color
478 The color for the mouse pointer. Changing this parameter is equivalent
479 to changing the background color of face @code{mouse}.
480
481 @item cursor-color
482 The color for the cursor that shows point. Changing this parameter is
483 equivalent to changing the background color of face @code{cursor}.
484
485 @item border-color
486 The color for the border of the frame. Changing this parameter is
487 equivalent to changing the background color of face @code{border}.
488 466
489 @item tty-color-mode 467 @item tty-color-mode
490 @cindex standard colors for character terminals 468 @cindex standard colors for character terminals
491 This parameter overrides the terminal's color support as given by the 469 This parameter overrides the terminal's color support as given by the
492 system's terminal capabilities database in that this parameter's value 470 system's terminal capabilities database in that this parameter's value
497 the ANSI escape sequences for 8 standard text colors; and a value of 475 the ANSI escape sequences for 8 standard text colors; and a value of
498 -1 means Emacs should turn off color support. If the parameter's 476 -1 means Emacs should turn off color support. If the parameter's
499 value is a symbol, that symbol is looked up in the alist 477 value is a symbol, that symbol is looked up in the alist
500 @code{tty-color-mode-alist}, and if found, the associated number is 478 @code{tty-color-mode-alist}, and if found, the associated number is
501 used as the color support mode. 479 used as the color support mode.
502
503 @item scroll-bar-foreground
504 If non-@code{nil}, the color for the foreground of scroll bars.
505 Changing this parameter is equivalent to setting the foreground color of
506 face @code{scroll-bar}.
507
508 @item scroll-bar-background
509 If non-@code{nil}, the color for the background of scroll bars.
510 Changing this parameter is equivalent to setting the background color of
511 face @code{scroll-bar}.
512 480
513 @item display-type 481 @item display-type
514 This parameter describes the range of possible colors that can be used 482 This parameter describes the range of possible colors that can be used
515 in this frame. Its value is @code{color}, @code{grayscale} or 483 in this frame. Its value is @code{color}, @code{grayscale} or
516 @code{mono}. 484 @code{mono}.
545 The width in pixels of the window border. 513 The width in pixels of the window border.
546 514
547 @item internal-border-width 515 @item internal-border-width
548 The distance in pixels between text and border. 516 The distance in pixels between text and border.
549 517
518 @item left-fringe
519 @itemx right-fringe
520 The default width of the left and right fringes of windows in this
521 frame (@pxref{Fringes}). If either of these is zero, that effectively
522 removes the corresponding fringe. A value of @code{nil} stands for
523 the standard fringe width, which is the width needed to display the
524 fringe bitmaps.
525
526 The combined fringe widths must add up to an integral number of
527 columns, so the actual default fringe widths for the frame may be
528 larger than the specified values. The extra width needed to reach an
529 acceptable total is distributed evenly between the left and right
530 fringe. However, you can force one frame or the other to a precise
531 width by specifying that width a negative integer. If both widths are
532 negative, only the left fringe gets the specified width.
533
550 @item unsplittable 534 @item unsplittable
551 If non-@code{nil}, this frame's window is never split automatically. 535 If non-@code{nil}, this frame's window is never split automatically.
552 536
553 @item visibility 537 @item visibility
554 The state of visibility of the frame. There are three possibilities: 538 The state of visibility of the frame. There are three possibilities:
609 if the type is not mentioned as an @var{on-state} here. Changes 593 if the type is not mentioned as an @var{on-state} here. Changes
610 in this variable do not take effect immediately, because the variable 594 in this variable do not take effect immediately, because the variable
611 is examined only when you specify a cursor type for a frame. 595 is examined only when you specify a cursor type for a frame.
612 @end defvar 596 @end defvar
613 597
598 These frame parameters are semi-obsolete in that they are automatically
599 equivalent to particular face attributes of particular faces.
600
601 @table @code
602 @item font
603 The name of the font for displaying text in the frame. This is a
604 string, either a valid font name for your system or the name of an Emacs
605 fontset (@pxref{Fontsets}). It is equivalent to the @code{font}
606 attribute of the @code{default} face.
607
608 @item foreground-color
609 The color to use for the image of a character. It is equivalent to
610 the @code{:foreground} attribute of the @code{default} face.
611
612 @item background-color
613 The color to use for the background of characters. It is equivalent to
614 the @code{:background} attribute of the @code{default} face.
615
616 @item mouse-color
617 The color for the mouse pointer. It is equivalent to the @code{:background}
618 attribute of the @code{mouse} face.
619
620 @item cursor-color
621 The color for the cursor that shows point. It is equivalent to the
622 @code{:background} attribute of the @code{cursor} face.
623
624 @item border-color
625 The color for the border of the frame. It is equivalent to the
626 @code{:background} attribute of the @code{border} face.
627
628 @item scroll-bar-foreground
629 If non-@code{nil}, the color for the foreground of scroll bars. It is
630 equivalent to the @code{:foreground} attribute of the
631 @code{scroll-bar} face.
632
633 @item scroll-bar-background
634 If non-@code{nil}, the color for the background of scroll bars. It is
635 equivalent to the @code{:background} attribute of the
636 @code{scroll-bar} face.
637 @end table
638
614 @node Size and Position 639 @node Size and Position
615 @subsection Frame Size And Position 640 @subsection Frame Size And Position
616 @cindex size of frame 641 @cindex size of frame
617 @cindex screen size 642 @cindex screen size
618 @cindex frame size 643 @cindex frame size
796 way to cancel the deletion of a frame aside from restoring a saved frame 821 way to cancel the deletion of a frame aside from restoring a saved frame
797 configuration (@pxref{Frame Configurations}); this is similar to the 822 configuration (@pxref{Frame Configurations}); this is similar to the
798 way windows behave. 823 way windows behave.
799 824
800 @deffn Command delete-frame &optional frame force 825 @deffn Command delete-frame &optional frame force
801 @vindex delete-frame-hook 826 @vindex delete-frame-functions
802 This function deletes the frame @var{frame} after running the hook 827 This function deletes the frame @var{frame} after running the hook
803 @code{delete-frame-hook}. By default, @var{frame} is the selected 828 @code{delete-frame-functions} (each function gets one argument,
804 frame. 829 @var{frame}). By default, @var{frame} is the selected frame.
805 830
806 A frame cannot be deleted if its minibuffer is used by other frames. 831 A frame cannot be deleted if its minibuffer is used by other frames.
807 Normally, you cannot delete a frame if all other frames are invisible, 832 Normally, you cannot delete a frame if all other frames are invisible,
808 but if the @var{force} is non-@code{nil}, then you are allowed to do so. 833 but if the @var{force} is non-@code{nil}, then you are allowed to do so.
809 @end deffn 834 @end deffn