diff options
| author | Paul Eggert | 2016-01-30 13:56:23 -0800 |
|---|---|---|
| committer | Paul Eggert | 2016-01-30 13:56:23 -0800 |
| commit | 99fa8c3dbf333f1e3fa7d6449d4b4428ce439ce1 (patch) | |
| tree | fc459c16ca5f7204aa5a21529f8a189bfb45f831 /doc/lispref | |
| parent | 3005605776955593e0b416de9e1ebf158114343e (diff) | |
| parent | 875577bcc8d6139d61f91118d0907b847912b3e1 (diff) | |
| download | emacs-99fa8c3dbf333f1e3fa7d6449d4b4428ce439ce1.tar.gz emacs-99fa8c3dbf333f1e3fa7d6449d4b4428ce439ce1.zip | |
-
Diffstat (limited to 'doc/lispref')
| -rw-r--r-- | doc/lispref/control.texi | 55 | ||||
| -rw-r--r-- | doc/lispref/customize.texi | 3 | ||||
| -rw-r--r-- | doc/lispref/display.texi | 113 | ||||
| -rw-r--r-- | doc/lispref/frames.texi | 9 | ||||
| -rw-r--r-- | doc/lispref/windows.texi | 73 |
5 files changed, 193 insertions, 60 deletions
diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi index 6fa802d9fdd..3f48c458c02 100644 --- a/doc/lispref/control.texi +++ b/doc/lispref/control.texi | |||
| @@ -304,15 +304,15 @@ is useful to select alternatives based on more general conditions that | |||
| 304 | distinguish between broad classes of values. The @code{pcase} macro | 304 | distinguish between broad classes of values. The @code{pcase} macro |
| 305 | allows you to choose between alternatives based on matching the value | 305 | allows you to choose between alternatives based on matching the value |
| 306 | of an expression against a series of patterns. A pattern can be a | 306 | of an expression against a series of patterns. A pattern can be a |
| 307 | literal value (comparison to literal values is what @code{cond} does), | 307 | literal value (for comparisons to literal values you'd use |
| 308 | or it can be a more general description of the expected structure of | 308 | @code{cond}), or it can be a more general description of the expected |
| 309 | the expression's value. | 309 | structure of the expression's value. |
| 310 | 310 | ||
| 311 | @defmac pcase expression &rest clauses | 311 | @defmac pcase expression &rest clauses |
| 312 | Evaluate @var{expression} and choose among an arbitrary number of | 312 | Evaluate @var{expression} and choose among an arbitrary number of |
| 313 | alternatives based on the value of @var{expression}. The possible | 313 | alternatives based on the value of @var{expression}. The possible |
| 314 | alternatives are specified by @var{clauses}, each of which must be a | 314 | alternatives are specified by @var{clauses}, each of which must be a |
| 315 | list of the form @code{(@var{pattern} @var{body-forms})}. | 315 | list of the form @code{(@var{pattern} @var{body-forms}@dots{})}. |
| 316 | @code{pcase} tries to match the value of @var{expression} to the | 316 | @code{pcase} tries to match the value of @var{expression} to the |
| 317 | @var{pattern} of each clause, in textual order. If the value matches, | 317 | @var{pattern} of each clause, in textual order. If the value matches, |
| 318 | the clause succeeds; @code{pcase} then evaluates its @var{body-forms}, | 318 | the clause succeeds; @code{pcase} then evaluates its @var{body-forms}, |
| @@ -328,7 +328,7 @@ Note: In the description of the patterns below, we use ``the value | |||
| 328 | being matched'' to refer to the value of the @var{expression} that is | 328 | being matched'' to refer to the value of the @var{expression} that is |
| 329 | the first argument of @code{pcase}. | 329 | the first argument of @code{pcase}. |
| 330 | 330 | ||
| 331 | A UPattern can have one of the following forms: | 331 | A UPattern can have the following forms: |
| 332 | 332 | ||
| 333 | @table @code | 333 | @table @code |
| 334 | 334 | ||
| @@ -337,7 +337,8 @@ Matches if the value being matched is @code{equal} to @var{val}. | |||
| 337 | @item @var{atom} | 337 | @item @var{atom} |
| 338 | Matches any @var{atom}, which can be a keyword, a number, or a string. | 338 | Matches any @var{atom}, which can be a keyword, a number, or a string. |
| 339 | (These are self-quoting, so this kind of UPattern is actually a | 339 | (These are self-quoting, so this kind of UPattern is actually a |
| 340 | shorthand for @code{'@var{atom}}.) | 340 | shorthand for @code{'@var{atom}}.) Note that a string or a float |
| 341 | matches any string or float with the same contents/value. | ||
| 341 | @item _ | 342 | @item _ |
| 342 | Matches any value. This is known as @dfn{don't care} or @dfn{wildcard}. | 343 | Matches any value. This is known as @dfn{don't care} or @dfn{wildcard}. |
| 343 | @item @var{symbol} | 344 | @item @var{symbol} |
| @@ -362,7 +363,8 @@ Matches if the specified @var{expression} matches the specified | |||
| 362 | an @emph{arbitrary} expression, not just the expression that is the | 363 | an @emph{arbitrary} expression, not just the expression that is the |
| 363 | first argument to @code{pcase}. (It is called @code{let} because | 364 | first argument to @code{pcase}. (It is called @code{let} because |
| 364 | @var{upattern} can bind symbols to values using the @var{symbol} | 365 | @var{upattern} can bind symbols to values using the @var{symbol} |
| 365 | UPattern.) | 366 | UPattern. For example: |
| 367 | @w{@code{((or `(key . ,val) (let val 5)) val)}}.) | ||
| 366 | @item (app @var{function} @var{upattern}) | 368 | @item (app @var{function} @var{upattern}) |
| 367 | Matches if @var{function} applied to the value being matched returns a | 369 | Matches if @var{function} applied to the value being matched returns a |
| 368 | value that matches @var{upattern}. This is like the @code{pred} | 370 | value that matches @var{upattern}. This is like the @code{pred} |
| @@ -407,24 +409,27 @@ Here's an illustrative example of using UPatterns: | |||
| 407 | (code (message "Unknown return code %S" code))) | 409 | (code (message "Unknown return code %S" code))) |
| 408 | @end example | 410 | @end example |
| 409 | 411 | ||
| 410 | The QPatterns are more powerful. They allow matching the value of the | 412 | In addition, you can use backquoted patterns that are more powerful. |
| 411 | @var{expression} that is the first argument of @code{pcase} against | 413 | They allow matching the value of the @var{expression} that is the |
| 412 | specifications of its @emph{structure}. For example, you can specify | 414 | first argument of @code{pcase} against specifications of its |
| 413 | that the value must be a list of 2 elements whose first element is a | 415 | @emph{structure}. For example, you can specify that the value must be |
| 414 | string and the second element is a number. QPatterns can have one of | 416 | a list of 2 elements whose first element is a specific string and the |
| 415 | the following forms: | 417 | second element is any value with a backquoted pattern like |
| 418 | @code{`("first" ,second-elem)}. | ||
| 419 | |||
| 420 | Backquoted patterns have the form @code{`@var{qpattern}} where | ||
| 421 | @var{qpattern} can have the following forms: | ||
| 416 | 422 | ||
| 417 | @table @code | 423 | @table @code |
| 418 | @item `(@var{qpattern1} . @var{qpattern2}) | 424 | @item (@var{qpattern1} . @var{qpattern2}) |
| 419 | Matches if the value being matched is a cons cell whose @code{car} | 425 | Matches if the value being matched is a cons cell whose @code{car} |
| 420 | matches @var{qpattern1} and whose @code{cdr} matches @var{qpattern2}. | 426 | matches @var{qpattern1} and whose @code{cdr} matches @var{qpattern2}. |
| 421 | @item `[@var{qpattern1} @var{qpattern2} @dots{} @var{qpatternm}] | 427 | This readily generalizes to backquoted lists as in |
| 428 | @w{@code{(@var{qpattern1} @var{qpattern2} @dots{})}}. | ||
| 429 | @item [@var{qpattern1} @var{qpattern2} @dots{} @var{qpatternm}] | ||
| 422 | Matches if the value being matched is a vector of length @var{m} whose | 430 | Matches if the value being matched is a vector of length @var{m} whose |
| 423 | @code{0}..@code{(@var{m}-1)}th elements match @var{qpattern1}, | 431 | @code{0}..@code{(@var{m}-1)}th elements match @var{qpattern1}, |
| 424 | @var{qpattern2} @dots{} @var{qpatternm}, respectively. | 432 | @var{qpattern2} @dots{} @var{qpatternm}, respectively. |
| 425 | @item `(,@var{upattern1} ,@var{upattern2} @dots{}) | ||
| 426 | Matches if the value being matched is a list whose elements match the | ||
| 427 | corresponding @var{upattern1}, @var{upattern2}, etc. | ||
| 428 | @item @var{atom} | 433 | @item @var{atom} |
| 429 | Matches if corresponding element of the value being matched is | 434 | Matches if corresponding element of the value being matched is |
| 430 | @code{equal} to the specified @var{atom}. | 435 | @code{equal} to the specified @var{atom}. |
| @@ -433,6 +438,13 @@ Matches if the corresponding element of the value being matched | |||
| 433 | matches the specified @var{upattern}. | 438 | matches the specified @var{upattern}. |
| 434 | @end table | 439 | @end table |
| 435 | 440 | ||
| 441 | Note that uses of QPatterns can be expressed using only UPatterns, as | ||
| 442 | QPatterns are implemented on top of UPatterns using | ||
| 443 | @code{pcase-defmacro}, described below. However, using QPatterns will | ||
| 444 | in many cases lead to a more readable code. | ||
| 445 | @c FIXME: There should be an example here showing how a 'pcase' that | ||
| 446 | @c uses QPatterns can be rewritten using UPatterns. | ||
| 447 | |||
| 436 | @end defmac | 448 | @end defmac |
| 437 | 449 | ||
| 438 | Here is an example of using @code{pcase} to implement a simple | 450 | Here is an example of using @code{pcase} to implement a simple |
| @@ -476,8 +488,11 @@ Additional UPatterns can be defined using the @code{pcase-defmacro} | |||
| 476 | macro. | 488 | macro. |
| 477 | 489 | ||
| 478 | @defmac pcase-defmacro name args &rest body | 490 | @defmac pcase-defmacro name args &rest body |
| 479 | Define a new UPattern for @code{pcase}. The UPattern will have the | 491 | Define a new kind of UPattern for @code{pcase}. The new UPattern will |
| 480 | form @code{(@var{name} @var{args})}. | 492 | be invoked as @code{(@var{name} @var{actual-args})}. The @var{body} |
| 493 | should describe how to rewrite the UPattern @var{name} into some other | ||
| 494 | UPattern. The rewriting will be the result of evaluating @var{body} | ||
| 495 | in an environment where @var{args} are bound to @var{actual-args}. | ||
| 481 | @end defmac | 496 | @end defmac |
| 482 | 497 | ||
| 483 | @node Combining Conditions | 498 | @node Combining Conditions |
diff --git a/doc/lispref/customize.texi b/doc/lispref/customize.texi index 1f207dce823..994c346331f 100644 --- a/doc/lispref/customize.texi +++ b/doc/lispref/customize.texi | |||
| @@ -334,7 +334,8 @@ macro accepts the following keywords: | |||
| 334 | @item :type @var{type} | 334 | @item :type @var{type} |
| 335 | Use @var{type} as the data type for this option. It specifies which | 335 | Use @var{type} as the data type for this option. It specifies which |
| 336 | values are legitimate, and how to display the value | 336 | values are legitimate, and how to display the value |
| 337 | (@pxref{Customization Types}). | 337 | (@pxref{Customization Types}). Every @code{defcustom} should specify |
| 338 | a value for this keyword. | ||
| 338 | 339 | ||
| 339 | @item :options @var{value-list} | 340 | @item :options @var{value-list} |
| 340 | @kindex options@r{, @code{defcustom} keyword} | 341 | @kindex options@r{, @code{defcustom} keyword} |
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index eaba03d5739..aa98ed40ee5 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi | |||
| @@ -27,6 +27,7 @@ that Emacs presents to the user. | |||
| 27 | * Window Dividers:: Separating windows visually. | 27 | * Window Dividers:: Separating windows visually. |
| 28 | * Display Property:: Enabling special display features. | 28 | * Display Property:: Enabling special display features. |
| 29 | * Images:: Displaying images in Emacs buffers. | 29 | * Images:: Displaying images in Emacs buffers. |
| 30 | * Xwidgets:: Displaying native widgets in Emacs buffers. | ||
| 30 | * Buttons:: Adding clickable buttons to Emacs buffers. | 31 | * Buttons:: Adding clickable buttons to Emacs buffers. |
| 31 | * Abstract Display:: Emacs's Widget for Object Collections. | 32 | * Abstract Display:: Emacs's Widget for Object Collections. |
| 32 | * Blinking:: How Emacs shows the matching open parenthesis. | 33 | * Blinking:: How Emacs shows the matching open parenthesis. |
| @@ -5612,6 +5613,118 @@ except when you explicitly clear it. This mode can be useful for | |||
| 5612 | debugging. | 5613 | debugging. |
| 5613 | @end defvar | 5614 | @end defvar |
| 5614 | 5615 | ||
| 5616 | @node Xwidgets | ||
| 5617 | @section Embedded Native Widgets | ||
| 5618 | @cindex xwidget | ||
| 5619 | @cindex embedded widgets | ||
| 5620 | @cindex webkit browser widget | ||
| 5621 | |||
| 5622 | Emacs is able to display native widgets, such as GTK WebKit widgets, | ||
| 5623 | in Emacs buffers when it was built with the necessary support | ||
| 5624 | libraries and is running on a graphical terminal. To test whether | ||
| 5625 | Emacs supports display of embedded widgets, check that the | ||
| 5626 | @code{xwidget-internal} feature is available (@pxref{Named Features}). | ||
| 5627 | |||
| 5628 | To display an embedded widget in a buffer, you must first create an | ||
| 5629 | xwidget object, and then use that object as the display specifier | ||
| 5630 | in a @code{display} text or overlay property (@pxref{Display | ||
| 5631 | Property}). | ||
| 5632 | |||
| 5633 | @defun make-xwidget beg end type title width height arguments &optional buffer | ||
| 5634 | This creates an xwidget object between @var{beg} and @var{end}, buffer | ||
| 5635 | positions in @var{buffer}, and returns the new object. If | ||
| 5636 | @var{buffer} is omitted or @code{nil}, it defaults to the current | ||
| 5637 | buffer. If @var{buffer} names a buffer that doesn't exist, it will be | ||
| 5638 | created. The @var{type} identifies the type of the xwidget component, | ||
| 5639 | it can be one of the following: | ||
| 5640 | |||
| 5641 | @table @code | ||
| 5642 | @item webkit-osr | ||
| 5643 | The WebKit OSR (@dfn{on-stack replacement}) component. | ||
| 5644 | @end table | ||
| 5645 | |||
| 5646 | The @var{width} and @var{height} arguments specify the widget size in | ||
| 5647 | pixels, and @var{title}, a string, specifies its title. | ||
| 5648 | @end defun | ||
| 5649 | |||
| 5650 | @defun xwidgetp object | ||
| 5651 | This function returns @code{t} if @var{object} is an xwidget, | ||
| 5652 | @code{nil} otherwise. | ||
| 5653 | @end defun | ||
| 5654 | |||
| 5655 | @defun xwidget-plist xwidget | ||
| 5656 | This function returns the property list of @var{xwidget}. | ||
| 5657 | @end defun | ||
| 5658 | |||
| 5659 | @defun set-xwidget-plist xwidget plist | ||
| 5660 | This function replaces the property list of @var{xwidget} with a new | ||
| 5661 | property list given by @var{plist}. | ||
| 5662 | @end defun | ||
| 5663 | |||
| 5664 | @defun xwidget-buffer xwidget | ||
| 5665 | This function returns the buffer of @var{xwidget}. | ||
| 5666 | @end defun | ||
| 5667 | |||
| 5668 | @defun get-buffer-xwidgets buffer | ||
| 5669 | This function returns a list of xwidget objects associated with the | ||
| 5670 | @var{buffer}, which can be specified as a buffer object or a name of | ||
| 5671 | an existing buffer, a string. The value is @code{nil} if @var{buffer} | ||
| 5672 | contains no xwidgets. | ||
| 5673 | @end defun | ||
| 5674 | |||
| 5675 | @defun xwidget-webkit-goto-uri xwidget uri | ||
| 5676 | This function browses the specified @var{uri} in the given | ||
| 5677 | @var{xwidget}. The @var{uri} is a string that specifies the name of a | ||
| 5678 | file or a URL. @c FIXME: What else can a URI specify in this context? | ||
| 5679 | @end defun | ||
| 5680 | |||
| 5681 | @defun xwidget-webkit-execute-script xwidget script | ||
| 5682 | This function causes the browser widget specified by @var{xwidget} to | ||
| 5683 | execute the specified JavaScript @code{script}. | ||
| 5684 | @end defun | ||
| 5685 | |||
| 5686 | @defun xwidget-webkit-execute-script-rv xwidget script &optional default | ||
| 5687 | This function executes the specified @var{script} like | ||
| 5688 | @code{xwidget-webkit-execute-script} does, but it also returns the | ||
| 5689 | script's return value as a string. If @var{script} doesn't return a | ||
| 5690 | value, this function returns @var{default}, or @code{nil} if | ||
| 5691 | @var{default} was omitted. | ||
| 5692 | @end defun | ||
| 5693 | |||
| 5694 | @defun xwidget-webkit-get-title xwidget | ||
| 5695 | This function returns the title of @var{xwidget} as a string. | ||
| 5696 | @end defun | ||
| 5697 | |||
| 5698 | @defun xwidget-resize xwidget width height | ||
| 5699 | This function resizes the specified @var{xwidget} to the size | ||
| 5700 | @var{width}x@var{height} pixels. | ||
| 5701 | @end defun | ||
| 5702 | |||
| 5703 | @defun xwidget-size-request xwidget | ||
| 5704 | This function returns the desired size of @var{xwidget} as a list of | ||
| 5705 | the form @code{(@var{width} @var{height})}. The dimensions are in | ||
| 5706 | pixels. | ||
| 5707 | @end defun | ||
| 5708 | |||
| 5709 | @defun xwidget-info xwidget | ||
| 5710 | This function returns the attributes of @var{xwidget} as a vector of | ||
| 5711 | the form @code{[@var{type} @var{title} @var{width} @var{height}]}. | ||
| 5712 | The attributes are usually determined by @code{make-xwidget} when the | ||
| 5713 | xwidget is created. | ||
| 5714 | @end defun | ||
| 5715 | |||
| 5716 | @defun set-xwidget-query-on-exit-flag xwidget flag | ||
| 5717 | This function allows you to arrange that Emacs will ask the user for | ||
| 5718 | confirmation before exiting or before killing a buffer that has | ||
| 5719 | @var{xwidget} associated with it. If @var{flag} is non-@code{nil}, | ||
| 5720 | Emacs will query the user, otherwise it will not. | ||
| 5721 | @end defun | ||
| 5722 | |||
| 5723 | @defun xwidget-query-on-exit-flag xwidget | ||
| 5724 | This function returns the current setting of @var{xwidget}s | ||
| 5725 | query-on-exit flag, either @code{t} or @code{nil}. | ||
| 5726 | @end defun | ||
| 5727 | |||
| 5615 | @node Buttons | 5728 | @node Buttons |
| 5616 | @section Buttons | 5729 | @section Buttons |
| 5617 | @cindex buttons in buffers | 5730 | @cindex buttons in buffers |
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index 55d72427548..b98e3a5cdd1 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi | |||
| @@ -714,9 +714,12 @@ Sizes}) or splitting (@pxref{Splitting Windows}) windows. | |||
| 714 | 714 | ||
| 715 | @cindex line height | 715 | @cindex line height |
| 716 | @cindex column width | 716 | @cindex column width |
| 717 | The term @dfn{line height} is sometimes used instead of ``default | 717 | @cindex canonical character height |
| 718 | character height''. Similarly, the term @dfn{column width} is used as | 718 | @cindex canonical character width |
| 719 | shorthand for ``default character width''. | 719 | The terms @dfn{line height} and @dfn{canonical character height} are |
| 720 | sometimes used instead of ``default character height''. Similarly, the | ||
| 721 | terms @dfn{column width} and @dfn{canonical character width} are used | ||
| 722 | instead of ``default character width''. | ||
| 720 | 723 | ||
| 721 | @defun frame-char-height &optional frame | 724 | @defun frame-char-height &optional frame |
| 722 | @defunx frame-char-width &optional frame | 725 | @defunx frame-char-width &optional frame |
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index ca756e3ff7f..771bd4eeb29 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi | |||
| @@ -371,14 +371,14 @@ means to use the left or top edge of @var{window} as reference position. | |||
| 371 | If the optional argument @var{wrap} is non-@code{nil}, this means to | 371 | If the optional argument @var{wrap} is non-@code{nil}, this means to |
| 372 | wrap @var{direction} around frame borders. For example, if @var{window} | 372 | wrap @var{direction} around frame borders. For example, if @var{window} |
| 373 | is at the top of the frame and @var{direction} is @code{above}, then | 373 | is at the top of the frame and @var{direction} is @code{above}, then |
| 374 | return the minibuffer window provided the frame has one, and a window at | 374 | this function usually returns the frame's minibuffer window if it's |
| 375 | the bottom of the frame otherwise. | 375 | active and a window at the bottom of the frame otherwise. |
| 376 | 376 | ||
| 377 | If the optional argument @var{mini} is @code{nil}, this means to return | 377 | If the optional argument @var{mini} is @code{nil}, this means to return |
| 378 | the minibuffer window if and only if it is currently active. If | 378 | the minibuffer window if and only if it is currently active. If |
| 379 | @var{mini} is non-@code{nil}, it returns the minibuffer window even when | 379 | @var{mini} is non-@code{nil}, this function may return the minibuffer |
| 380 | it's not active. However, if @var{wrap} non-@code{nil}, it always acts | 380 | window even when it's not active. However, if @var{wrap} is |
| 381 | as if @var{mini} were @code{nil}. | 381 | non-@code{nil}, it always acts as if @var{mini} were @code{nil}. |
| 382 | 382 | ||
| 383 | If it doesn't find a suitable window, this function returns @code{nil}. | 383 | If it doesn't find a suitable window, this function returns @code{nil}. |
| 384 | @end defun | 384 | @end defun |
| @@ -664,15 +664,17 @@ following function useful: | |||
| 664 | 664 | ||
| 665 | @defun window-max-chars-per-line &optional window face | 665 | @defun window-max-chars-per-line &optional window face |
| 666 | This function returns the number of characters displayed in the | 666 | This function returns the number of characters displayed in the |
| 667 | specified @var{face} in the specified @var{window} (which must be a | 667 | specified face @var{face} in the specified window @var{window} (which |
| 668 | live window). If @var{face} was remapped (@pxref{Face Remapping}), | 668 | must be a live window). If @var{face} was remapped (@pxref{Face |
| 669 | the information is returned for the remapped face. If omitted or | 669 | Remapping}), the information is returned for the remapped face. If |
| 670 | @code{nil}, @var{face} defaults to the default face, and @var{window} | 670 | omitted or @code{nil}, @var{face} defaults to the default face, and |
| 671 | defaults to the selected window. Unlike @code{window-body-width}, | 671 | @var{window} defaults to the selected window. |
| 672 | this function accounts for the actual size of the @var{face}'s font, | 672 | |
| 673 | instead of working in units of frame's canonical character width. It | 673 | Unlike @code{window-body-width}, this function accounts for the actual |
| 674 | also accounts for space used by the continuation glyph, if | 674 | size of @var{face}'s font, instead of working in units of the canonical |
| 675 | @var{window} lacks one or both of its fringes. | 675 | character width of @var{window}'s frame (@pxref{Frame Font}). It also |
| 676 | accounts for space used by the continuation glyph, if @var{window} lacks | ||
| 677 | one or both of its fringes. | ||
| 676 | @end defun | 678 | @end defun |
| 677 | 679 | ||
| 678 | @cindex fixed-size window | 680 | @cindex fixed-size window |
| @@ -701,7 +703,7 @@ margins, fringes, a scroll bar and a right divider, if present. | |||
| 701 | The following function tells how small a specific window can get taking | 703 | The following function tells how small a specific window can get taking |
| 702 | into account the sizes of its areas and the values of | 704 | into account the sizes of its areas and the values of |
| 703 | @code{window-min-height}, @code{window-min-width} and | 705 | @code{window-min-height}, @code{window-min-width} and |
| 704 | @code{window-size-fixed}. | 706 | @code{window-size-fixed} (@pxref{Preserving Window Sizes}). |
| 705 | 707 | ||
| 706 | @defun window-min-size &optional window horizontal ignore pixelwise | 708 | @defun window-min-size &optional window horizontal ignore pixelwise |
| 707 | This function returns the minimum size of @var{window}. @var{window} | 709 | This function returns the minimum size of @var{window}. @var{window} |
| @@ -713,10 +715,9 @@ of @var{window}'s lines. | |||
| 713 | The return value makes sure that all components of @var{window} remain | 715 | The return value makes sure that all components of @var{window} remain |
| 714 | fully visible if @var{window}'s size were actually set to it. With | 716 | fully visible if @var{window}'s size were actually set to it. With |
| 715 | @var{horizontal} @code{nil} it includes the mode and header line, the | 717 | @var{horizontal} @code{nil} it includes the mode and header line, the |
| 716 | horizontal scroll bar and the bottom divider. With @var{horizontal} | 718 | horizontal scroll bar and the bottom divider, if present. With |
| 717 | non-@code{nil} it includes the fringes, a scroll bar, and a right | 719 | @var{horizontal} non-@code{nil} it includes the margins and fringes, the |
| 718 | divider, if present. It does not, however, include the space reserved | 720 | vertical scroll bar and the right divider, if present. |
| 719 | for the margins. | ||
| 720 | 721 | ||
| 721 | The optional argument @var{ignore}, if non-@code{nil}, means ignore | 722 | The optional argument @var{ignore}, if non-@code{nil}, means ignore |
| 722 | restrictions imposed by fixed size windows, @code{window-min-height} or | 723 | restrictions imposed by fixed size windows, @code{window-min-height} or |
| @@ -1263,8 +1264,8 @@ frame), an error is signaled. | |||
| 1263 | By default, the space taken up by @var{window} is given to one of its | 1264 | By default, the space taken up by @var{window} is given to one of its |
| 1264 | adjacent sibling windows, if any. However, if the variable | 1265 | adjacent sibling windows, if any. However, if the variable |
| 1265 | @code{window-combination-resize} is non-@code{nil}, the space is | 1266 | @code{window-combination-resize} is non-@code{nil}, the space is |
| 1266 | proportionally distributed among any remaining windows in the window | 1267 | proportionally distributed among any remaining windows in the same |
| 1267 | combination. @xref{Recombining Windows}. | 1268 | window combination. @xref{Recombining Windows}. |
| 1268 | 1269 | ||
| 1269 | The behavior of this function may be altered by the window parameters | 1270 | The behavior of this function may be altered by the window parameters |
| 1270 | of @var{window}, so long as the variable | 1271 | of @var{window}, so long as the variable |
| @@ -1771,11 +1772,13 @@ nor the buffer list. | |||
| 1771 | @defun window-use-time &optional window | 1772 | @defun window-use-time &optional window |
| 1772 | This functions returns the use time of window @var{window}. | 1773 | This functions returns the use time of window @var{window}. |
| 1773 | @var{window} must be a live window and defaults to the selected one. | 1774 | @var{window} must be a live window and defaults to the selected one. |
| 1774 | The @dfn{use time} of a window is not really a time value, but it does | 1775 | |
| 1775 | increase monotonically with each window selection, so the window with | 1776 | The @dfn{use time} of a window is not really a time value, but an |
| 1776 | the lowest use time is the least recently selected one, and the | 1777 | integer that does increase monotonically with each call of |
| 1777 | window with the highest use time is the most recently selected | 1778 | @code{select-window} with a @code{nil} @var{norecord} argument. The |
| 1778 | one. | 1779 | window with the lowest use time is usually called the least recently |
| 1780 | used window while the window with the highest use time is called the | ||
| 1781 | most recently used one (@pxref{Cyclic Window Ordering}). | ||
| 1779 | @end defun | 1782 | @end defun |
| 1780 | 1783 | ||
| 1781 | 1784 | ||
| @@ -1790,11 +1793,11 @@ some other window, it moves through live windows in a specific order. | |||
| 1790 | For any given configuration of windows, this order never varies. It | 1793 | For any given configuration of windows, this order never varies. It |
| 1791 | is called the @dfn{cyclic ordering of windows}. | 1794 | is called the @dfn{cyclic ordering of windows}. |
| 1792 | 1795 | ||
| 1793 | The ordering is determined by a depth-first traversal of the frame's | 1796 | The ordering is determined by a depth-first traversal of each frame's |
| 1794 | window tree, retrieving the live windows which are the leaf nodes of | 1797 | window tree, retrieving the live windows which are the leaf nodes of the |
| 1795 | the tree (@pxref{Windows and Frames}). If the minibuffer is active, | 1798 | tree (@pxref{Windows and Frames}). If the minibuffer is active, the |
| 1796 | the minibuffer window is included too. The ordering is cyclic, so the | 1799 | minibuffer window is included too. The ordering is cyclic, so the last |
| 1797 | last window in the sequence is followed by the first one. | 1800 | window in the sequence is followed by the first one. |
| 1798 | 1801 | ||
| 1799 | @defun next-window &optional window minibuf all-frames | 1802 | @defun next-window &optional window minibuf all-frames |
| 1800 | @cindex minibuffer window, and @code{next-window} | 1803 | @cindex minibuffer window, and @code{next-window} |
| @@ -2146,9 +2149,8 @@ Invokes @code{pop-to-buffer} to proceed. | |||
| 2146 | Marks the selected window as non-dedicated and proceeds. | 2149 | Marks the selected window as non-dedicated and proceeds. |
| 2147 | @end table | 2150 | @end table |
| 2148 | 2151 | ||
| 2149 | When called non-interactively, @code{switch-to-buffer} always signals an | 2152 | This option does not affect non-interactive calls of |
| 2150 | error when the selected window is dedicated to its buffer and | 2153 | @code{switch-to-buffer}. |
| 2151 | @var{force-same-window} is non-@code{nil}. | ||
| 2152 | @end defopt | 2154 | @end defopt |
| 2153 | 2155 | ||
| 2154 | By default, @code{switch-to-buffer} shows the buffer at its position of | 2156 | By default, @code{switch-to-buffer} shows the buffer at its position of |
| @@ -2209,7 +2211,7 @@ for the documentation of @code{display-buffer}. | |||
| 2209 | 2211 | ||
| 2210 | @deffn Command pop-to-buffer buffer-or-name &optional action norecord | 2212 | @deffn Command pop-to-buffer buffer-or-name &optional action norecord |
| 2211 | This function makes @var{buffer-or-name} the current buffer and | 2213 | This function makes @var{buffer-or-name} the current buffer and |
| 2212 | displays it in some window, preferably not the window previously | 2214 | displays it in some window, preferably not the window currently |
| 2213 | selected. It then selects the displaying window. If that window is | 2215 | selected. It then selects the displaying window. If that window is |
| 2214 | on a different graphical frame, that frame is given input focus if | 2216 | on a different graphical frame, that frame is given input focus if |
| 2215 | possible (@pxref{Input Focus}). The return value is the buffer that | 2217 | possible (@pxref{Input Focus}). The return value is the buffer that |
| @@ -2420,7 +2422,6 @@ frame is a candidate; this function replaces the default predicate. | |||
| 2420 | If @var{alist} has a non-@code{nil} @code{inhibit-same-window} entry, | 2422 | If @var{alist} has a non-@code{nil} @code{inhibit-same-window} entry, |
| 2421 | the selected window is used; thus if the selected frame has a single | 2423 | the selected window is used; thus if the selected frame has a single |
| 2422 | window, it is not used. | 2424 | window, it is not used. |
| 2423 | |||
| 2424 | @end defun | 2425 | @end defun |
| 2425 | 2426 | ||
| 2426 | @defun display-buffer-pop-up-window buffer alist | 2427 | @defun display-buffer-pop-up-window buffer alist |