diff options
| author | Kenichi Handa | 2011-11-11 16:08:47 +0900 |
|---|---|---|
| committer | Kenichi Handa | 2011-11-11 16:08:47 +0900 |
| commit | 0756b0c3a6e60dd623da6f12bc8d2de05ef7b8f1 (patch) | |
| tree | 0846cacac3ba56cb8d2054fbc851fee2fb9606d2 | |
| parent | 9ac0394b8d1e54bf1b49291c85770af36a94531e (diff) | |
| parent | 68cbc58be59373e805fa200db02e4022e20050f0 (diff) | |
| download | emacs-0756b0c3a6e60dd623da6f12bc8d2de05ef7b8f1.tar.gz emacs-0756b0c3a6e60dd623da6f12bc8d2de05ef7b8f1.zip | |
merge trunk
57 files changed, 1198 insertions, 1361 deletions
diff --git a/admin/ChangeLog b/admin/ChangeLog index f91d53194ce..fc3370bb380 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2011-11-07 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * unidata/makefile.w32-in (clean): Remove bidimirror.h and biditype.h. | ||
| 4 | |||
| 1 | 2011-10-31 David Engster <deng@randomsample.de> | 5 | 2011-10-31 David Engster <deng@randomsample.de> |
| 2 | 6 | ||
| 3 | * grammars/bovine-grammar.el: Avoid using old-style backquotes. | 7 | * grammars/bovine-grammar.el: Avoid using old-style backquotes. |
diff --git a/admin/charsets/mapfiles/Uni2JIS b/admin/charsets/mapfiles/Uni2JIS index 59e3a1e1dfa..b81d10c6ae2 100644 --- a/admin/charsets/mapfiles/Uni2JIS +++ b/admin/charsets/mapfiles/Uni2JIS | |||
| @@ -514,7 +514,7 @@ | |||
| 514 | 045A S-0790 # CYRILLIC SMALL LETTER NJE | 514 | 045A S-0790 # CYRILLIC SMALL LETTER NJE |
| 515 | 045B S-0791 # CYRILLIC SMALL LETTER TSHE (Serbocroatian) | 515 | 045B S-0791 # CYRILLIC SMALL LETTER TSHE (Serbocroatian) |
| 516 | 045C S-0792 # CYRILLIC SMALL LETTER KJE | 516 | 045C S-0792 # CYRILLIC SMALL LETTER KJE |
| 517 | 045E S-0793 # CYRILLIC SMALL LETTER SHORT U (Byalorussian) | 517 | 045E S-0793 # CYRILLIC SMALL LETTER SHORT U (Byelorussian) |
| 518 | 045F S-0794 # CYRILLIC SMALL LETTER DZHE | 518 | 045F S-0794 # CYRILLIC SMALL LETTER DZHE |
| 519 | 2010 0-0130 1-0130 2-0130 # HYPHEN | 519 | 2010 0-0130 1-0130 2-0130 # HYPHEN |
| 520 | 2014 0-0129 1-0129 2-0129 # EM DASH | 520 | 2014 0-0129 1-0129 2-0129 # EM DASH |
diff --git a/admin/unidata/makefile.w32-in b/admin/unidata/makefile.w32-in index 96a1f5b86fd..0e9b9f0d2bd 100644 --- a/admin/unidata/makefile.w32-in +++ b/admin/unidata/makefile.w32-in | |||
| @@ -52,5 +52,5 @@ charprop-CMD: unidata-gen.elc unidata.txt | |||
| 52 | ${DSTDIR}/charprop.el: charprop-$(SHELLTYPE) | 52 | ${DSTDIR}/charprop.el: charprop-$(SHELLTYPE) |
| 53 | 53 | ||
| 54 | clean: | 54 | clean: |
| 55 | - $(DEL) unidata-gen.elc unidata.txt biditype.h bidimirror.h | 55 | - $(DEL) unidata-gen.elc unidata.txt |
| 56 | 56 | ||
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 1a692c6b36d..2abed9f870c 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,46 @@ | |||
| 1 | 2011-11-10 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * buffers.texi (Read Only Buffers): Expand a bit on why | ||
| 4 | toggle-read-only should only be used interactively. (Bug#7292) | ||
| 5 | |||
| 6 | 2011-11-09 Chong Yidong <cyd@gnu.org> | ||
| 7 | |||
| 8 | * windows.texi (Window Sizes): Document window-pixel-edges, | ||
| 9 | window-inside-pixel-edges, window-absolute-pixel-edges, and | ||
| 10 | window-inside-absolute-pixel-edges. | ||
| 11 | (Resizing Windows): shrink-window-if-larger-than-buffer works on | ||
| 12 | non-full-width windows. | ||
| 13 | |||
| 14 | 2011-11-09 Martin Rudalics <rudalics@gmx.at> | ||
| 15 | |||
| 16 | * windows.texi (Resizing Windows): Rewrite documentation of | ||
| 17 | window-resizable. | ||
| 18 | |||
| 19 | 2011-11-09 Chong Yidong <cyd@gnu.org> | ||
| 20 | |||
| 21 | * windows.texi (Splitting Windows): Simplify example. | ||
| 22 | |||
| 23 | 2011-11-08 Chong Yidong <cyd@gnu.org> | ||
| 24 | |||
| 25 | * windows.texi (Window Sizes): Copyedits. Document | ||
| 26 | window-text-height. Remove window-min-height and window-min-width | ||
| 27 | discussion, referring instead to Emacs manual. | ||
| 28 | (Splitting Windows, Resizing Windows): Add xref to Emacs manual. | ||
| 29 | (Resizing Windows): Simplify introduction. Don't document | ||
| 30 | enlarge-window, shrink-window, enlarge-window-horizontally, and | ||
| 31 | shrink-window-horizontally; they are no longer preferred for | ||
| 32 | calling from Lisp, and are already documented in the Emacs manual. | ||
| 33 | |||
| 34 | 2011-11-07 Glenn Morris <rgm@gnu.org> | ||
| 35 | |||
| 36 | * windows.texi (Choosing Window): Fix keybinding typo. | ||
| 37 | |||
| 38 | 2011-11-07 Martin Rudalics <rudalics@gmx.at> | ||
| 39 | |||
| 40 | * windows.texi (Resizing Windows, Splitting Windows) | ||
| 41 | (Window Configurations): Use "child window" instead of | ||
| 42 | "subwindow". | ||
| 43 | |||
| 1 | 2011-11-06 Chong Yidong <cyd@gnu.org> | 44 | 2011-11-06 Chong Yidong <cyd@gnu.org> |
| 2 | 45 | ||
| 3 | * windows.texi (Basic Windows): Clarify various definitions. | 46 | * windows.texi (Basic Windows): Clarify various definitions. |
| @@ -1064,9 +1107,9 @@ | |||
| 1064 | * commands.texi (Misc Events): Add cross-references to where | 1107 | * commands.texi (Misc Events): Add cross-references to where |
| 1065 | POSITION of a mouse event is described in detail. | 1108 | POSITION of a mouse event is described in detail. |
| 1066 | 1109 | ||
| 1067 | 2010-08-08 Christoph <cschol2112@googlemail.com> | 1110 | 2010-08-08 Christoph Scholtes <cschol2112@googlemail.com> |
| 1068 | 1111 | ||
| 1069 | * control.texi (Handling Errors) <error-message-string>: Fix arg name. | 1112 | * control.texi (Handling Errors) <error-message-string>: Fix arg name. |
| 1070 | 1113 | ||
| 1071 | 2010-08-08 Juanma Barranquero <lekktu@gmail.com> | 1114 | 2010-08-08 Juanma Barranquero <lekktu@gmail.com> |
| 1072 | 1115 | ||
diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi index 816d0f9faa8..ee2ce2e2001 100644 --- a/doc/lispref/buffers.texi +++ b/doc/lispref/buffers.texi | |||
| @@ -748,10 +748,11 @@ of the list (comparison is done with @code{eq}). | |||
| 748 | 748 | ||
| 749 | @deffn Command toggle-read-only &optional arg | 749 | @deffn Command toggle-read-only &optional arg |
| 750 | This command toggles whether the current buffer is read-only. It is | 750 | This command toggles whether the current buffer is read-only. It is |
| 751 | intended for interactive use; do not use it in programs. At any given | 751 | intended for interactive use; do not use it in programs (it may have |
| 752 | point in a program, you should know whether you want the read-only flag | 752 | side-effects, such as enabling View mode, and does not affect |
| 753 | on or off; so you can set @code{buffer-read-only} explicitly to the | 753 | read-only text properties). To change the read-only state of a buffer in |
| 754 | proper value, @code{t} or @code{nil}. | 754 | a program, explicitly set @code{buffer-read-only} to the proper value. |
| 755 | To temporarily ignore a read-only state, bind @code{inhibit-read-only}. | ||
| 755 | 756 | ||
| 756 | If @var{arg} is non-@code{nil}, it should be a raw prefix argument. | 757 | If @var{arg} is non-@code{nil}, it should be a raw prefix argument. |
| 757 | @code{toggle-read-only} sets @code{buffer-read-only} to @code{t} if | 758 | @code{toggle-read-only} sets @code{buffer-read-only} to @code{t} if |
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index 8b466e02214..cf5cfedf5af 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi | |||
| @@ -274,7 +274,7 @@ the leftmost child window for a horizontal combination. If | |||
| 274 | @defun window-combined-p &optional window horizontal | 274 | @defun window-combined-p &optional window horizontal |
| 275 | This function returns a non-@code{nil} value if and only if | 275 | This function returns a non-@code{nil} value if and only if |
| 276 | @var{window} is part of a vertical combination. If @var{window} is | 276 | @var{window} is part of a vertical combination. If @var{window} is |
| 277 | omitted or nil, it defaults to the selected one. | 277 | omitted or @code{nil}, it defaults to the selected one. |
| 278 | 278 | ||
| 279 | If the optional argument @var{horizontal} is non-@code{nil}, this | 279 | If the optional argument @var{horizontal} is non-@code{nil}, this |
| 280 | means to return non-@code{nil} if and only if @var{window} is part of | 280 | means to return non-@code{nil} if and only if @var{window} is part of |
| @@ -340,13 +340,12 @@ internal window). The @var{edges} element is a list @code{(@var{left} | |||
| 340 | @cindex window size | 340 | @cindex window size |
| 341 | @cindex size of window | 341 | @cindex size of window |
| 342 | 342 | ||
| 343 | Emacs windows are rectangular. The structure of a live window can be | 343 | The following schematic shows the structure of a live window: |
| 344 | roughly sketched as follows: | ||
| 345 | 344 | ||
| 346 | @smallexample | 345 | @smallexample |
| 347 | @group | 346 | @group |
| 348 | _________________________________________ | 347 | _________________________________________ |
| 349 | ^ |______________ Header Line_______________| | 348 | ^ |______________ Header Line_______________| |
| 350 | | |LS|LF|LM| |RM|RF|RS| ^ | 349 | | |LS|LF|LM| |RM|RF|RS| ^ |
| 351 | | | | | | | | | | | | 350 | | | | | | | | | | | |
| 352 | Window | | | | Text Area | | | | Window | 351 | Window | | | | Text Area | | | | Window |
| @@ -362,297 +361,218 @@ roughly sketched as follows: | |||
| 362 | @end smallexample | 361 | @end smallexample |
| 363 | 362 | ||
| 364 | @cindex window body | 363 | @cindex window body |
| 364 | @cindex text area of a window | ||
| 365 | @cindex body of a window | 365 | @cindex body of a window |
| 366 | The text area constitutes the body of the window. In its most simple | 366 | At the center of the window is the @dfn{text area}, or @dfn{body}, |
| 367 | form, a window consists of its body alone. LS and RS stand for the left | 367 | where the buffer text is displayed. On each side of the text area is |
| 368 | and right scroll bar (@pxref{Scroll Bars}) respectively. Only one of | 368 | a series of vertical areas; from innermost to outermost, these are the |
| 369 | them can be present at any time. LF and RF denote the left and right | 369 | left and right margins, denoted by LM and RM in the schematic |
| 370 | fringe, see @ref{Fringes}. LM and RM, finally, stand for the left and | 370 | (@pxref{Display Margins}); the left and right fringes, denoted by LF |
| 371 | right display margin, see @ref{Display Margins}. The header line, if | 371 | and RF (@pxref{Fringes}); and the left or right scroll bar, only one of |
| 372 | present, is located above theses areas, the mode line below, see | 372 | which is present at any time, denoted by LS and RS (@pxref{Scroll |
| 373 | @ref{Mode Line Format}. | 373 | Bars}). At the top of the window is an optional header line |
| 374 | (@pxref{Header Lines}), and at the bottom of the window is the mode | ||
| 375 | line (@pxref{Mode Line Format}). | ||
| 376 | |||
| 377 | Emacs provides several functions for finding the height and width of | ||
| 378 | a window. Except where noted, these heights and widths are reported | ||
| 379 | as integer numbers of lines and columns respectively. On a graphical | ||
| 380 | display, each ``line'' and ``column'' actually corresponds to the | ||
| 381 | height and width of a ``default'' character specified by the frame's | ||
| 382 | default font. Thus, if a window is displaying text with a different | ||
| 383 | font or size, the reported height and width for that window may differ | ||
| 384 | from the actual number of text lines or columns displayed within it. | ||
| 374 | 385 | ||
| 375 | @cindex window height | 386 | @cindex window height |
| 376 | @cindex total window height | ||
| 377 | @cindex height of a window | 387 | @cindex height of a window |
| 378 | @cindex total height of a window | 388 | @cindex total height of a window |
| 379 | The @dfn{total height of a window} is specified as the total number of | ||
| 380 | lines occupied by the window. Any mode or header line is included in a | ||
| 381 | window's total height. For an internal window, the total height is | ||
| 382 | calculated recursively from the total heights of its child windows. | ||
| 383 | |||
| 384 | @cindex window width | 389 | @cindex window width |
| 385 | @cindex total window width | ||
| 386 | @cindex width of a window | 390 | @cindex width of a window |
| 387 | @cindex total width of a window | 391 | @cindex total width of a window |
| 388 | The @dfn{total width of a window} denotes the total number of columns of | 392 | The @dfn{total height} of a window is the distance between the top |
| 389 | the window. Any scroll bar and the column of @samp{|} characters that | 393 | and bottom of the window, including the header line (if one exists) |
| 390 | separate the window from its right sibling are included in a window's | 394 | and the mode line. The @dfn{total width} of a window is the distance |
| 391 | total width. On a window-system, fringes and display margins are | 395 | between the left and right edges of the mode line. Note that the |
| 392 | included in a window's total width too. For an internal window, the | 396 | height of a frame is not the same as the height of its windows, since |
| 393 | total width is calculated recursively from the total widths of its child | 397 | a frame may also contain an echo area, menu bar, and tool bar |
| 394 | windows. | 398 | (@pxref{Size and Position}). |
| 395 | |||
| 396 | @cindex total size of a window | ||
| 397 | @cindex total window size | ||
| 398 | The following function is the standard interface for getting the total | ||
| 399 | size of any window: | ||
| 400 | |||
| 401 | @defun window-total-size &optional window &optional horizontal | ||
| 402 | This function returns the total number of lines of @var{window}. The | ||
| 403 | argument @var{window} can denote any window and defaults to the selected | ||
| 404 | one. If @var{window} is live, the return value includes any header or | ||
| 405 | mode lines of @var{window}. If @var{window} is internal, the return | ||
| 406 | value is the sum of the total heights of @var{window}'s child windows | ||
| 407 | provided these are vertically combined and the height of @var{window}'s | ||
| 408 | first child if they are horizontally combined. | ||
| 409 | |||
| 410 | If the optional argument @var{horizontal} is non-@code{nil}, this | ||
| 411 | function returns the total number of columns of @var{window}. If | ||
| 412 | @var{window} is live, the return value includes any vertical divider | ||
| 413 | column or scroll bars of @var{window}. On a window-system, the return | ||
| 414 | value includes the space occupied by any margins and fringes of | ||
| 415 | @var{window} too. If @var{window} is internal, the return value is the | ||
| 416 | sum of the total widths of @var{window}'s child windows provided these | ||
| 417 | are horizontally combined and the width of @var{window}'s first child | ||
| 418 | otherwise. | ||
| 419 | @end defun | ||
| 420 | |||
| 421 | Alternatively, the following two functions can be used to retrieve | ||
| 422 | either the total height or the total width of a window: | ||
| 423 | 399 | ||
| 424 | @defun window-total-height &optional window | 400 | @defun window-total-height &optional window |
| 425 | This function returns the total number of lines of @var{window}. | 401 | This function returns the total height, in lines, of the window |
| 426 | @var{window} can be any window and defaults to the selected one. The | 402 | @var{window}. If @var{window} is omitted or @code{nil}, it defaults |
| 427 | return value includes @var{window}'s mode line and header line, if any. | 403 | to the selected window. If @var{window} is an internal window, the |
| 428 | If @var{window} is internal the return value is the sum of heights of | 404 | return value is the total height occupied by its descendant windows. |
| 429 | @var{window}'s child windows for a vertical combination and the height | ||
| 430 | of @var{window}'s first child otherwise. | ||
| 431 | @end defun | 405 | @end defun |
| 432 | 406 | ||
| 433 | @defun window-total-width &optional window | 407 | @defun window-total-width &optional window |
| 434 | This function returns the total number of columns of @var{window}. | 408 | This function returns the total width, in columns, of the window |
| 435 | @var{window} can be any window and defaults to the selected one. The | 409 | @var{window}. If @var{window} is omitted or @code{nil}, it defaults |
| 436 | return value includes any vertical dividers or scrollbars of | 410 | to the selected window. If @var{window} is internal, the return value |
| 437 | @var{window}. On a window-system the return value also includes the | 411 | is the total width occupied by its descendant windows. |
| 438 | space occupied by any margins and fringes of @var{window}. If | 412 | @end defun |
| 439 | @var{window} is internal, the return value is the sum of the widths of | ||
| 440 | @var{window}'s child windows for a horizontal combination and the width | ||
| 441 | of @var{window}'s first child otherwise. | ||
| 442 | @end defun | ||
| 443 | |||
| 444 | The total height of any window is usually less than the height of the | ||
| 445 | window's frame, because the latter may also include the minibuffer | ||
| 446 | window. Depending on the toolkit in use, the frame height can also | ||
| 447 | include the menu bar and the tool bar (@pxref{Size and Position}). | ||
| 448 | Therefore, in general it is not straightforward to compare window and | ||
| 449 | frame heights. The following function is useful to determine whether | ||
| 450 | there are no other windows above or below a specified window. | ||
| 451 | 413 | ||
| 452 | @cindex full-height window | 414 | @defun window-total-size &optional window horizontal |
| 453 | @defun window-full-height-p &optional window | 415 | This function returns either the total height or width of the window |
| 454 | This function returns non-@code{nil} if there is no other window above | 416 | @var{window}. If @var{horizontal} is omitted or @code{nil}, this is |
| 455 | or below @var{window} on the containing frame. More precisely, this | 417 | equivalent to calling @code{window-total-height} for @var{window}; |
| 456 | function returns @code{t} if and only if the total height of | 418 | otherwise it is equivalent to calling @code{window-total-width} for |
| 457 | @var{window} equals the total height of the root window (@pxref{Windows | 419 | @var{window}. |
| 458 | and Frames}) of @var{window}'s frame. The @var{window} argument may | ||
| 459 | denote any window and defaults to the selected one. | ||
| 460 | @end defun | 420 | @end defun |
| 461 | 421 | ||
| 462 | @cindex full-width window | 422 | @cindex full-width window |
| 463 | The following function can be used to determine whether there are no | 423 | @cindex full-height window |
| 464 | other windows on the left or right of a specified window. | 424 | The following functions can be used to determine whether a given |
| 425 | window has any adjacent windows. | ||
| 426 | |||
| 427 | @defun window-full-height-p &optional window | ||
| 428 | This function returns non-@code{nil} if @var{window} has no other | ||
| 429 | window above or below it in its frame, i.e. its total height equals | ||
| 430 | the total height of the root window on that frame. If @var{window} is | ||
| 431 | omitted or @code{nil}, it defaults to the selected window. | ||
| 432 | @end defun | ||
| 465 | 433 | ||
| 466 | @defun window-full-width-p &optional window | 434 | @defun window-full-width-p &optional window |
| 467 | This function returns non-@code{nil} if there are no other windows on | 435 | This function returns non-@code{nil} if @var{window} has no other |
| 468 | the left or right of @var{window}; @code{nil} otherwise. More | 436 | window to the left or right in its frame, i.e. its total width equals |
| 469 | precisely, this function returns @code{t} if and only if the total width | 437 | that of the root window on that frame. If @var{window} is omitted or |
| 470 | of @var{window} equals the total width of the root window | 438 | @code{nil}, it defaults to the selected window. |
| 471 | (@pxref{Windows and Frames}) of @var{window}'s frame. The @var{window} | ||
| 472 | argument may denote any window and defaults to the selected one. | ||
| 473 | @end defun | 439 | @end defun |
| 474 | 440 | ||
| 475 | @cindex top line of window | 441 | @cindex window position |
| 476 | @cindex left column of window | 442 | The following functions can be used to determine the position of a |
| 477 | The windows of a frame are unambiguously characterized by the | 443 | window relative to the window area of its frame: |
| 478 | combination of their top line and left column within that frame. | ||
| 479 | 444 | ||
| 480 | @defun window-top-line &optional window | 445 | @defun window-top-line &optional window |
| 481 | This function returns the top line of @var{window}. The argument | 446 | This function returns the distance, in lines, between the top of |
| 482 | @var{window} can denote any window and defaults to the selected one. | 447 | @var{window} and the top of the frame's window area. For instance, |
| 448 | the return value is 0 if there is no window above @var{window}. If | ||
| 449 | @var{window} is omitted or @code{nil}, it defaults to the selected | ||
| 450 | window. | ||
| 483 | @end defun | 451 | @end defun |
| 484 | 452 | ||
| 485 | @defun window-left-column &optional window | 453 | @defun window-left-column &optional window |
| 486 | This function returns the left column of @var{window}. The argument | 454 | This function returns the distance, in columns, between the left edge |
| 487 | @var{window} can denote any window and defaults to the selected one. | 455 | of @var{window} and the left edge of the frame's window area. For |
| 456 | instance, the return value is 0 if there is no window to the left of | ||
| 457 | @var{window}. If @var{window} is omitted or @code{nil}, it defaults | ||
| 458 | to the selected window. | ||
| 488 | @end defun | 459 | @end defun |
| 489 | 460 | ||
| 490 | For a frame displaying one window only, that window's top line and left | ||
| 491 | column are both zero. When a frame displays a window @var{WB} below a | ||
| 492 | window @var{WA}, the top line of @var{WB} can be calculated by adding | ||
| 493 | the total height of @var{WA} to the top line of @var{WA}. When a frame | ||
| 494 | displays a window @var{WR} on the right of a window @var{WL}, the left | ||
| 495 | column of @var{WR} can be calculated by adding the total width of | ||
| 496 | @var{WL} to the left column of @var{WL}. | ||
| 497 | |||
| 498 | @cindex window body height | 461 | @cindex window body height |
| 499 | @cindex body height of a window | 462 | @cindex body height of a window |
| 500 | The @dfn{body height of a window} is specified as the total number of | ||
| 501 | lines occupied by the window's text area. Mode or header lines are not | ||
| 502 | included in a window's body height. | ||
| 503 | |||
| 504 | @cindex window body width | 463 | @cindex window body width |
| 505 | @cindex body width of a window | 464 | @cindex body width of a window |
| 506 | The @dfn{body width of a window} denotes the total number of columns | ||
| 507 | occupied by the window's text area. Scroll bars or columns of @samp{|} | ||
| 508 | characters that separate side-by-side windows are not included in a | ||
| 509 | window's body width. | ||
| 510 | |||
| 511 | @cindex body size of a window | 465 | @cindex body size of a window |
| 512 | @cindex window body size | 466 | @cindex window body size |
| 513 | @cindex canonical units of window/frame size | 467 | The @dfn{body height} of a window is the height of its text area, |
| 514 | The following functions retrieve height and width of the body of a | 468 | which does not include the mode or header line. Similarly, the |
| 515 | live window. Note that the values these functions return are measured | 469 | @dfn{body width} is the width of the text area, which does not include |
| 516 | in @dfn{canonical units}, i.e.@: for the default frame's face. If the | 470 | the scroll bar, fringes, or margins. |
| 517 | window shows some characters with non-default face, e.g., if the font | ||
| 518 | of some characters is larger or smaller than the default font, the | ||
| 519 | values returned by these functions will not match the actual number of | ||
| 520 | lines or characters per line shown in the window. To get the actual | ||
| 521 | number of columns and lines, move to the last character in the line | ||
| 522 | (e.g., with @code{end-of-visual-line}) or to the last line of the | ||
| 523 | window (e.g., with @code{window-end}), and use @code{posn-at-point} to | ||
| 524 | find the line or column there. | ||
| 525 | |||
| 526 | @defun window-body-size &optional window horizontal | ||
| 527 | This function returns the number of lines of @var{window}'s text area. | ||
| 528 | @var{window} must be a live window and defaults to the selected one. | ||
| 529 | The return value does not count any mode or header line of @var{window}. | ||
| 530 | |||
| 531 | Optional argument @var{horizontal} non-@code{nil} means to return the | ||
| 532 | number of columns of @var{window}'s text area. In this case the return | ||
| 533 | value does not include any vertical divider or scroll bar owned by | ||
| 534 | @var{window}. On a window-system the return value does not include the | ||
| 535 | number of columns used for @var{window}'s fringes or display margins | ||
| 536 | either. | ||
| 537 | @end defun | ||
| 538 | 471 | ||
| 539 | @defun window-body-height &optional window | 472 | @defun window-body-height &optional window |
| 540 | This function returns the number of lines of @var{window}'s body. | 473 | This function returns the body height, in lines, of the window |
| 541 | @var{window} must be a live window and defaults to the selected one. | 474 | @var{window}. If @var{window} is omitted or @code{nil}, it defaults |
| 475 | to the selected window; otherwise it must be a live window. | ||
| 542 | 476 | ||
| 543 | The return value does not include @var{window}'s mode line and header | 477 | If there is a partially-visible line at the bottom of the text area, |
| 544 | line, if any. If a line at the bottom of the window is only partially | 478 | that counts as a whole line; to exclude such a partially-visible line, |
| 545 | visible, that line is included in the return value. If you do not | 479 | use @code{window-text-height}, below. |
| 546 | want to include a partially visible bottom line in the return value, | ||
| 547 | use @code{window-text-height} instead. | ||
| 548 | @end defun | 480 | @end defun |
| 549 | 481 | ||
| 550 | @defun window-body-width &optional window | 482 | @defun window-body-width &optional window |
| 551 | This function returns the number of columns of @var{window}'s body. | 483 | This function returns the body width, in columns, of the window |
| 552 | @var{window} must be a live window and defaults to the selected one. | 484 | @var{window}. If @var{window} is omitted or @code{nil}, it defaults |
| 553 | 485 | to the selected window; otherwise it must be a live window. | |
| 554 | The return value does not include any vertical dividers or scroll bars | ||
| 555 | owned by @var{window}. On a window-system the return value does not | ||
| 556 | include the number of columns used for @var{window}'s fringes or | ||
| 557 | display margins either. | ||
| 558 | @end defun | 486 | @end defun |
| 559 | 487 | ||
| 560 | The following functions have been used in earlier versions of Emacs. | 488 | @defun window-body-size &optional window horizontal |
| 561 | They are still supported but due to the confusing nomenclature they | 489 | This function returns the body height or body width of @var{window}. |
| 562 | should not be used any more in future code. | 490 | If @var{horizontal} is omitted or @code{nil}, it is equivalent to |
| 563 | 491 | calling @code{window-body-height} for @var{window}; otherwise it is | |
| 564 | @defun window-height &optional window | 492 | equivalent to calling @code{window-body-width}. |
| 565 | This function is an alias for `window-total-height', see above. | ||
| 566 | @end defun | 493 | @end defun |
| 567 | 494 | ||
| 568 | @defun window-width &optional window | 495 | @defun window-text-height &optional window |
| 569 | This function is an alias for `window-body-width', see above. | 496 | This function is like @code{window-body-height}, except that any |
| 497 | partially-visible line at the bottom of the text area is not counted. | ||
| 570 | @end defun | 498 | @end defun |
| 571 | 499 | ||
| 572 | @cindex minimum window size | 500 | For compatibility with previous versions of Emacs, |
| 573 | The following two options constrain the sizes of windows to a minimum | 501 | @code{window-height} is an alias for @code{window-body-height}, and |
| 574 | height and width. Their values are honored when windows are split | 502 | @code{window-width} is an alias for @code{window-body-width}. These |
| 575 | (@pxref{Splitting Windows}) or resized (@pxref{Resizing Windows}). Any | 503 | aliases are considered obsolete and will be removed in the future. |
| 576 | request to make a window smaller than specified here will usually result | ||
| 577 | in an error. | ||
| 578 | |||
| 579 | @defopt window-min-height | ||
| 580 | The value of this variable specifies how short a window may be. The | ||
| 581 | value is measured in line units and has to account for any header or | ||
| 582 | mode line. The default value for this option is @code{4}. Values less | ||
| 583 | than @code{1} are ignored. | ||
| 584 | @end defopt | ||
| 585 | |||
| 586 | @defopt window-min-width | ||
| 587 | The value of this variable specifies how narrow a window may be. The | ||
| 588 | value is measured in characters and includes any margins, fringes, | ||
| 589 | scroll bar and vertical divider column. The default value for this | ||
| 590 | option is @code{10}. A value less than @code{2} is ignored. | ||
| 591 | @end defopt | ||
| 592 | |||
| 593 | Applications should not rebind these variables. To shrink a specific | ||
| 594 | window to a height or width less than the one specified here, they | ||
| 595 | should rather invoke @code{window-resize} (@pxref{Resizing Windows}) | ||
| 596 | with a non-@code{nil} @var{ignore} argument. The function | ||
| 597 | @code{split-window} (@pxref{Splitting Windows}) can make a window | ||
| 598 | smaller than specified here by calling it with a non-@code{nil} | ||
| 599 | @var{size} argument. Interactively, the values specified here cannot be | ||
| 600 | overridden. | ||
| 601 | |||
| 602 | Earlier versions of Emacs could delete a window when its size dropped | ||
| 603 | below @code{window-min-height} or @code{window-min-width}. As a rule, | ||
| 604 | the current version of Emacs does no more delete windows by side-effect. | ||
| 605 | The only exception to this rule are requests to resize a frame which may | ||
| 606 | implicitly delete windows when they do not fit on the frame any more, | ||
| 607 | see @ref{Size and Position}. | ||
| 608 | |||
| 609 | The size of a window can be fixed which means that it cannot be split | ||
| 610 | (@pxref{Splitting Windows}) or resized (@pxref{Resizing Windows}). | ||
| 611 | 504 | ||
| 612 | @cindex fixed-size window | 505 | @cindex fixed-size window |
| 506 | Commands that change the size of windows (@pxref{Resizing Windows}), | ||
| 507 | or split them (@pxref{Splitting Windows}), obey the variables | ||
| 508 | @code{window-min-height} and @code{window-min-width}, which specify | ||
| 509 | the smallest allowable window height and width. @xref{Change | ||
| 510 | Window,,Deleting and Rearranging Windows, emacs, The GNU Emacs | ||
| 511 | Manual}. They also obey the variable @code{window-size-fixed}, with | ||
| 512 | which a window can be @dfn{fixed} in size: | ||
| 513 | |||
| 613 | @defvar window-size-fixed | 514 | @defvar window-size-fixed |
| 614 | If this variable is non-@code{nil}, in a given buffer, then the size of | 515 | If this buffer-local variable is non-@code{nil}, the size of any |
| 615 | any window displaying that buffer remains fixed unless you either | 516 | window displaying the buffer cannot normally be changed. Deleting a |
| 616 | explicitly change it or Emacs has no other choice. | 517 | window or changing the frame's size may still change its size, if |
| 518 | there is no choice. | ||
| 617 | 519 | ||
| 618 | If the value is @code{height}, then only the window's height is fixed; | 520 | If the value is @code{height}, then only the window's height is fixed; |
| 619 | if the value is @code{width}, then only the window's width is fixed. | 521 | if the value is @code{width}, then only the window's width is fixed. |
| 620 | Any other non-@code{nil} value fixes both the width and the height. | 522 | Any other non-@code{nil} value fixes both the width and the height. |
| 621 | |||
| 622 | This variable automatically becomes buffer-local when set. | ||
| 623 | @end defvar | 523 | @end defvar |
| 624 | 524 | ||
| 625 | Commands supposed to explicitly change the size of windows such as | 525 | @defun window-size-fixed-p &optional window horizontal |
| 626 | @code{enlarge-window} (@pxref{Resizing Windows}) get an error if they | 526 | This function returns a non-@code{nil} value if @var{window}'s height |
| 627 | had to change a window size which is fixed. Other functions like | 527 | is fixed. If @var{window} is omitted or @code{nil}, it defaults to |
| 628 | @code{window-resize} (@pxref{Resizing Windows}) have an optional | 528 | the selected window. If the optional argument @var{horizontal} is |
| 629 | @var{ignore} argument which allows to change the size of fixed-size | 529 | non-@code{nil}, the return value is non-@code{nil} if @var{window}'s |
| 630 | windows. | 530 | width is fixed. |
| 531 | |||
| 532 | A @code{nil} return value does not necessarily mean that @var{window} | ||
| 533 | can be resized in the desired direction. To determine that, use the | ||
| 534 | function @code{window-resizable}. @xref{Resizing Windows}. | ||
| 535 | @end defun | ||
| 631 | 536 | ||
| 632 | Deleting a window or changing a frame's size may change the size of a | 537 | The following functions can be used to find a window's size and |
| 633 | fixed-size window, if there is no other alternative. | 538 | position in pixels. Though mostly useful on graphical displays, they |
| 539 | can also be called on text-only terminals, where the screen area of | ||
| 540 | each text character is taken to be ``one pixel''. | ||
| 634 | 541 | ||
| 635 | The height of a vertical combination of windows cannot be changed | 542 | @defun window-pixel-edges &optional window |
| 636 | when the height of all these windows is fixed. Its width cannot be | 543 | This function return a list of pixel coordinates for the edges of |
| 637 | changed if the width of at least one of these windows is fixed. | 544 | @var{window}. If @var{window} is omitted or @code{nil}, it defaults |
| 638 | Similarly, the width of a horizontal combination of windows cannot be | 545 | to the selected window. |
| 639 | changed when the width of all these windows is fixed. Its height cannot | ||
| 640 | be changed if the height of at least one of these windows is fixed. | ||
| 641 | 546 | ||
| 642 | The next function allows to check whether the size of an arbitrary | 547 | The return value has the form @code{(@var{left} @var{top} @var{right} |
| 643 | window is fixed. | 548 | @var{bottom})}. The list elements are, respectively, the X coordinate |
| 549 | of the left window edge, the Y coordinate of the top edge, one more | ||
| 550 | than the X coordinate of the right edge, and one more than the Y | ||
| 551 | coordinate of the bottom edge. The origin coordinate @samp{(0,0)} is | ||
| 552 | taken to be the top left corner of the frame's window area. | ||
| 644 | 553 | ||
| 645 | @defun window-size-fixed-p &optional window horizontal | 554 | These edge values include the space used by the window's scroll bar, |
| 646 | This function returns non-@code{nil} if @var{window}'s height is fixed. | 555 | margins, fringes, header line, and mode line, if any. |
| 647 | The argument @var{window} can be an arbitrary window and defaults to the | 556 | @end defun |
| 648 | selected one. Optional argument @var{horizontal} non-@code{nil} means | ||
| 649 | return non-@code{nil} if @var{window}'s width is fixed. | ||
| 650 | 557 | ||
| 651 | If this function returns @code{nil}, this does not necessarily mean that | 558 | @defun window-inside-pixel-edges &optional window |
| 652 | @var{window} can be resized in the desired direction. The function | 559 | This function is like @code{window-pixel-edges}, except that it |
| 653 | @code{window-resizable} (@pxref{Resizing Windows}) can tell that. | 560 | returns the edge coordinates for the window's text area, rather than |
| 561 | the edge coordinates for the window itself. @var{window} must specify | ||
| 562 | a live window. | ||
| 654 | @end defun | 563 | @end defun |
| 655 | 564 | ||
| 565 | @defun window-absolute-pixel-edges &optional window | ||
| 566 | This function is like @code{window-pixel-edges}, except that it | ||
| 567 | returns the edge coordinates relative to the top left corner of the | ||
| 568 | display screen. | ||
| 569 | @end defun | ||
| 570 | |||
| 571 | @defun window-inside-absolute-pixel-edges &optional window | ||
| 572 | This function is like @code{window-inside-pixel-edges}, except that it | ||
| 573 | returns the edge coordinates relative to the top left corner of the | ||
| 574 | display screen. @var{window} must specify a live window. | ||
| 575 | @end defun | ||
| 656 | 576 | ||
| 657 | @node Resizing Windows | 577 | @node Resizing Windows |
| 658 | @section Resizing Windows | 578 | @section Resizing Windows |
| @@ -661,231 +581,147 @@ If this function returns @code{nil}, this does not necessarily mean that | |||
| 661 | @cindex changing window size | 581 | @cindex changing window size |
| 662 | @cindex window size, changing | 582 | @cindex window size, changing |
| 663 | 583 | ||
| 664 | Emacs does not permit overlapping windows or gaps between windows, so | 584 | This section describes functions for resizing a window without |
| 665 | changing the size of a window always affects at least one other window. | 585 | changing the size of its frame. Because live windows do not overlap, |
| 666 | When a frame contains just one window, that window can be resized only | 586 | these functions are meaningful only on frames that contain two or more |
| 667 | by resizing the window's frame. The functions described below are | 587 | windows: resizing a window also changes the size of a neighboring |
| 668 | therefore meaningful only in the context of a frame containing at least | 588 | window. If there is just one window on a frame, its size cannot be |
| 669 | two windows. The size of the corresponding frame never changes when | 589 | changed except by resizing the frame (@pxref{Size and Position}). |
| 670 | invoking a function described in this section. | 590 | |
| 671 | 591 | Except where noted, these functions also accept internal windows as | |
| 672 | The routines changing window sizes always operate in one dimension at | 592 | arguments. Resizing an internal window causes its child windows to be |
| 673 | a time. This means that windows can be resized only either vertically | 593 | resized to fit the same space. |
| 674 | or horizontally. If a window shall be resized in both dimensions, it | 594 | |
| 675 | must be resized in one dimension first and in the other dimension | 595 | @defun window-resizable window delta &optional horizontal ignore |
| 676 | afterwards. If the second resize operation fails, the frame might end | ||
| 677 | up in an unsatisfactory state. To avoid such states, it might be useful | ||
| 678 | to save the current window configuration (@pxref{Window Configurations}) | ||
| 679 | before attempting the first resize operation and restore the saved | ||
| 680 | configuration in case the second resize operation fails. | ||
| 681 | |||
| 682 | Functions that resize windows are supposed to obey restrictions | ||
| 683 | imposed by window minimum sizes and fixed-size windows, see @ref{Window | ||
| 684 | Sizes}. In order to determine whether resizing a specific window is | ||
| 685 | possible in the first place, the following function can be used: | ||
| 686 | |||
| 687 | @defun window-resizable window delta &optional horizontal ignore side noup nodown | ||
| 688 | This function returns @var{delta} if the size of @var{window} can be | 596 | This function returns @var{delta} if the size of @var{window} can be |
| 689 | changed vertically by @var{delta} lines. Optional argument | 597 | changed vertically by @var{delta} lines. If the optional argument |
| 690 | @var{horizontal} non-@code{nil} means to return @var{delta} if | 598 | @var{horizontal} is non-@code{nil}, it instead returns @var{delta} if |
| 691 | @var{window} can be resized horizontally by @var{delta} columns. A | 599 | @var{window} can be resized horizontally by @var{delta} columns. It |
| 692 | return value of zero means that @var{window} is not resizable. | 600 | does not actually change the window size. |
| 693 | 601 | ||
| 694 | If @var{delta} is a positive number, this means that @var{window} shall | 602 | If @var{window} is @code{nil}, it defaults to the selected window. |
| 695 | be enlarged by @var{delta} lines or columns. If @var{window} cannot be | 603 | |
| 696 | enlarged by @var{delta} lines or columns, this function returns the | 604 | A positive value of @var{delta} means to check whether the window can be |
| 697 | maximum value in the range from 0 to @var{delta} by which @var{window} | 605 | enlarged by that number of lines or columns; a negative value of |
| 698 | can be enlarged. | 606 | @var{delta} means to check whether the window can be shrunk by that many |
| 699 | 607 | lines or columns. If @var{delta} is non-zero, a return value of 0 means | |
| 700 | If @var{delta} is a negative number, this means that @var{window} shall | 608 | that the window cannot be resized. |
| 701 | be shrunk by -@var{delta} lines or columns. If @var{window} cannot be | 609 | |
| 702 | shrunk by -@var{delta} lines or columns, this function returns the | 610 | Normally, the variables @code{window-min-height} and |
| 703 | minimum value in the range from @var{delta} to 0 that can be used for | 611 | @code{window-min-width} specify the smallest allowable window size. |
| 704 | shrinking @var{window}. | 612 | @xref{Change Window,, Deleting and Rearranging Windows, emacs, The GNU |
| 705 | 613 | Emacs Manual}. However, if the optional argument @var{ignore} is | |
| 706 | Optional argument @var{ignore} non-@code{nil} means ignore any | 614 | non-@code{nil}, this function ignores @code{window-min-height} and |
| 707 | restrictions imposed by the variables @code{window-min-height} or | 615 | @code{window-min-width}, as well as @code{window-size-fixed}. |
| 708 | @code{window-min-width} and @code{window-size-fixed}. In this case the | 616 | Instead, it considers the minimum-height window to be one consisting |
| 709 | minimum height of a window is specified as the minimum number of lines | 617 | of a header (if any), a mode line, plus a text area one line tall; and |
| 710 | that allow viewing any header or mode line and at least one line of the | 618 | a minimum-width window as one consisting of fringes, margins, and |
| 711 | text area of window. The minimum width of a window includes any | 619 | scroll bar (if any), plus a text area two columns wide. |
| 712 | fringes, margins and the scroll bar as well as two text columns. | 620 | @end defun |
| 713 | |||
| 714 | If @var{ignore} denotes a window, this means to ignore restrictions for | ||
| 715 | that window only. If @var{ignore} equals the constant @code{safe}, this | ||
| 716 | means a live window may get as small as one line or two columns. | ||
| 717 | |||
| 718 | Optional argument @var{noup} non-@code{nil} means don't go up in the | ||
| 719 | window tree but try to steal or distribute the space needed for the | ||
| 720 | resize operation among the other windows within @var{window}'s | ||
| 721 | combination. Optional argument @var{nodown} non-@code{nil} means don't | ||
| 722 | check whether @var{window} itself and its subwindows can be resized. | ||
| 723 | @end defun | ||
| 724 | |||
| 725 | The function @code{window-resizable} does not change any window sizes. | ||
| 726 | The following function does: | ||
| 727 | 621 | ||
| 728 | @defun window-resize window delta &optional horizontal ignore | 622 | @defun window-resize window delta &optional horizontal ignore |
| 729 | This function resizes @var{window} vertically by @var{delta} lines. The | 623 | This function resizes @var{window} by @var{delta} increments. If |
| 730 | argument @var{window} can denote an arbitrary window and defaults to the | 624 | @var{horizontal} is @code{nil}, it changes the height by @var{delta} |
| 731 | selected one. An attempt to resize the root window of a frame will | 625 | lines; otherwise, it changes the width by @var{delta} columns. A |
| 732 | raise an error. | 626 | positive @var{delta} means to enlarge the window, and a negative |
| 733 | 627 | @var{delta} means to shrink it. | |
| 734 | Second argument @var{delta} a positive number means @var{window} shall | ||
| 735 | be enlarged by @var{delta} lines. If @var{delta} is negative, that | ||
| 736 | means @var{window} shall be shrunk by -@var{delta} lines. | ||
| 737 | |||
| 738 | Optional argument @var{horizontal} non-@code{nil} means to resize | ||
| 739 | @var{window} horizontally by @var{delta} columns. In this case a | ||
| 740 | positive @var{delta} means enlarge @var{window} by @var{delta} columns. | ||
| 741 | A negative @var{delta} means @var{window} shall be shrunk by | ||
| 742 | -@var{delta} columns. | ||
| 743 | |||
| 744 | Optional argument @var{ignore} has the same meaning as for the function | ||
| 745 | @code{window-resizable} above. | ||
| 746 | |||
| 747 | This function can simultaneously move two edges of WINDOW. Exactly | ||
| 748 | which edges of @var{window} are moved and which other windows are | ||
| 749 | resized along with @var{window} is determined by the splits and nest | ||
| 750 | status of the involved windows (@pxref{Splitting Windows}). If only the | ||
| 751 | low (right) edge of @var{window} shall be moved, the function | ||
| 752 | @code{adjust-window-trailing-edge} described below should be used. | ||
| 753 | @end defun | ||
| 754 | |||
| 755 | The next four commands are simple interfaces to @code{window-resize}. | ||
| 756 | They always operate on the selected window, never delete any window, and | ||
| 757 | always raise an error when resizing would violate a restriction imposed | ||
| 758 | by @code{window-min-height}, @code{window-min-width}, or | ||
| 759 | @code{window-size-fixed}. | ||
| 760 | |||
| 761 | @deffn Command enlarge-window delta &optional horizontal | ||
| 762 | This function makes the selected window @var{delta} lines taller. | ||
| 763 | Interactively, if no argument is given, it makes the selected window one | ||
| 764 | line taller. If optional argument @var{horizontal} is non-@code{nil}, | ||
| 765 | it makes the selected window wider by @var{delta} columns. If | ||
| 766 | @var{delta} is negative, it shrinks the selected window by -@var{delta} | ||
| 767 | lines or columns. The return value is @code{nil}. | ||
| 768 | @end deffn | ||
| 769 | 628 | ||
| 770 | @deffn Command enlarge-window-horizontally delta | 629 | If @var{window} is @code{nil}, it defaults to the selected window. If |
| 771 | This function makes the selected window @var{delta} columns wider. | 630 | the window cannot be resized as demanded, an error is signaled. |
| 772 | Interactively, if no argument is given, it makes the selected window one | ||
| 773 | column wider. | ||
| 774 | @end deffn | ||
| 775 | 631 | ||
| 776 | @deffn Command shrink-window delta &optional horizontal | 632 | The optional argument @var{ignore} has the same meaning as for the |
| 777 | This function makes the selected window @var{delta} lines smaller. | 633 | function @code{window-resizable} above. |
| 778 | Interactively, if no argument is given, it makes the selected window one | ||
| 779 | line smaller. If optional argument @var{horizontal} is non-@code{nil}, | ||
| 780 | it makes the selected window narrower by @var{delta} columns. If | ||
| 781 | @var{delta} is negative, it enlarges the selected window by -@var{delta} | ||
| 782 | lines or columns. The return value is @code{nil}. | ||
| 783 | @end deffn | ||
| 784 | 634 | ||
| 785 | @deffn Command shrink-window-horizontally delta | 635 | The choice of which window edge this function alters depends on the |
| 786 | This function makes the selected window @var{delta} columns narrower. | 636 | splitting and nesting status of the involved windows; in some cases, |
| 787 | Interactively, if no argument is given, it makes the selected window one | 637 | it may alter both edges. @xref{Splitting Windows}. To resize by |
| 788 | column narrower. | 638 | moving only the bottom or right edge of a window, use the function |
| 789 | @end deffn | 639 | @code{adjust-window-trailing-edge}, below. |
| 640 | @end defun | ||
| 790 | 641 | ||
| 791 | The following function is useful for moving the line dividing two | 642 | @c The commands enlarge-window, enlarge-window-horizontally, |
| 792 | windows. | 643 | @c shrink-window, and shrink-window-horizontally are documented in the |
| 644 | @c Emacs manual. They are not preferred for calling from Lisp. | ||
| 793 | 645 | ||
| 794 | @defun adjust-window-trailing-edge window delta &optional horizontal | 646 | @defun adjust-window-trailing-edge window delta &optional horizontal |
| 795 | This function moves @var{window}'s bottom edge by @var{delta} lines. | 647 | This function moves @var{window}'s bottom edge by @var{delta} lines. |
| 796 | Optional argument @var{horizontal} non-@code{nil} means to move | 648 | If optional argument @var{horizontal} is non-@code{nil}, it instead |
| 797 | @var{window}'s right edge by @var{delta} columns. The argument | 649 | moves the right edge by @var{delta} columns. If @var{window} is |
| 798 | @var{window} defaults to the selected window. | 650 | @code{nil}, it defaults to the selected window. |
| 799 | 651 | ||
| 800 | If @var{delta} is greater zero, this moves the edge downwards or to the | 652 | A positive @var{delta} moves the edge downwards or to the right; a |
| 801 | right. If @var{delta} is less than zero, this moves the edge upwards or | 653 | negative @var{delta} moves it upwards or to the left. If the edge |
| 802 | to the left. If the edge can't be moved by @var{delta} lines or columns, | 654 | cannot be moved as far as specified by @var{delta}, this function |
| 803 | it is moved as far as possible in the desired direction but no error is | 655 | moves it as far as possible but does not signal a error. |
| 804 | signalled. | ||
| 805 | 656 | ||
| 806 | This function tries to resize windows adjacent to the edge that is | 657 | This function tries to resize windows adjacent to the edge that is |
| 807 | moved. Only if this is insufficient, it will also resize windows not | 658 | moved. If this is not possible for some reason (e.g. if that adjacent |
| 808 | adjacent to that edge. As a consequence, if you move an edge in one | 659 | window is fixed-size), it may resize other windows. |
| 809 | direction and back in the other direction by the same amount, the | ||
| 810 | resulting window configuration will not be necessarily identical to the | ||
| 811 | one before the first move. So if your intend to just resize | ||
| 812 | @var{window}, you should not use this function but call | ||
| 813 | @code{window-resize} (see above) instead. | ||
| 814 | @end defun | 660 | @end defun |
| 815 | 661 | ||
| 662 | The following commands resize windows in more specific ways. When | ||
| 663 | called interactively, they act on the selected window. | ||
| 664 | |||
| 816 | @deffn Command fit-window-to-buffer &optional window max-height min-height override | 665 | @deffn Command fit-window-to-buffer &optional window max-height min-height override |
| 817 | This command makes @var{window} the right height to display its | 666 | This command adjusts the height of @var{window} to fit the text in it. |
| 818 | contents exactly. The default for @var{window} is the selected window. | 667 | It returns non-@code{nil} if it was able to resize @var{window}, and |
| 819 | 668 | @code{nil} otherwise. If @var{window} is omitted or @code{nil}, it | |
| 820 | The optional argument @var{max-height} specifies the maximum total | 669 | defaults to the selected window. Otherwise, it should be a live |
| 821 | height the window is allowed to be; @code{nil} means use the maximum | 670 | window. |
| 822 | permissible height of a window on @var{window}'s frame. The optional | 671 | |
| 823 | argument @var{min-height} specifies the minimum toatl height for the | 672 | The optional argument @var{max-height}, if non-@code{nil}, specifies |
| 824 | window; @code{nil} means use @code{window-min-height}. All these height | 673 | the maximum total height that this function can give @var{window}. |
| 825 | values include the mode line and/or header line. | 674 | The optional argument @var{min-height}, if no-@code{nil}, specifies |
| 826 | 675 | the minimum total height that it can give, which overrides the | |
| 827 | If the optional argument @var{override} is non-@code{nil}, this means to | 676 | variable @code{window-min-height}. |
| 828 | ignore any restrictions imposed by @code{window-min-height} and | 677 | |
| 829 | @code{window-min-width} on the size of @var{window}. | 678 | If the optional argument @var{override} is non-@code{nil}, this |
| 830 | 679 | function ignores any size restrictions imposed by | |
| 831 | This function returns non-@code{nil} if it orderly resized @var{window}, | 680 | @code{window-min-height} and @code{window-min-width}. |
| 832 | and @code{nil} otherwise. | ||
| 833 | @end deffn | 681 | @end deffn |
| 834 | 682 | ||
| 835 | @deffn Command shrink-window-if-larger-than-buffer &optional window | 683 | @deffn Command shrink-window-if-larger-than-buffer &optional window |
| 836 | This command shrinks @var{window} vertically to be as small as possible | 684 | This command attempts to reduce @var{window}'s height as much as |
| 837 | while still showing the full contents of its buffer---but not less than | 685 | possible while still showing its full buffer, but no less than |
| 838 | @code{window-min-height} lines. The argument @var{window} must denote | 686 | @code{window-min-height} lines. The return value is non-@code{nil} if |
| 839 | a live window and defaults to the selected one. | 687 | the window was resized, and @code{nil} otherwise. If @var{window} is |
| 840 | 688 | omitted or @code{nil}, it defaults to the selected window. Otherwise, | |
| 841 | However, this command does nothing if the window is already too small to | 689 | it should be a live window. |
| 842 | display the whole text of the buffer, or if part of the contents are | 690 | |
| 843 | currently scrolled off screen, or if the window is not the full width of | 691 | This command does nothing if the window is already too short to |
| 844 | its frame, or if the window is the only window in its frame. | 692 | display all of its buffer, or if any of the buffer is scrolled |
| 845 | 693 | off-screen, or if the window is the only live window in its frame. | |
| 846 | This command returns non-@code{nil} if it actually shrank the window | ||
| 847 | and @code{nil} otherwise. | ||
| 848 | @end deffn | 694 | @end deffn |
| 849 | 695 | ||
| 850 | @cindex balancing window sizes | 696 | @cindex balancing window sizes |
| 851 | Emacs provides two functions to balance windows, that is, to even out | ||
| 852 | the sizes of all windows on the same frame. The minibuffer window and | ||
| 853 | fixed-size windows are not resized by these functions. | ||
| 854 | |||
| 855 | @deffn Command balance-windows &optional window-or-frame | 697 | @deffn Command balance-windows &optional window-or-frame |
| 856 | This function balances windows in a way that gives more space to | 698 | This function balances windows in a way that gives more space to |
| 857 | full-width and/or full-height windows. If @var{window-or-frame} | 699 | full-width and/or full-height windows. If @var{window-or-frame} |
| 858 | specifies a frame, it balances all windows on that frame. If | 700 | specifies a frame, it balances all windows on that frame. If |
| 859 | @var{window-or-frame} specifies a window, it balances that window and | 701 | @var{window-or-frame} specifies a window, it balances only that window |
| 860 | its siblings (@pxref{Windows and Frames}) only. | 702 | and its siblings (@pxref{Windows and Frames}). |
| 861 | @end deffn | 703 | @end deffn |
| 862 | 704 | ||
| 863 | @deffn Command balance-windows-area | 705 | @deffn Command balance-windows-area |
| 864 | This function attempts to give all windows on the selected frame | 706 | This function attempts to give all windows on the selected frame |
| 865 | approximately the same share of the screen area. This means that | 707 | approximately the same share of the screen area. Full-width or |
| 866 | full-width or full-height windows are not given more space than other | 708 | full-height windows are not given more space than other windows. |
| 867 | windows. | ||
| 868 | @end deffn | 709 | @end deffn |
| 869 | 710 | ||
| 870 | @cindex maximizing windows | 711 | @cindex maximizing windows |
| 871 | The following function can be used to give a window the maximum possible | ||
| 872 | size without deleting other ones. | ||
| 873 | |||
| 874 | @deffn Command maximize-window &optional window | 712 | @deffn Command maximize-window &optional window |
| 875 | This function maximizes @var{window}. More precisely, this makes | 713 | This function attempts to make @var{window} as large as possible, in |
| 876 | @var{window} as large as possible without resizing its frame or deleting | 714 | both dimensions, without resizing its frame or deleting other windows. |
| 877 | other windows. @var{window} can be any window and defaults to the | 715 | If @var{window} is omitted or @code{nil}, it defaults to the selected |
| 878 | selected one. | 716 | window. |
| 879 | @end deffn | 717 | @end deffn |
| 880 | 718 | ||
| 881 | @cindex minimizing windows | 719 | @cindex minimizing windows |
| 882 | To make a window as small as possible without deleting it the | ||
| 883 | following function can be used. | ||
| 884 | |||
| 885 | @deffn Command minimize-window &optional window | 720 | @deffn Command minimize-window &optional window |
| 886 | This function minimizes @var{window}. More precisely, this makes | 721 | This function attempts to make @var{window} as small as possible, in |
| 887 | @var{window} as small as possible without deleting it or resizing its | 722 | both dimensions, without deleting it or resizing its frame. If |
| 888 | frame. @var{window} can be any window and defaults to the selected one. | 723 | @var{window} is omitted or @code{nil}, it defaults to the selected |
| 724 | window. | ||
| 889 | @end deffn | 725 | @end deffn |
| 890 | 726 | ||
| 891 | 727 | ||
| @@ -894,335 +730,130 @@ frame. @var{window} can be any window and defaults to the selected one. | |||
| 894 | @cindex splitting windows | 730 | @cindex splitting windows |
| 895 | @cindex window splitting | 731 | @cindex window splitting |
| 896 | 732 | ||
| 897 | The functions described below are the primitives needed for creating a | 733 | This section describes functions for creating a new window by |
| 898 | new window. They do not accept a buffer as an argument. Rather, they | 734 | @dfn{splitting} an existing one. |
| 899 | ``split'' an existing window into two halves, both displaying the buffer | ||
| 900 | previously visible in the window that was split. | ||
| 901 | 735 | ||
| 902 | @deffn Command split-window &optional window size side | 736 | @deffn Command split-window &optional window size side |
| 903 | This function creates a new window adjacent to @var{window}. It returns | 737 | This function creates a new live window next to the window |
| 904 | the new window which is always a live window. The argument @var{window} | 738 | @var{window}. If @var{window} is omitted or @code{nil}, it defaults |
| 905 | can denote any window and defaults to the selected one. This function | 739 | to the selected window. That window is ``split'', and reduced in |
| 906 | does not change the selected window. | 740 | size. The space is taken up by the new window, which is returned. |
| 907 | 741 | ||
| 908 | Optional second argument @var{size} a positive number means make | 742 | The optional second argument @var{size} determines the sizes of |
| 909 | @var{window} @var{size} lines (or columns) tall. If @var{size} is | 743 | @var{window} and/or the new window. If it is omitted or @code{nil}, |
| 910 | negative, make the new window @minus{}@var{size} lines (or columns) | 744 | both windows are given equal sizes; if there is an odd line, it is |
| 911 | tall. If @var{size} is omitted or @code{nil}, then @var{window} is | 745 | allocated to the new window. If @var{size} is a positive number, |
| 912 | divided evenly into two parts. (If there is an odd line, it is | 746 | @var{window} is given @var{size} lines (or columns, depending on the |
| 913 | allocated to the new window.) | 747 | value of @var{side}). If @var{size} is a negative number, the new |
| 914 | 748 | window is given @minus{}@var{size} lines (or columns). | |
| 915 | If splitting would result in making a window smaller than | 749 | |
| 916 | @code{window-min-height} or @code{window-min-width} (@pxref{Window | 750 | If @var{size} is @code{nil}, this function obeys the variables |
| 917 | Sizes}), this function usually signals an error. However, if @var{size} | 751 | @code{window-min-height} and @code{window-min-width}. @xref{Change |
| 918 | is non-@code{nil} and valid, a new window of the requested size is | 752 | Window,,Deleting and Rearranging Windows, emacs, The GNU Emacs |
| 919 | created. (A size value would be invalid if it assigned less than one | 753 | Manual}. Thus, it signals an error if splitting would result in |
| 920 | line or less than two columns to the new window.) | 754 | making a window smaller than those variables specify. However, a |
| 921 | 755 | non-@code{nil} value for @var{size} causes those variables to be | |
| 922 | Optional third argument @var{side} @code{nil} (or @code{below}) | 756 | ignored; in that case, the smallest allowable window is considered to |
| 923 | specifies that the new window shall be located below @var{window}. The | 757 | be one that has space for a text area one line tall and/or two columns |
| 924 | value @code{above} means the new window will be located above | 758 | wide. |
| 925 | @var{window}. In both cases @var{size} specifies the new number of | 759 | |
| 926 | lines for @var{window} (or the new window if @var{size} is negative) | 760 | The optional third argument @var{side} determines the position of the |
| 927 | including space reserved for the mode and/or header line. | 761 | new window relative to @var{window}. If it is @code{nil} or |
| 928 | 762 | @code{below}, the new window is placed below @var{window}. If it is | |
| 929 | If @var{side} is @code{t} or @code{right} the new window will be | 763 | @code{above}, the new window is placed above @var{window}. In both |
| 930 | positioned on the right side of @var{window}. The value @code{left} | 764 | these cases, @var{size} specifies a total window height, in lines. |
| 931 | means the new window will be located on the left side of @var{window}. | 765 | |
| 932 | In both cases @var{size} specifies the new number of columns for | 766 | If @var{side} is @code{t} or @code{right}, the new window is placed on |
| 933 | @var{window} (or the new window provided @var{size} is negative) | 767 | the right of @var{window}. If @var{side} is @code{left}, the new |
| 934 | including space reserved for margins, fringes and the scroll bar or a | 768 | window is placed on the left of @var{window}. In both these cases, |
| 935 | divider column. | 769 | @var{size} specifies a total window width, in columns. |
| 936 | 770 | ||
| 937 | Any other non-@code{nil} value for @var{side} is currently handled like | 771 | If @var{window} is a live window, the new window inherits various |
| 938 | @code{t} (or @code{right}). Since this might change in the future, | 772 | properties from it, including margins and scroll bars. If |
| 939 | application programs should refrain from using other values. | 773 | @var{window} is an internal window, the new window inherits the |
| 940 | 774 | properties of the window selected within @var{window}'s frame. | |
| 941 | If @var{window} is live, properties of the new window like margins and | 775 | |
| 942 | scroll bars are inherited from @var{window}. If @var{window} is an | 776 | If the variable @code{ignore-window-parameters} is non-@code{nil} |
| 943 | internal window, these properties, as well as the buffer shown in the | 777 | (@pxref{Window Parameters}), this function ignores window parameters. |
| 944 | new window, are inherited from the window selected on @var{window}'s | 778 | Otherwise, it consults the @code{split-window} parameter of |
| 945 | frame. | 779 | @var{window}; if this is @code{t}, it splits the window disregarding |
| 946 | 780 | any other window parameters. If the @code{split-window} parameter | |
| 947 | If @code{ignore-window-parameters} is non-@code{nil}, this function | 781 | specifies a function, that function is called with the arguments |
| 948 | ignores window parameters (@pxref{Window Parameters}). Otherwise, if | 782 | @var{window}, @var{size}, and @var{side} to split @var{window}, in |
| 949 | the @code{split-window} parameter of @var{window} is @code{t}, it splits | 783 | lieu of the usual action of @code{split-window}. |
| 950 | the window disregarding any other window parameters. If the | ||
| 951 | @code{split-window} parameter specifies a function, that function is | ||
| 952 | called with the arguments @var{window}, @var{size}, and @var{side} to | ||
| 953 | split @var{window}. If that function is @code{ignore}, nothing is done. | ||
| 954 | @end deffn | 784 | @end deffn |
| 955 | 785 | ||
| 956 | The following example starts with one window on a screen that is 50 | 786 | As an example, we show a combination of @code{split-window} calls |
| 957 | lines high by 80 columns wide; then it splits the window. | 787 | that yields the window configuration discussed in @ref{Windows and |
| 788 | Frames}. This example demonstrates splitting a live window as well as | ||
| 789 | splitting an internal window. We begin with a frame containing a | ||
| 790 | single window (a live root window), which we denote by @var{W4}. | ||
| 791 | Calling @code{(split-window W3)} yields this window configuration: | ||
| 958 | 792 | ||
| 959 | @smallexample | 793 | @smallexample |
| 960 | @group | 794 | @group |
| 961 | (setq W1 (selected-window)) | ||
| 962 | @result{} #<window 8 on windows.texi> | ||
| 963 | (setq W2 (split-window W1 15)) | ||
| 964 | @result{} #<window 28 on windows.texi> | ||
| 965 | @end group | ||
| 966 | @group | ||
| 967 | (window-top-line W1) | ||
| 968 | @result{} 0 | ||
| 969 | (window-total-size W1) | ||
| 970 | @result{} 15 | ||
| 971 | (window-top-line W2) | ||
| 972 | @result{} 15 | ||
| 973 | @end group | ||
| 974 | @end smallexample | ||
| 975 | |||
| 976 | The screen looks like this: | ||
| 977 | |||
| 978 | @smallexample | ||
| 979 | @group | ||
| 980 | __________ | ||
| 981 | | | line 0 | ||
| 982 | | W1 | | ||
| 983 | |__________| | ||
| 984 | | | line 15 | ||
| 985 | | W2 | | ||
| 986 | |__________| | ||
| 987 | line 50 | ||
| 988 | column 0 column 80 | ||
| 989 | @end group | ||
| 990 | @end smallexample | ||
| 991 | |||
| 992 | Next, split the top window into two side-by-side windows: | ||
| 993 | |||
| 994 | @smallexample | ||
| 995 | @group | ||
| 996 | (setq W3 (split-window W1 35 t)) | ||
| 997 | @result{} #<window 32 on windows.texi> | ||
| 998 | @end group | ||
| 999 | @group | ||
| 1000 | (window-left-column W1) | ||
| 1001 | @result{} 0 | ||
| 1002 | (window-total-size W1 t) | ||
| 1003 | @result{} 35 | ||
| 1004 | (window-left-column W3) | ||
| 1005 | @result{} 35 | ||
| 1006 | @end group | ||
| 1007 | @end smallexample | ||
| 1008 | |||
| 1009 | @need 3000 | ||
| 1010 | Now the screen looks like this: | ||
| 1011 | |||
| 1012 | @smallexample | ||
| 1013 | @group | ||
| 1014 | column 35 | ||
| 1015 | __________ | ||
| 1016 | | | | line 0 | ||
| 1017 | | W1 | W3 | | ||
| 1018 | |____|_____| | ||
| 1019 | | | line 15 | ||
| 1020 | | W2 | | ||
| 1021 | |__________| | ||
| 1022 | line 50 | ||
| 1023 | column 0 column 80 | ||
| 1024 | @end group | ||
| 1025 | @end smallexample | ||
| 1026 | |||
| 1027 | Normally, Emacs indicates the border between two side-by-side windows | ||
| 1028 | with a scroll bar (@pxref{Scroll Bars}), or with @samp{|} characters. The | ||
| 1029 | display table can specify alternative border characters; see @ref{Display | ||
| 1030 | Tables}. | ||
| 1031 | |||
| 1032 | Below we describe how @code{split-window} can be used to create the | ||
| 1033 | window configuration from our earlier example (@pxref{Windows and | ||
| 1034 | Frames}) and how internal windows are created for this purpose. We | ||
| 1035 | start with a frame containing one live window @code{W2} (in the | ||
| 1036 | following scenarios window names are assigned in an arbitrary manner in | ||
| 1037 | order to match the names of the example). Evaluating the form | ||
| 1038 | @code{(split-window W2 8 t)} creates a new internal window @code{W1} | ||
| 1039 | with two children---@code{W2} (the window we've split) and a new leaf | ||
| 1040 | window @code{W6}: | ||
| 1041 | @smallexample | ||
| 1042 | @group | ||
| 1043 | ______________________________________ | ||
| 1044 | | ______ ____________________________ | | ||
| 1045 | || || || | ||
| 1046 | || || || | ||
| 1047 | || || || | ||
| 1048 | || || || | ||
| 1049 | || || || | ||
| 1050 | || || || | ||
| 1051 | || || || | ||
| 1052 | || || || | ||
| 1053 | || || || | ||
| 1054 | || || || | ||
| 1055 | ||__W2__||_____________W6_____________ | | ||
| 1056 | |__________________W1__________________| | ||
| 1057 | |||
| 1058 | @end group | ||
| 1059 | @end smallexample | ||
| 1060 | |||
| 1061 | Evaluating now @code{(split-window W6 -3)} creates another internal | ||
| 1062 | window @code{W3} with two children---@code{W6} and a new live window | ||
| 1063 | @code{W5}. This leaves us with a vertically combined window @code{W3} | ||
| 1064 | embedded in the horizontally combined window @code{W1}: | ||
| 1065 | @smallexample | ||
| 1066 | @group | ||
| 1067 | ______________________________________ | ||
| 1068 | | ______ ____________________________ | | ||
| 1069 | || || __________________________ || | ||
| 1070 | || ||| ||| | ||
| 1071 | || ||| ||| | ||
| 1072 | || ||| ||| | ||
| 1073 | || ||| ||| | ||
| 1074 | || ||| ||| | ||
| 1075 | || |||____________W6____________||| | ||
| 1076 | || || __________________________ || | ||
| 1077 | || ||| ||| | ||
| 1078 | || |||____________W5____________||| | ||
| 1079 | ||__W2__||_____________W3_____________ | | ||
| 1080 | |__________________W1__________________| | ||
| 1081 | |||
| 1082 | @end group | ||
| 1083 | @end smallexample | ||
| 1084 | |||
| 1085 | Finally, evaluating @code{(split-window W6 nil t)} should get us the | ||
| 1086 | desired configuration as depicted below. | ||
| 1087 | @smallexample | ||
| 1088 | @group | ||
| 1089 | ______________________________________ | ||
| 1090 | | ______ ____________________________ | | ||
| 1091 | || || __________________________ || | ||
| 1092 | || ||| ___________ ___________ ||| | ||
| 1093 | || |||| || |||| | ||
| 1094 | || |||| || |||| | ||
| 1095 | || ||||_____W6____||_____W7____|||| | ||
| 1096 | || |||____________W4____________||| | ||
| 1097 | || || __________________________ || | ||
| 1098 | || ||| ||| | ||
| 1099 | || |||____________W5____________||| | ||
| 1100 | ||__W2__||_____________W3_____________ | | ||
| 1101 | |__________________W1__________________| | ||
| 1102 | |||
| 1103 | @end group | ||
| 1104 | @end smallexample | ||
| 1105 | |||
| 1106 | The scenario sketched above is the standard way to obtain the desired | ||
| 1107 | configuration. In Emacs 23 it was also the only way to do that since | ||
| 1108 | Emacs 23 did't allow splitting internal windows. | ||
| 1109 | |||
| 1110 | With Emacs 24 you can also proceed as follows: Split an initial window | ||
| 1111 | @code{W6} by evaluating @code{(split-window W6 -3)} to produce the | ||
| 1112 | following vertical combination: | ||
| 1113 | @smallexample | ||
| 1114 | @group | ||
| 1115 | ______________________________________ | 795 | ______________________________________ |
| 1116 | | ____________________________________ | | 796 | | ____________________________________ | |
| 1117 | || || | 797 | || || |
| 1118 | || || | 798 | || || |
| 1119 | || || | 799 | || || |
| 800 | ||_________________W4_________________|| | ||
| 801 | | ____________________________________ | | ||
| 1120 | || || | 802 | || || |
| 1121 | || || | 803 | || || |
| 1122 | || || | 804 | || || |
| 1123 | || || | ||
| 1124 | ||_________________W6_________________|| | ||
| 1125 | | ____________________________________ | | ||
| 1126 | || || | ||
| 1127 | ||_________________W5_________________|| | 805 | ||_________________W5_________________|| |
| 1128 | |__________________W3__________________| | 806 | |__________________W3__________________| |
| 1129 | 807 | ||
| 1130 | @end group | 808 | @end group |
| 1131 | @end smallexample | 809 | @end smallexample |
| 1132 | 810 | ||
| 1133 | Evaluating now @code{(split-window (window-parent W6) -8 'left)} or, | 811 | @noindent |
| 1134 | equivalently, @code{(split-window W3 -8 'left)} should now produce the | 812 | The @code{split-window} call has created a new live window, denoted by |
| 1135 | penultimate configuration from the previous scenario from where we can | 813 | @var{W5}. It has also created a new internal window, denoted by |
| 1136 | continue as described before. | 814 | @var{W3}, which becomes the root window and the parent of both |
| 1137 | 815 | @var{W4} and @var{W5}. | |
| 1138 | Another strategy starts with splitting an initial window @code{W6} by | ||
| 1139 | evaluating @code{(split-window W6 nil nil t)} with the following result: | ||
| 1140 | @smallexample | ||
| 1141 | @group | ||
| 1142 | ______________________________________ | ||
| 1143 | | _________________ _________________ | | ||
| 1144 | || || || | ||
| 1145 | || || || | ||
| 1146 | || || || | ||
| 1147 | || || || | ||
| 1148 | || || || | ||
| 1149 | || || || | ||
| 1150 | || || || | ||
| 1151 | || || || | ||
| 1152 | || || || | ||
| 1153 | || || || | ||
| 1154 | ||________W6_______||________W7_______|| | ||
| 1155 | |__________________W4__________________| | ||
| 1156 | |||
| 1157 | @end group | ||
| 1158 | @end smallexample | ||
| 1159 | |||
| 1160 | Evaluating now @code{(split-window W4 -3)} or @code{(split-window | ||
| 1161 | (window-parent W6) -3)} should get us a configuration as shown next. | ||
| 1162 | @smallexample | ||
| 1163 | @group | ||
| 1164 | ______________________________________ | ||
| 1165 | | ____________________________________ | | ||
| 1166 | || ________________ ________________ || | ||
| 1167 | ||| || ||| | ||
| 1168 | ||| || ||| | ||
| 1169 | ||| || ||| | ||
| 1170 | ||| || ||| | ||
| 1171 | ||| || ||| | ||
| 1172 | |||_______W6_______||________W7______||| | ||
| 1173 | ||_________________W4_________________|| | ||
| 1174 | | ____________________________________ | | ||
| 1175 | || || | ||
| 1176 | ||_________________W5_________________|| | ||
| 1177 | |__________________W3__________________| | ||
| 1178 | |||
| 1179 | @end group | ||
| 1180 | @end smallexample | ||
| 1181 | 816 | ||
| 1182 | The desired configuration can be now obtained by evaluating | 817 | Next, we call @code{(split-window W3 nil 'left)}, passing the |
| 1183 | @code{(split-window W3 -8 'left)} or, equivalently, @code{(split-window | 818 | internal window @var{W3} as the argument. The result: |
| 1184 | (window-parent W5) -8 'left)}. | ||
| 1185 | 819 | ||
| 1186 | For a final approach let's start with the configuration of two live | ||
| 1187 | windows @code{W6} and @code{W7} shown above. If we now evaluate | ||
| 1188 | @code{(split-window W4 -8 'left)} or @code{(split-window (window-parent | ||
| 1189 | W6) -8 'left)} we get the following configuration. | ||
| 1190 | @smallexample | 820 | @smallexample |
| 1191 | @group | 821 | @group |
| 1192 | ______________________________________ | 822 | ______________________________________ |
| 1193 | | ______ ____________________________ | | 823 | | ______ ____________________________ | |
| 1194 | || || ____________ ____________ || | 824 | || || __________________________ || |
| 1195 | || ||| || ||| | 825 | || ||| ||| |
| 1196 | || ||| || ||| | 826 | || ||| ||| |
| 1197 | || ||| || ||| | 827 | || ||| ||| |
| 1198 | || ||| || ||| | 828 | || |||____________W4____________||| |
| 1199 | || ||| || ||| | 829 | || || __________________________ || |
| 1200 | || ||| || ||| | 830 | || ||| ||| |
| 1201 | || ||| || ||| | 831 | || ||| ||| |
| 1202 | || |||______W6____||______W7____||| | 832 | || |||____________W5____________||| |
| 1203 | ||__W2__||_____________W4_____________|| | 833 | ||__W2__||_____________W3_____________ | |
| 1204 | |__________________W1__________________| | 834 | |__________________W1__________________| |
| 1205 | |||
| 1206 | @end group | 835 | @end group |
| 1207 | @end smallexample | 836 | @end smallexample |
| 1208 | 837 | ||
| 1209 | Evaluating now @code{(split-window W4 -3)} or, for example, | 838 | @noindent |
| 1210 | @code{(split-window (window-parent W6) -3)} should produce the desired | 839 | A new live window @var{W2} is created, to the left of the internal |
| 1211 | configuration. | 840 | window @var{W3}. A new internal window @var{W1} is created, becoming |
| 841 | the new root window. | ||
| 1212 | 842 | ||
| 1213 | The two options described next can be used to tune the operation of | 843 | The following two options can be used to modify the operation of |
| 1214 | @code{split-window}. | 844 | @code{split-window}. |
| 1215 | 845 | ||
| 1216 | @defopt window-splits | 846 | @defopt window-splits |
| 1217 | If this variable is nil, the function @code{split-window} can split a | 847 | If this variable is @code{nil}, @code{split-window} can only split a |
| 1218 | window if and only if that window's screen estate is sufficiently large | 848 | window (denoted by @var{window}) if @var{window}'s screen area is |
| 1219 | to accommodate both--itself and the new window. | 849 | large enough to accommodate both itself and the new window. This is |
| 850 | the default. | ||
| 1220 | 851 | ||
| 1221 | If this variable is non-@code{nil}, @code{split-window} tries to resize | 852 | If this variable is non-@code{nil}, @code{split-window} tries to |
| 1222 | all windows that are part of the same combination as the old window to | 853 | resize all windows that are part of the same combination as |
| 1223 | accommodate the new window. Hence, the new window can be also created if | 854 | @var{window}, in order to accommodate the new window. In particular, |
| 1224 | the old window is of fixed size or too small to split (@pxref{Window | 855 | this may allow @code{split-window} to succeed even if @var{window} is |
| 1225 | Sizes}). | 856 | a fixed-size window or too small to ordinarily split. |
| 1226 | 857 | ||
| 1227 | In any case, the value of this variable is assigned to the splits status | 858 | In any case, the value of this variable is assigned to the splits status |
| 1228 | of the new window and, provided old and new window form a new | 859 | of the new window and, provided old and new window form a new |
| @@ -1352,15 +983,15 @@ windows only. | |||
| 1352 | 983 | ||
| 1353 | @cindex nest status | 984 | @cindex nest status |
| 1354 | The @dfn{nest status} of a window specifies whether that window may be | 985 | The @dfn{nest status} of a window specifies whether that window may be |
| 1355 | removed and its subwindows recombined with that window's siblings when | 986 | removed and its child windows recombined with that window's siblings |
| 1356 | such a sibling's subwindow is deleted. The nest status is initially | 987 | when such a sibling's child window is deleted. The nest status is |
| 1357 | assigned by @code{split-window} from the current value of the variable | 988 | initially assigned by @code{split-window} from the current value of the |
| 1358 | @code{window-nest} (see above) and can be reset by the function | 989 | variable @code{window-nest} (see above) and can be reset by the function |
| 1359 | @code{set-window-nest} (see below). | 990 | @code{set-window-nest} (see below). |
| 1360 | 991 | ||
| 1361 | If the return value is @code{nil}, subwindows of @var{window} may be | 992 | If the return value is @code{nil}, child windows of @var{window} may be |
| 1362 | recombined with @var{window}'s siblings when a window gets deleted. A | 993 | recombined with @var{window}'s siblings when a window gets deleted. A |
| 1363 | return value of @code{nil} means that subwindows of @var{window} are | 994 | return value of @code{nil} means that child windows of @var{window} are |
| 1364 | never (re-)combined with @var{window}'s siblings in such a case. | 995 | never (re-)combined with @var{window}'s siblings in such a case. |
| 1365 | @end defun | 996 | @end defun |
| 1366 | 997 | ||
| @@ -1601,11 +1232,11 @@ function, it calls that function with @var{window} as its sole argument. | |||
| 1601 | @end deffn | 1232 | @end deffn |
| 1602 | 1233 | ||
| 1603 | @deffn Command delete-windows-on &optional buffer-or-name frame | 1234 | @deffn Command delete-windows-on &optional buffer-or-name frame |
| 1604 | This function deletes all windows showing @var{buffer-or-name} and | 1235 | This function deletes all windows showing @var{buffer-or-name}. If |
| 1605 | returns nil. If there are no windows showing @var{buffer-or-name}, it | 1236 | there are no windows showing @var{buffer-or-name}, it does nothing. |
| 1606 | does nothing. The optional argument @var{buffer-or-name} may be a | 1237 | The optional argument @var{buffer-or-name} may be a buffer or the name |
| 1607 | buffer or the name of an existing buffer and defaults to the current | 1238 | of an existing buffer and defaults to the current buffer. Invoking |
| 1608 | buffer. Invoking this command on a minibuffer signals an error. | 1239 | this command on a minibuffer signals an error. |
| 1609 | 1240 | ||
| 1610 | The function @code{delete-windows-on} operates by calling | 1241 | The function @code{delete-windows-on} operates by calling |
| 1611 | @code{delete-window} for each window showing @var{buffer-or-name}. If a | 1242 | @code{delete-window} for each window showing @var{buffer-or-name}. If a |
| @@ -1833,7 +1464,7 @@ This function does not select a window that has a non-@code{nil} | |||
| 1833 | @end deffn | 1464 | @end deffn |
| 1834 | 1465 | ||
| 1835 | The following function returns a copy of the list of windows in the | 1466 | The following function returns a copy of the list of windows in the |
| 1836 | cyclic odering. | 1467 | cyclic ordering. |
| 1837 | 1468 | ||
| 1838 | @defun window-list-1 &optional window &optional minibuf &optional all_frames | 1469 | @defun window-list-1 &optional window &optional minibuf &optional all_frames |
| 1839 | This function returns a list of live windows. The optional arguments | 1470 | This function returns a list of live windows. The optional arguments |
| @@ -1843,7 +1474,7 @@ in the list. See the description of @code{next-window} for details. | |||
| 1843 | The optional argument @var{window} specifies the first window to list | 1474 | The optional argument @var{window} specifies the first window to list |
| 1844 | and defaults to the selected window. If @var{window} is not on the list | 1475 | and defaults to the selected window. If @var{window} is not on the list |
| 1845 | of windows returned, some other window will be listed first but no error | 1476 | of windows returned, some other window will be listed first but no error |
| 1846 | is signalled. | 1477 | is signaled. |
| 1847 | @end defun | 1478 | @end defun |
| 1848 | 1479 | ||
| 1849 | The functions described below use @code{window-list-1} for generating a | 1480 | The functions described below use @code{window-list-1} for generating a |
| @@ -1956,7 +1587,7 @@ This function makes @var{window} display @var{buffer-or-name} and | |||
| 1956 | returns @code{nil}. The argument @var{window} has to denote a live | 1587 | returns @code{nil}. The argument @var{window} has to denote a live |
| 1957 | window and defaults to the selected one. The argument | 1588 | window and defaults to the selected one. The argument |
| 1958 | @var{buffer-or-name} must specify a buffer or the name of an existing | 1589 | @var{buffer-or-name} must specify a buffer or the name of an existing |
| 1959 | buffer. An error is signalled when @var{window} is @dfn{strongly} | 1590 | buffer. An error is signaled when @var{window} is @dfn{strongly} |
| 1960 | dedicated to its buffer (@pxref{Dedicated Windows}) and does not already | 1591 | dedicated to its buffer (@pxref{Dedicated Windows}) and does not already |
| 1961 | display @var{buffer-or-name}. | 1592 | display @var{buffer-or-name}. |
| 1962 | 1593 | ||
| @@ -2043,7 +1674,7 @@ If a window displaying @var{buffer-or-name} is dedicated | |||
| 2043 | (@pxref{Dedicated Windows}) and is not the only window on its frame, | 1674 | (@pxref{Dedicated Windows}) and is not the only window on its frame, |
| 2044 | that window is deleted. If that window is the only window on its frame | 1675 | that window is deleted. If that window is the only window on its frame |
| 2045 | and there are other frames on the frame's terminal, that frame is dealt | 1676 | and there are other frames on the frame's terminal, that frame is dealt |
| 2046 | with by the function spcecified by @code{frame-auto-hide-function} | 1677 | with by the function specified by @code{frame-auto-hide-function} |
| 2047 | (@pxref{Quitting Windows}). Otherwise, the buffer provided by the | 1678 | (@pxref{Quitting Windows}). Otherwise, the buffer provided by the |
| 2048 | function @code{switch-to-prev-buffer} (@pxref{Window History}) is | 1679 | function @code{switch-to-prev-buffer} (@pxref{Window History}) is |
| 2049 | displayed in the window instead. | 1680 | displayed in the window instead. |
| @@ -2163,7 +1794,7 @@ unless @var{norecord} is non-@code{nil}. | |||
| 2163 | 1794 | ||
| 2164 | The command @code{display-buffer} flexibly chooses a window for | 1795 | The command @code{display-buffer} flexibly chooses a window for |
| 2165 | display, and displays a specified buffer in that window. It can be | 1796 | display, and displays a specified buffer in that window. It can be |
| 2166 | called interactively, via the key binding @kbd{C-x 4 o}. It is also | 1797 | called interactively, via the key binding @kbd{C-x 4 C-o}. It is also |
| 2167 | used as a subroutine by many functions and commands, including | 1798 | used as a subroutine by many functions and commands, including |
| 2168 | @code{switch-to-buffer} and @code{pop-to-buffer} (@pxref{Switching | 1799 | @code{switch-to-buffer} and @code{pop-to-buffer} (@pxref{Switching |
| 2169 | Buffers}). | 1800 | Buffers}). |
| @@ -2221,7 +1852,7 @@ The constant @code{display-buffer-fallback-action}. | |||
| 2221 | @noindent | 1852 | @noindent |
| 2222 | Each action function is called in turn, passing the buffer as the | 1853 | Each action function is called in turn, passing the buffer as the |
| 2223 | first argument and the combined action alist as the second argument, | 1854 | first argument and the combined action alist as the second argument, |
| 2224 | until one of the functions returns non-nil. | 1855 | until one of the functions returns non-@code{nil}. |
| 2225 | 1856 | ||
| 2226 | The argument @var{action} can also have a non-@code{nil}, non-list | 1857 | The argument @var{action} can also have a non-@code{nil}, non-list |
| 2227 | value. This has the special meaning that the buffer should be | 1858 | value. This has the special meaning that the buffer should be |
| @@ -2272,7 +1903,7 @@ returns the window if it succeeds, and @code{nil} if it fails. | |||
| 2272 | This function tries to display @var{buffer} in the selected window. | 1903 | This function tries to display @var{buffer} in the selected window. |
| 2273 | It fails if the selected window is a minibuffer window or is dedicated | 1904 | It fails if the selected window is a minibuffer window or is dedicated |
| 2274 | to another buffer (@pxref{Dedicated Windows}). It also fails if | 1905 | to another buffer (@pxref{Dedicated Windows}). It also fails if |
| 2275 | @var{alist} has a non-nil @code{inhibit-same-window} entry. | 1906 | @var{alist} has a non-@code{nil} @code{inhibit-same-window} entry. |
| 2276 | @end defun | 1907 | @end defun |
| 2277 | 1908 | ||
| 2278 | @defun display-buffer-reuse-window buffer alist | 1909 | @defun display-buffer-reuse-window buffer alist |
| @@ -3281,7 +2912,7 @@ This function scrolls the text in the selected window so that point is | |||
| 3281 | displayed at a specified vertical position within the window. It does | 2912 | displayed at a specified vertical position within the window. It does |
| 3282 | not ``move point'' with respect to the text. | 2913 | not ``move point'' with respect to the text. |
| 3283 | 2914 | ||
| 3284 | If @var{count} is a nonnegative number, that puts the line containing | 2915 | If @var{count} is a non-negative number, that puts the line containing |
| 3285 | point @var{count} lines down from the top of the window. If | 2916 | point @var{count} lines down from the top of the window. If |
| 3286 | @var{count} is a negative number, then it counts upward from the | 2917 | @var{count} is a negative number, then it counts upward from the |
| 3287 | bottom of the window, so that @minus{}1 stands for the last usable | 2918 | bottom of the window, so that @minus{}1 stands for the last usable |
| @@ -3740,7 +3371,7 @@ selected one. | |||
| 3740 | 3371 | ||
| 3741 | The optional argument @var{ignore} non-@code{nil} means to ignore | 3372 | The optional argument @var{ignore} non-@code{nil} means to ignore |
| 3742 | minimum window sizes and fixed size restrictions. If @var{ignore} | 3373 | minimum window sizes and fixed size restrictions. If @var{ignore} |
| 3743 | equals @code{safe}, this means subwindows can get as small as one line | 3374 | equals @code{safe}, this means windows can get as small as one line |
| 3744 | and/or two columns. | 3375 | and/or two columns. |
| 3745 | @end defun | 3376 | @end defun |
| 3746 | 3377 | ||
diff --git a/doc/misc/auth.texi b/doc/misc/auth.texi index a16da92343e..b64562f6875 100644 --- a/doc/misc/auth.texi +++ b/doc/misc/auth.texi | |||
| @@ -64,13 +64,13 @@ It is a way for multiple applications to share a single configuration | |||
| 64 | 64 | ||
| 65 | @menu | 65 | @menu |
| 66 | * Overview:: Overview of the auth-source library. | 66 | * Overview:: Overview of the auth-source library. |
| 67 | * Help for users:: | 67 | * Help for users:: |
| 68 | * Secret Service API:: | 68 | * Secret Service API:: |
| 69 | * Help for developers:: | 69 | * Help for developers:: |
| 70 | * GnuPG and EasyPG Assistant Configuration:: | 70 | * GnuPG and EasyPG Assistant Configuration:: |
| 71 | * Index:: | 71 | * Index:: |
| 72 | * Function Index:: | 72 | * Function Index:: |
| 73 | * Variable Index:: | 73 | * Variable Index:: |
| 74 | @end menu | 74 | @end menu |
| 75 | @end ifnottex | 75 | @end ifnottex |
| 76 | 76 | ||
| @@ -182,7 +182,7 @@ Here's a mixed example using two sources: | |||
| 182 | If you don't customize @code{auth-sources}, you'll have to live with | 182 | If you don't customize @code{auth-sources}, you'll have to live with |
| 183 | the defaults: any host and any port are looked up in the netrc | 183 | the defaults: any host and any port are looked up in the netrc |
| 184 | file @code{~/.authinfo.gpg}, which is a GnuPG encrypted file | 184 | file @code{~/.authinfo.gpg}, which is a GnuPG encrypted file |
| 185 | (@pxref{GnuPG and EasyPG Assistant Configuration}). | 185 | (@pxref{GnuPG and EasyPG Assistant Configuration}). |
| 186 | 186 | ||
| 187 | If that fails, the unencrypted netrc files @code{~/.authinfo} and | 187 | If that fails, the unencrypted netrc files @code{~/.authinfo} and |
| 188 | @code{~/.netrc} will be used. | 188 | @code{~/.netrc} will be used. |
| @@ -340,7 +340,7 @@ If you are using earlier versions of Emacs, you will need: | |||
| 340 | @end lisp | 340 | @end lisp |
| 341 | 341 | ||
| 342 | If you want your GnuPG passwords to be cached, set up @code{gpg-agent} | 342 | If you want your GnuPG passwords to be cached, set up @code{gpg-agent} |
| 343 | or EasyPG Assitant | 343 | or EasyPG Assistant |
| 344 | (@pxref{Caching Passphrases, , Caching Passphrases, epa}). | 344 | (@pxref{Caching Passphrases, , Caching Passphrases, epa}). |
| 345 | 345 | ||
| 346 | To quick start, here are some questions: | 346 | To quick start, here are some questions: |
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 70ed62ddfa9..545306e4dc7 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi | |||
| @@ -1001,7 +1001,7 @@ press @kbd{^} from the Group buffer to see it. In the Server buffer, | |||
| 1001 | you can press @kbd{RET} on a defined server to see all the groups it | 1001 | you can press @kbd{RET} on a defined server to see all the groups it |
| 1002 | serves (subscribed or not!). You can also add or delete servers, edit | 1002 | serves (subscribed or not!). You can also add or delete servers, edit |
| 1003 | a foreign server's definition, agentize or de-agentize a server, and | 1003 | a foreign server's definition, agentize or de-agentize a server, and |
| 1004 | do many other neat things. @xref{Server Buffer}. | 1004 | do many other neat things. @xref{Server Buffer}. |
| 1005 | @xref{Foreign Groups}. @xref{Agent Basics}. | 1005 | @xref{Foreign Groups}. @xref{Agent Basics}. |
| 1006 | 1006 | ||
| 1007 | @vindex gnus-select-method | 1007 | @vindex gnus-select-method |
| @@ -11805,7 +11805,7 @@ fit these criteria. | |||
| 11805 | 11805 | ||
| 11806 | To use this, make sure that you have @code{w3m} and @code{curl} | 11806 | To use this, make sure that you have @code{w3m} and @code{curl} |
| 11807 | installed. If you have, then Gnus should display @acronym{HTML} | 11807 | installed. If you have, then Gnus should display @acronym{HTML} |
| 11808 | automatically. | 11808 | automatically. |
| 11809 | 11809 | ||
| 11810 | 11810 | ||
| 11811 | 11811 | ||
| @@ -21078,8 +21078,8 @@ as well. | |||
| 21078 | 21078 | ||
| 21079 | This chapter describes tools for searching groups and servers for | 21079 | This chapter describes tools for searching groups and servers for |
| 21080 | articles matching a query and then retrieving those articles. Gnus | 21080 | articles matching a query and then retrieving those articles. Gnus |
| 21081 | provides a simpler mechanism for searching through articles in a summary buffer | 21081 | provides a simpler mechanism for searching through articles in a summary buffer |
| 21082 | to find those matching a pattern. @xref{Searching for Articles}. | 21082 | to find those matching a pattern. @xref{Searching for Articles}. |
| 21083 | 21083 | ||
| 21084 | @menu | 21084 | @menu |
| 21085 | * nnir:: Searching with various engines. | 21085 | * nnir:: Searching with various engines. |
| @@ -21110,7 +21110,7 @@ interface. | |||
| 21110 | 21110 | ||
| 21111 | The @code{nnimap} and @code{gmane} search engines should work with no | 21111 | The @code{nnimap} and @code{gmane} search engines should work with no |
| 21112 | configuration. Other engines require a local index that needs to be | 21112 | configuration. Other engines require a local index that needs to be |
| 21113 | created and maintained outside of Gnus. | 21113 | created and maintained outside of Gnus. |
| 21114 | 21114 | ||
| 21115 | 21115 | ||
| 21116 | @node Basic Usage | 21116 | @node Basic Usage |
| @@ -21150,7 +21150,7 @@ One more thing: individual search engines may have special search | |||
| 21150 | features. You can access these special features by giving a prefix-arg | 21150 | features. You can access these special features by giving a prefix-arg |
| 21151 | to @code{gnus-group-make-nnir-group}. If you are searching multiple | 21151 | to @code{gnus-group-make-nnir-group}. If you are searching multiple |
| 21152 | groups with different search engines you will be prompted for the | 21152 | groups with different search engines you will be prompted for the |
| 21153 | special search features for each engine separately. | 21153 | special search features for each engine separately. |
| 21154 | 21154 | ||
| 21155 | 21155 | ||
| 21156 | @node Setting up nnir | 21156 | @node Setting up nnir |
| @@ -21191,7 +21191,7 @@ named @code{home} you can use | |||
| 21191 | 21191 | ||
| 21192 | @lisp | 21192 | @lisp |
| 21193 | (setq gnus-secondary-select-methods | 21193 | (setq gnus-secondary-select-methods |
| 21194 | '((nnml "home" | 21194 | '((nnml "home" |
| 21195 | (nnimap-address "localhost") | 21195 | (nnimap-address "localhost") |
| 21196 | (nnir-search-engine namazu)))) | 21196 | (nnir-search-engine namazu)))) |
| 21197 | @end lisp | 21197 | @end lisp |
| @@ -21216,9 +21216,9 @@ could change this to | |||
| 21216 | @node The imap Engine | 21216 | @node The imap Engine |
| 21217 | @subsubsection The imap Engine | 21217 | @subsubsection The imap Engine |
| 21218 | 21218 | ||
| 21219 | The @code{imap} engine requires no configuration. | 21219 | The @code{imap} engine requires no configuration. |
| 21220 | 21220 | ||
| 21221 | Queries using the @code{imap} engine follow a simple query language. | 21221 | Queries using the @code{imap} engine follow a simple query language. |
| 21222 | The search is always case-insensitive and supports the following | 21222 | The search is always case-insensitive and supports the following |
| 21223 | features (inspired by the Google search input language): | 21223 | features (inspired by the Google search input language): |
| 21224 | 21224 | ||
| @@ -21231,7 +21231,7 @@ operators must be written with all capital letters to be | |||
| 21231 | recognised. Also preceding a term with a - sign is equivalent to NOT | 21231 | recognised. Also preceding a term with a - sign is equivalent to NOT |
| 21232 | term. | 21232 | term. |
| 21233 | 21233 | ||
| 21234 | @item Automatic AND queries | 21234 | @item Automatic AND queries |
| 21235 | If you specify multiple words then they will be treated as an AND | 21235 | If you specify multiple words then they will be treated as an AND |
| 21236 | expression intended to match all components. | 21236 | expression intended to match all components. |
| 21237 | 21237 | ||
| @@ -21264,7 +21264,7 @@ customize @code{nnir-imap-default-search-key}. For example to use | |||
| 21264 | @node The gmane Engine | 21264 | @node The gmane Engine |
| 21265 | @subsubsection The gmane Engine | 21265 | @subsubsection The gmane Engine |
| 21266 | 21266 | ||
| 21267 | The @code{gmane} engine requires no configuration. | 21267 | The @code{gmane} engine requires no configuration. |
| 21268 | 21268 | ||
| 21269 | Gmane queries follow a simple query language: | 21269 | Gmane queries follow a simple query language: |
| 21270 | 21270 | ||
| @@ -21278,11 +21278,11 @@ recognised. | |||
| 21278 | @item Required and excluded terms | 21278 | @item Required and excluded terms |
| 21279 | + and - can be used to require or exclude terms, e.g. football -american | 21279 | + and - can be used to require or exclude terms, e.g. football -american |
| 21280 | 21280 | ||
| 21281 | @item Unicode handling | 21281 | @item Unicode handling |
| 21282 | The search engine converts all text to utf-8, so searching should work | 21282 | The search engine converts all text to utf-8, so searching should work |
| 21283 | in any language. | 21283 | in any language. |
| 21284 | 21284 | ||
| 21285 | @item Stopwords | 21285 | @item Stopwords |
| 21286 | Common English words (like 'the' and 'a') are ignored by default. You | 21286 | Common English words (like 'the' and 'a') are ignored by default. You |
| 21287 | can override this by prefixing such words with a + (e.g. +the) or | 21287 | can override this by prefixing such words with a + (e.g. +the) or |
| 21288 | enclosing the word in quotes (e.g. "the"). | 21288 | enclosing the word in quotes (e.g. "the"). |
| @@ -21345,7 +21345,7 @@ to get a group name. By default this is @code{$HOME/Mail}. | |||
| 21345 | Using the namazu engine requires creating and maintaining index files. | 21345 | Using the namazu engine requires creating and maintaining index files. |
| 21346 | One directory should contain all the index files, and nnir must be told | 21346 | One directory should contain all the index files, and nnir must be told |
| 21347 | where to find them by setting the @code{nnir-namazu-index-directory} | 21347 | where to find them by setting the @code{nnir-namazu-index-directory} |
| 21348 | variable. | 21348 | variable. |
| 21349 | 21349 | ||
| 21350 | To work correctly the @code{nnir-namazu-remove-prefix} variable must | 21350 | To work correctly the @code{nnir-namazu-remove-prefix} variable must |
| 21351 | also be correct. This is the prefix to remove from each file name | 21351 | also be correct. This is the prefix to remove from each file name |
| @@ -21408,7 +21408,7 @@ this command periodically, say every four hours. | |||
| 21408 | This engine is obsolete. | 21408 | This engine is obsolete. |
| 21409 | 21409 | ||
| 21410 | @node Customizations | 21410 | @node Customizations |
| 21411 | @subsubsection Custimozations | 21411 | @subsubsection Customizations |
| 21412 | 21412 | ||
| 21413 | @table @code | 21413 | @table @code |
| 21414 | 21414 | ||
| @@ -621,6 +621,10 @@ view-diary-entries, list-diary-entries, show-all-diary-entries | |||
| 621 | inserted by the compilation filter function, when calling | 621 | inserted by the compilation filter function, when calling |
| 622 | compilation-filter-hook. | 622 | compilation-filter-hook. |
| 623 | 623 | ||
| 624 | *** `compilation-error-screen-columns' is obeyed in the editing buffer. | ||
| 625 | So programming language modes can set it, whereas previously only the value | ||
| 626 | in the *compilation* buffer was used. | ||
| 627 | |||
| 624 | ** Customize | 628 | ** Customize |
| 625 | 629 | ||
| 626 | *** Customize buffers now contain a search field. | 630 | *** Customize buffers now contain a search field. |
diff --git a/etc/images/icons/allout-widgets/light-bg/locked-encrypted.png b/etc/images/icons/allout-widgets/light-bg/locked-encrypted.png index a6bc3e99a7a..a6bc3e99a7a 100755..100644 --- a/etc/images/icons/allout-widgets/light-bg/locked-encrypted.png +++ b/etc/images/icons/allout-widgets/light-bg/locked-encrypted.png | |||
| Binary files differ | |||
diff --git a/etc/images/icons/allout-widgets/light-bg/unlocked-encrypted.png b/etc/images/icons/allout-widgets/light-bg/unlocked-encrypted.png index e70d075690a..e70d075690a 100755..100644 --- a/etc/images/icons/allout-widgets/light-bg/unlocked-encrypted.png +++ b/etc/images/icons/allout-widgets/light-bg/unlocked-encrypted.png | |||
| Binary files differ | |||
diff --git a/leim/quail/ipa.el b/leim/quail/ipa.el index 425a0591c9d..503d8b4ec89 100644 --- a/leim/quail/ipa.el +++ b/leim/quail/ipa.el | |||
| @@ -451,7 +451,7 @@ displays them, incorrectly, as separate from the modified glyphs.") | |||
| 451 | ;; them, and the recipient's client is capable, they will get through, | 451 | ;; them, and the recipient's client is capable, they will get through, |
| 452 | ;; though. | 452 | ;; though. |
| 453 | 453 | ||
| 454 | ("_\"" "̈") ;; Centralised U+0308 | 454 | ("_\"" "̈") ;; Centralized U+0308 |
| 455 | ("_+" "ÌŸ") ;; Advanced U+031F | 455 | ("_+" "ÌŸ") ;; Advanced U+031F |
| 456 | ("_-" "Ì ") ;; Retracted U+0320 | 456 | ("_-" "Ì ") ;; Retracted U+0320 |
| 457 | ("_/" "ˇ") ;; Rising tone U+02C7 | 457 | ("_/" "ˇ") ;; Rising tone U+02C7 |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6cc9cc86515..6df54fb4527 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,120 @@ | |||
| 1 | 2011-11-11 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * subr.el (eval-after-load): If FILE is already loaded, | ||
| 4 | evaluate FORM before it gets wrapped in more stuff. (Bug#10009) | ||
| 5 | |||
| 6 | 2011-11-10 Glenn Morris <rgm@gnu.org> | ||
| 7 | |||
| 8 | * vc/vc-svn.el (vc-svn-create-repo, vc-svn-modify-change-comment): | ||
| 9 | Call svn via vc-svn-command rather than vc-do-command. | ||
| 10 | (vc-svn-command): Add --non-interactive. (Bug#9993) | ||
| 11 | (vc-svn-update, vc-svn-merge-news): No need for --non-interactive. | ||
| 12 | |||
| 13 | * emacs-lisp/bytecomp.el (byte-compile-interactive-only-functions): | ||
| 14 | Add toggle-read-only. (Bug#7292) | ||
| 15 | * files.el (toggle-read-only): Mention that it should only | ||
| 16 | be used interactively. (Bug#10006) | ||
| 17 | |||
| 18 | 2011-11-09 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 19 | |||
| 20 | * progmodes/compile.el (compilation-error-regexp-alist-alist): | ||
| 21 | Adjust regexp for OCaml warnings. | ||
| 22 | |||
| 23 | * electric.el (electric-pair-post-self-insert-function): Let user | ||
| 24 | turn it off buffer-locally (bug#9932). | ||
| 25 | |||
| 26 | * progmodes/python.el (python-beginning-of-statement): | ||
| 27 | Rewrite (bug#2703). | ||
| 28 | |||
| 29 | * progmodes/compile.el: Better handle TABs (bug#9749). | ||
| 30 | (compilation-internal-error-properties) | ||
| 31 | (compilation-next-error-function): Obey the target buffer's | ||
| 32 | compilation-error-screen-columns. | ||
| 33 | |||
| 34 | 2011-11-09 Juanma Barranquero <lekktu@gmail.com> | ||
| 35 | |||
| 36 | * progmodes/meta-mode.el: Remove obsolete comments. | ||
| 37 | (meta-right-comment-regexp, meta-ignore-comment-regexp): | ||
| 38 | Fix typos in docstrings. | ||
| 39 | |||
| 40 | 2011-11-09 Martin Rudalics <rudalics@gmx.at> | ||
| 41 | |||
| 42 | * window.el (window-size-fixed-p): Rewrite doc-string. | ||
| 43 | (window-resizable-p): Rename to window--resizable-p. Update callers. | ||
| 44 | (window--resizable): New function. Make all callers of | ||
| 45 | window-resizable call window--resizable instead. | ||
| 46 | (window-resizable): Rewrite in terms of window--resizable. | ||
| 47 | |||
| 48 | 2011-11-08 Glenn Morris <rgm@gnu.org> | ||
| 49 | |||
| 50 | * progmodes/delphi.el (delphi-mode-syntax-table): | ||
| 51 | Let define-derived-mode define a proper syntax table. (Bug#9994) | ||
| 52 | |||
| 53 | 2011-11-08 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 54 | |||
| 55 | * window.el: Stay away from defsubst. | ||
| 56 | (window-list-no-nils): Remove. | ||
| 57 | (window-state-get-1, window-state-get): Use backquote instead. | ||
| 58 | |||
| 59 | 2011-11-08 thierry <thierry.volpiatto@gmail.com> | ||
| 60 | |||
| 61 | * emacs-lisp/find-func.el (find-function-read): | ||
| 62 | Fix incorrect use of default argument in `completing-read'. | ||
| 63 | |||
| 64 | 2011-11-08 Martin Rudalics <rudalics@gmx.at> | ||
| 65 | |||
| 66 | * window.el (display-buffer-function, special-display-function): | ||
| 67 | Mention display-buffer-record-window but do not mention | ||
| 68 | help-setup parameter in doc-strings. | ||
| 69 | (window-min-delta): Fix doc-string typo. | ||
| 70 | |||
| 71 | 2011-11-08 Chong Yidong <cyd@gnu.org> | ||
| 72 | |||
| 73 | * window.el (window-total-height, window-total-width): Doc fix. | ||
| 74 | (window-body-size): Move from C. | ||
| 75 | (window-body-height, window-body-width): Move to C. | ||
| 76 | |||
| 77 | 2011-11-08 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 78 | |||
| 79 | * window.el: Make special-display like display-buffer-alist (bug#9532). | ||
| 80 | (display-buffer--special-action): New function, morphed | ||
| 81 | from display-buffer--special. | ||
| 82 | (display-buffer): Use it to handle special-display-buffers at higher | ||
| 83 | priority (just after display-buffer-alist). | ||
| 84 | (display-buffer-fallback-action, display-buffer--other-frame-action) | ||
| 85 | (pop-to-buffer-same-window): Remove display-buffer--special. | ||
| 86 | |||
| 87 | 2011-11-07 Glenn Morris <rgm@gnu.org> | ||
| 88 | |||
| 89 | * calendar/cal-menu.el (cal-menu-set-date-title): | ||
| 90 | Do nothing if not in a calendar. (Bug#9976) | ||
| 91 | |||
| 92 | 2011-11-07 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 93 | |||
| 94 | * files.el (find-file): Always use selected-window. | ||
| 95 | |||
| 96 | 2011-11-07 Martin Rudalics <rudalics@gmx.at> | ||
| 97 | |||
| 98 | * window.el (window-combinations): Make WINDOW argument | ||
| 99 | mandatory. Rewrite doc-string. | ||
| 100 | (walk-window-subtree, window-atom-check, window-min-delta) | ||
| 101 | (window-max-delta, window--resize-this-window) | ||
| 102 | (window--resize-root-window-vertically, window-tree) | ||
| 103 | (balance-windows, window-state-put): Rewrite doc-strings as to | ||
| 104 | not mention the term "subwindow". | ||
| 105 | (window--resize-subwindows-skip-p): Rename to | ||
| 106 | window--resize-child-windows-skip-p. | ||
| 107 | (window--resize-subwindows-normal): Rename to | ||
| 108 | window--resize-child-windows-normal. | ||
| 109 | (window--resize-subwindows): Rename to | ||
| 110 | window--resize-child-windows. | ||
| 111 | (window-or-subwindow-p): Rename to window--in-subtree-p. | ||
| 112 | |||
| 113 | 2011-11-07 Mark Lillibridge <mark.lillibridge@hp.com> (tiny change) | ||
| 114 | |||
| 115 | * mail/rmail.el (rmail-get-new-mail, rmail-insert-inbox-text): | ||
| 116 | Ensure that mbox format messages end in two newlines (Bug#9974). | ||
| 117 | |||
| 1 | 2011-11-06 Chong Yidong <cyd@gnu.org> | 118 | 2011-11-06 Chong Yidong <cyd@gnu.org> |
| 2 | 119 | ||
| 3 | * window.el (window-combination-p): Function deleted; its | 120 | * window.el (window-combination-p): Function deleted; its |
| @@ -11,7 +128,7 @@ | |||
| 11 | (window-size-ignore, window-state-get): Callers changed. | 128 | (window-size-ignore, window-state-get): Callers changed. |
| 12 | (window-normalize-window): Rename from window-normalize-any-window. | 129 | (window-normalize-window): Rename from window-normalize-any-window. |
| 13 | New arg LIVE-ONLY, replacing window-normalize-live-window. | 130 | New arg LIVE-ONLY, replacing window-normalize-live-window. |
| 14 | (window-normalize-live-window): Deleted. | 131 | (window-normalize-live-window): Delete. |
| 15 | (window-combination-p, window-combined-p, window-combinations) | 132 | (window-combination-p, window-combined-p, window-combinations) |
| 16 | (walk-window-subtree, window-atom-root, window-min-size) | 133 | (walk-window-subtree, window-atom-root, window-min-size) |
| 17 | (window-sizable, window-sizable-p, window-size-fixed-p) | 134 | (window-sizable, window-sizable-p, window-size-fixed-p) |
diff --git a/lisp/calendar/cal-menu.el b/lisp/calendar/cal-menu.el index 3ebb7edab3f..d8de171c0a1 100644 --- a/lisp/calendar/cal-menu.el +++ b/lisp/calendar/cal-menu.el | |||
| @@ -215,13 +215,15 @@ is non-nil." | |||
| 215 | ;; but easymenu does not seem to allow this (?). | 215 | ;; but easymenu does not seem to allow this (?). |
| 216 | ;; The ignore-errors is because `documentation' can end up calling | 216 | ;; The ignore-errors is because `documentation' can end up calling |
| 217 | ;; this in a non-calendar buffer where displayed-month is unbound. (Bug#3862) | 217 | ;; this in a non-calendar buffer where displayed-month is unbound. (Bug#3862) |
| 218 | ;; This still has issues - bug#9976, so added derived-mode-p call. | ||
| 218 | (defun cal-menu-set-date-title (menu) | 219 | (defun cal-menu-set-date-title (menu) |
| 219 | "Convert date of last event to title suitable for MENU." | 220 | "Convert date of last event to title suitable for MENU." |
| 220 | (let ((date (ignore-errors (calendar-cursor-to-date nil last-input-event)))) | 221 | (when (derived-mode-p 'calendar-mode) |
| 221 | (if date | 222 | (let ((date (ignore-errors (calendar-cursor-to-date nil last-input-event)))) |
| 222 | (easy-menu-filter-return menu (calendar-date-string date t nil)) | 223 | (if date |
| 223 | (message "Not on a date!") | 224 | (easy-menu-filter-return menu (calendar-date-string date t nil)) |
| 224 | nil))) | 225 | (message "Not on a date!") |
| 226 | nil)))) | ||
| 225 | 227 | ||
| 226 | (easy-menu-define cal-menu-context-mouse-menu nil | 228 | (easy-menu-define cal-menu-context-mouse-menu nil |
| 227 | "Pop up mouse menu for selected date in the calendar window." | 229 | "Pop up mouse menu for selected date in the calendar window." |
diff --git a/lisp/delim-col.el b/lisp/delim-col.el index d9f8634fb54..ed6ab96107a 100644 --- a/lisp/delim-col.el +++ b/lisp/delim-col.el | |||
| @@ -194,7 +194,7 @@ Any other value is treated as t." | |||
| 194 | :tag "Column Formating" | 194 | :tag "Column Formating" |
| 195 | (const :tag "No Formating" nil) | 195 | (const :tag "No Formating" nil) |
| 196 | (const :tag "Column Alignment" t) | 196 | (const :tag "Column Alignment" t) |
| 197 | (const :tag "Separator Aligment" separator) | 197 | (const :tag "Separator Alignment" separator) |
| 198 | (const :tag "Column Padding" padding)) | 198 | (const :tag "Column Padding" padding)) |
| 199 | :group 'columns) | 199 | :group 'columns) |
| 200 | 200 | ||
diff --git a/lisp/electric.el b/lisp/electric.el index 26fba20ea12..3d7c1fd8ac4 100644 --- a/lisp/electric.el +++ b/lisp/electric.el | |||
| @@ -284,6 +284,7 @@ This can be convenient for people who find it easier to hit ) than C-f." | |||
| 284 | 284 | ||
| 285 | (defun electric-pair-post-self-insert-function () | 285 | (defun electric-pair-post-self-insert-function () |
| 286 | (let* ((syntax (and (eq (char-before) last-command-event) ; Sanity check. | 286 | (let* ((syntax (and (eq (char-before) last-command-event) ; Sanity check. |
| 287 | electric-pair-mode | ||
| 287 | (let ((x (assq last-command-event electric-pair-pairs))) | 288 | (let ((x (assq last-command-event electric-pair-pairs))) |
| 288 | (cond | 289 | (cond |
| 289 | (x (if (eq (car x) (cdr x)) ?\" ?\()) | 290 | (x (if (eq (car x) (cdr x)) ?\" ?\()) |
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index fae402d4215..84aaf8718ed 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el | |||
| @@ -355,7 +355,7 @@ else the global value will be modified." | |||
| 355 | (defvar byte-compile-interactive-only-functions | 355 | (defvar byte-compile-interactive-only-functions |
| 356 | '(beginning-of-buffer end-of-buffer replace-string replace-regexp | 356 | '(beginning-of-buffer end-of-buffer replace-string replace-regexp |
| 357 | insert-file insert-buffer insert-file-literally previous-line next-line | 357 | insert-file insert-buffer insert-file-literally previous-line next-line |
| 358 | goto-line comint-run delete-backward-char) | 358 | goto-line comint-run delete-backward-char toggle-read-only) |
| 359 | "List of commands that are not meant to be called from Lisp.") | 359 | "List of commands that are not meant to be called from Lisp.") |
| 360 | 360 | ||
| 361 | (defvar byte-compile-not-obsolete-vars nil | 361 | (defvar byte-compile-not-obsolete-vars nil |
diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index 08e73b32a15..070faca8d91 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el | |||
| @@ -363,29 +363,23 @@ If TYPE is nil, insist on a symbol with a function definition. | |||
| 363 | Otherwise TYPE should be `defvar' or `defface'. | 363 | Otherwise TYPE should be `defvar' or `defface'. |
| 364 | If TYPE is nil, defaults using `function-called-at-point', | 364 | If TYPE is nil, defaults using `function-called-at-point', |
| 365 | otherwise uses `variable-at-point'." | 365 | otherwise uses `variable-at-point'." |
| 366 | (let ((symb (if (null type) | 366 | (let* ((symb1 (cond ((null type) (function-called-at-point)) |
| 367 | (function-called-at-point) | 367 | ((eq type 'defvar) (variable-at-point)) |
| 368 | (if (eq type 'defvar) | 368 | (t (variable-at-point t)))) |
| 369 | (variable-at-point) | 369 | (symb (unless (eq symb1 0) symb1)) |
| 370 | (variable-at-point t)))) | 370 | (predicate (cdr (assq type '((nil . fboundp) |
| 371 | (predicate (cdr (assq type '((nil . fboundp) (defvar . boundp) | 371 | (defvar . boundp) |
| 372 | (defface . facep))))) | 372 | (defface . facep))))) |
| 373 | (prompt (cdr (assq type '((nil . "function") (defvar . "variable") | 373 | (prompt-type (cdr (assq type '((nil . "function") |
| 374 | (defface . "face"))))) | 374 | (defvar . "variable") |
| 375 | (enable-recursive-minibuffers t) | 375 | (defface . "face"))))) |
| 376 | val) | 376 | (prompt (concat "Find " prompt-type |
| 377 | (if (equal symb 0) | 377 | (and symb (format " (default %s)" symb)) |
| 378 | (setq symb nil)) | 378 | ": ")) |
| 379 | (setq val (completing-read | 379 | (enable-recursive-minibuffers t)) |
| 380 | (concat "Find " | 380 | (list (intern (completing-read |
| 381 | prompt | 381 | prompt obarray predicate |
| 382 | (if symb | 382 | t nil nil (and symb (symbol-name symb))))))) |
| 383 | (format " (default %s)" symb)) | ||
| 384 | ": ") | ||
| 385 | obarray predicate t nil)) | ||
| 386 | (list (if (equal val "") | ||
| 387 | symb | ||
| 388 | (intern val))))) | ||
| 389 | 383 | ||
| 390 | (defun find-function-do-it (symbol type switch-fn) | 384 | (defun find-function-do-it (symbol type switch-fn) |
| 391 | "Find Emacs Lisp SYMBOL in a buffer and display it. | 385 | "Find Emacs Lisp SYMBOL in a buffer and display it. |
diff --git a/lisp/emulation/edt.el b/lisp/emulation/edt.el index 7ed0255d987..acdc3caa449 100644 --- a/lisp/emulation/edt.el +++ b/lisp/emulation/edt.el | |||
| @@ -2484,7 +2484,7 @@ Argument GOLD-BINDING is the Emacs function to be bound to GOLD <KEY>." | |||
| 2484 | F10: Cut Rectangle | 2484 | F10: Cut Rectangle |
| 2485 | G-F10: Paste Rectangle | 2485 | G-F10: Paste Rectangle |
| 2486 | F11: ESC | 2486 | F11: ESC |
| 2487 | F12: Begining of Line +----------+----------+----------+----------+ | 2487 | F12: Beginning of Line +----------+----------+----------+----------+ |
| 2488 | G-F12: Delete Other Windows | GOLD | HELP | FNDNXT | DEL L | | 2488 | G-F12: Delete Other Windows | GOLD | HELP | FNDNXT | DEL L | |
| 2489 | F13: Delete to Begin of Word | (PF1) | (PF2) | (PF3) | (PF4) | | 2489 | F13: Delete to Begin of Word | (PF1) | (PF2) | (PF3) | (PF4) | |
| 2490 | HELP: Keypad Help |Mark Wisel|Desc Funct| FIND | UND L | | 2490 | HELP: Keypad Help |Mark Wisel|Desc Funct| FIND | UND L | |
diff --git a/lisp/files.el b/lisp/files.el index 40e2df14c1b..aac415c1a96 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -1343,7 +1343,7 @@ automatically choosing a major mode, use \\[find-file-literally]." | |||
| 1343 | (let ((value (find-file-noselect filename nil nil wildcards))) | 1343 | (let ((value (find-file-noselect filename nil nil wildcards))) |
| 1344 | (if (listp value) | 1344 | (if (listp value) |
| 1345 | (mapcar 'switch-to-buffer (nreverse value)) | 1345 | (mapcar 'switch-to-buffer (nreverse value)) |
| 1346 | (switch-to-buffer value)))) | 1346 | (switch-to-buffer value nil 'force-same-window)))) |
| 1347 | 1347 | ||
| 1348 | (defun find-file-other-window (filename &optional wildcards) | 1348 | (defun find-file-other-window (filename &optional wildcards) |
| 1349 | "Edit file FILENAME, in another window. | 1349 | "Edit file FILENAME, in another window. |
| @@ -4686,7 +4686,15 @@ prints a message in the minibuffer. Instead, use `set-buffer-modified-p'." | |||
| 4686 | "Change whether this buffer is read-only. | 4686 | "Change whether this buffer is read-only. |
| 4687 | With prefix argument ARG, make the buffer read-only if ARG is | 4687 | With prefix argument ARG, make the buffer read-only if ARG is |
| 4688 | positive, otherwise make it writable. If buffer is read-only | 4688 | positive, otherwise make it writable. If buffer is read-only |
| 4689 | and `view-read-only' is non-nil, enter view mode." | 4689 | and `view-read-only' is non-nil, enter view mode. |
| 4690 | |||
| 4691 | This function is usually the wrong thing to use in a Lisp program. | ||
| 4692 | It can have side-effects beyond changing the read-only status of a buffer | ||
| 4693 | \(e.g., enabling view mode), and does not affect read-only regions that | ||
| 4694 | are caused by text properties. To make a buffer read-only in Lisp code, | ||
| 4695 | set `buffer-read-only'. To ignore read-only status (whether due to text | ||
| 4696 | properties or buffer state) and make changes, temporarily bind | ||
| 4697 | `inhibit-read-only'." | ||
| 4690 | (interactive "P") | 4698 | (interactive "P") |
| 4691 | (if (and arg | 4699 | (if (and arg |
| 4692 | (if (> (prefix-numeric-value arg) 0) buffer-read-only | 4700 | (if (> (prefix-numeric-value arg) 0) buffer-read-only |
diff --git a/lisp/generic-x.el b/lisp/generic-x.el index 5205a6811f6..2c00229c76e 100644 --- a/lisp/generic-x.el +++ b/lisp/generic-x.el | |||
| @@ -1436,7 +1436,7 @@ like an INI file. You can add this hook to `find-file-hook'." | |||
| 1436 | "REGDB_APPPATH" | 1436 | "REGDB_APPPATH" |
| 1437 | "REGDB_BINARY" | 1437 | "REGDB_BINARY" |
| 1438 | "REGDB_ERR_CONNECTIONEXISTS" | 1438 | "REGDB_ERR_CONNECTIONEXISTS" |
| 1439 | "REGDB_ERR_CORRUPTEDREGSITRY" | 1439 | "REGDB_ERR_CORRUPTEDREGISTRY" |
| 1440 | "REGDB_ERR_INITIALIZATION" | 1440 | "REGDB_ERR_INITIALIZATION" |
| 1441 | "REGDB_ERR_INVALIDHANDLE" | 1441 | "REGDB_ERR_INVALIDHANDLE" |
| 1442 | "REGDB_ERR_INVALIDNAME" | 1442 | "REGDB_ERR_INVALIDNAME" |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index c36d4729518..fbbf3bad5a8 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -18491,7 +18491,7 @@ | |||
| 18491 | 2004-10-05 Jesper Harder <harder@ifa.au.dk> | 18491 | 2004-10-05 Jesper Harder <harder@ifa.au.dk> |
| 18492 | 18492 | ||
| 18493 | * nnsoup.el (nnsoup-read-active-file): Use dolist, mapc or last | 18493 | * nnsoup.el (nnsoup-read-active-file): Use dolist, mapc or last |
| 18494 | where approriate. | 18494 | where appropriate. |
| 18495 | 18495 | ||
| 18496 | * nnml.el (nnml-generate-active-info): do. | 18496 | * nnml.el (nnml-generate-active-info): do. |
| 18497 | 18497 | ||
diff --git a/lisp/gnus/smime.el b/lisp/gnus/smime.el index 5a7079883e6..f0951b7b803 100644 --- a/lisp/gnus/smime.el +++ b/lisp/gnus/smime.el | |||
| @@ -689,7 +689,7 @@ The following commands are available: | |||
| 689 | (dolist (key smime-keys) | 689 | (dolist (key smime-keys) |
| 690 | (insert | 690 | (insert |
| 691 | (format "\t\t%s: %s\n" (car key) (cadr key)))) | 691 | (format "\t\t%s: %s\n" (car key) (cadr key)))) |
| 692 | (insert "\nTrusted Certificate Authoritys:\n") | 692 | (insert "\nTrusted Certificate Authorities:\n") |
| 693 | (insert "\nKnown Certificates:\n")))) | 693 | (insert "\nKnown Certificates:\n")))) |
| 694 | 694 | ||
| 695 | (defun smime () | 695 | (defun smime () |
diff --git a/lisp/international/robin.el b/lisp/international/robin.el index 7e98a507f93..6f78aaede3f 100644 --- a/lisp/international/robin.el +++ b/lisp/international/robin.el | |||
| @@ -22,7 +22,7 @@ | |||
| 22 | ;; You should have received a copy of the GNU General Public License | 22 | ;; You should have received a copy of the GNU General Public License |
| 23 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | 23 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
| 24 | 24 | ||
| 25 | ;;; Comentary: | 25 | ;;; Commentary: |
| 26 | 26 | ||
| 27 | ;; Functionalities | 27 | ;; Functionalities |
| 28 | ;; --------------- | 28 | ;; --------------- |
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index a535d3a86db..4b3441a8cdc 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el | |||
| @@ -1721,10 +1721,12 @@ not be a new one). It returns non-nil if it got any new messages." | |||
| 1721 | (setq all-files (cdr all-files))) | 1721 | (setq all-files (cdr all-files))) |
| 1722 | ;; Put them back in their original order. | 1722 | ;; Put them back in their original order. |
| 1723 | (setq files (nreverse files)) | 1723 | (setq files (nreverse files)) |
| 1724 | ;; In case of brain damage caused by require-final-newline. | ||
| 1725 | (goto-char (point-max)) | 1724 | (goto-char (point-max)) |
| 1726 | (skip-chars-backward " \t\n") | 1725 | ;; Make sure we end with a blank line unless there are |
| 1727 | (delete-region (point) (point-max)) | 1726 | ;; no messages, as required by mbox format (Bug#9974). |
| 1727 | (unless (bobp) | ||
| 1728 | (while (not (looking-back "\n\n")) | ||
| 1729 | (insert "\n"))) | ||
| 1728 | (setq found (or | 1730 | (setq found (or |
| 1729 | (rmail-get-new-mail-1 file-name files delete-files) | 1731 | (rmail-get-new-mail-1 file-name files delete-files) |
| 1730 | found)))) | 1732 | found)))) |
| @@ -2024,22 +2026,12 @@ Value is the size of the newly read mail after conversion." | |||
| 2024 | (rmail-unrmail-new-mail-maybe | 2026 | (rmail-unrmail-new-mail-maybe |
| 2025 | tofile | 2027 | tofile |
| 2026 | (nth 1 (insert-file-contents tofile)))) | 2028 | (nth 1 (insert-file-contents tofile)))) |
| 2027 | ;; Determine if a pair of newline message separators need | ||
| 2028 | ;; to be added to the new collection of messages. This is | ||
| 2029 | ;; the case for all new message collections added to a | ||
| 2030 | ;; non-empty mail file. | ||
| 2031 | (unless (zerop size) | ||
| 2032 | (save-restriction | ||
| 2033 | (let ((start (point-min))) | ||
| 2034 | (widen) | ||
| 2035 | (unless (eq start (point-min)) | ||
| 2036 | (goto-char start) | ||
| 2037 | (insert "\n\n") | ||
| 2038 | (setq size (+ 2 size)))))) | ||
| 2039 | (goto-char (point-max)) | 2029 | (goto-char (point-max)) |
| 2040 | (or (= (preceding-char) ?\n) | 2030 | ;; Make sure the read-in mbox data properly ends with a |
| 2041 | (zerop size) | 2031 | ;; blank line unless it is of size 0. |
| 2042 | (insert ?\n)) | 2032 | (unless (zerop size) |
| 2033 | (while (not (looking-back "\n\n")) | ||
| 2034 | (insert "\n"))) | ||
| 2043 | (if (not (and rmail-preserve-inbox (string= file tofile))) | 2035 | (if (not (and rmail-preserve-inbox (string= file tofile))) |
| 2044 | (setq delete-files (cons tofile delete-files))))) | 2036 | (setq delete-files (cons tofile delete-files))))) |
| 2045 | (message "") | 2037 | (message "") |
diff --git a/lisp/net/secrets.el b/lisp/net/secrets.el index 89378497c36..9fa5eb32d43 100644 --- a/lisp/net/secrets.el +++ b/lisp/net/secrets.el | |||
| @@ -774,7 +774,7 @@ to their attributes." | |||
| 774 | (cons | 774 | (cons |
| 775 | (1+ (length "password")) | 775 | (1+ (length "password")) |
| 776 | (mapcar | 776 | (mapcar |
| 777 | ;; Atribute names have a leading ":", which will be suppressed. | 777 | ;; Attribute names have a leading ":", which will be suppressed. |
| 778 | (lambda (attribute) (length (symbol-name (car attribute)))) | 778 | (lambda (attribute) (length (symbol-name (car attribute)))) |
| 779 | attributes))))) | 779 | attributes))))) |
| 780 | (cons | 780 | (cons |
diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index aea284fe72c..53a0c5587a2 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el | |||
| @@ -764,7 +764,7 @@ because you will take care of it on the day when scheduled." | |||
| 764 | :group 'org-agenda-skip | 764 | :group 'org-agenda-skip |
| 765 | :group 'org-agenda-daily/weekly | 765 | :group 'org-agenda-daily/weekly |
| 766 | :type '(choice | 766 | :type '(choice |
| 767 | (const :tag "Alwas show prewarning" nil) | 767 | (const :tag "Always show prewarning" nil) |
| 768 | (const :tag "Remove prewarning if entry is scheduled" t) | 768 | (const :tag "Remove prewarning if entry is scheduled" t) |
| 769 | (integer :tag "Restart prewarning N days before deadline"))) | 769 | (integer :tag "Restart prewarning N days before deadline"))) |
| 770 | 770 | ||
| @@ -1388,13 +1388,13 @@ When nil, such items are sorted as 0 minutes effort." | |||
| 1388 | (tags . " %i %-12:c") | 1388 | (tags . " %i %-12:c") |
| 1389 | (search . " %i %-12:c")) | 1389 | (search . " %i %-12:c")) |
| 1390 | "Format specifications for the prefix of items in the agenda views. | 1390 | "Format specifications for the prefix of items in the agenda views. |
| 1391 | An alist with five entries, each for the different agenda types. The | 1391 | An alist with five entries, each for the different agenda types. The |
| 1392 | keys of the sublists are `agenda', `timeline', `todo', `search' and `tags'. | 1392 | keys of the sublists are `agenda', `timeline', `todo', `search' and `tags'. |
| 1393 | The values are format strings. | 1393 | The values are format strings. |
| 1394 | 1394 | ||
| 1395 | This format works similar to a printf format, with the following meaning: | 1395 | This format works similar to a printf format, with the following meaning: |
| 1396 | 1396 | ||
| 1397 | %c the category of the item, \"Diary\" for entries from the diary, | 1397 | %c the category of the item, \"Diary\" for entries from the diary, |
| 1398 | or as given by the CATEGORY keyword or derived from the file name | 1398 | or as given by the CATEGORY keyword or derived from the file name |
| 1399 | %i the icon category of the item, see `org-agenda-category-icon-alist' | 1399 | %i the icon category of the item, see `org-agenda-category-icon-alist' |
| 1400 | %T the last tag of the item (ignore inherited tags, which come first) | 1400 | %T the last tag of the item (ignore inherited tags, which come first) |
| @@ -1408,10 +1408,10 @@ contain two additional characters: a question mark just after the `%' | |||
| 1408 | and a whitespace/punctuation character just before the final letter. | 1408 | and a whitespace/punctuation character just before the final letter. |
| 1409 | 1409 | ||
| 1410 | If the first character after `%' is a question mark, the entire field | 1410 | If the first character after `%' is a question mark, the entire field |
| 1411 | will only be included if the corresponding value applies to the current | 1411 | will only be included if the corresponding value applies to the current |
| 1412 | entry. This is useful for fields which should have fixed width when | 1412 | entry. This is useful for fields which should have fixed width when |
| 1413 | present, but zero width when absent. For example, \"%?-12t\" will | 1413 | present, but zero width when absent. For example, \"%?-12t\" will |
| 1414 | result in a 12 character time field if a time of the day is specified, | 1414 | result in a 12 character time field if a time of the day is specified, |
| 1415 | but will completely disappear in entries which do not contain a time. | 1415 | but will completely disappear in entries which do not contain a time. |
| 1416 | 1416 | ||
| 1417 | If there is punctuation or whitespace character just before the final | 1417 | If there is punctuation or whitespace character just before the final |
| @@ -1420,7 +1420,7 @@ the value is not empty. For example, the format \"%-12:c\" leads to | |||
| 1420 | \"Diary: \" if the category is \"Diary\". If the category were be | 1420 | \"Diary: \" if the category is \"Diary\". If the category were be |
| 1421 | empty, no additional colon would be inserted. | 1421 | empty, no additional colon would be inserted. |
| 1422 | 1422 | ||
| 1423 | The default value for the agenda sublist is \" %-12:c%?-12t% s\", | 1423 | The default value for the agenda sublist is \" %-12:c%?-12t% s\", |
| 1424 | which means: | 1424 | which means: |
| 1425 | 1425 | ||
| 1426 | - Indent the line with two space characters | 1426 | - Indent the line with two space characters |
| @@ -1697,7 +1697,7 @@ For example, this value makes those two functions available: | |||
| 1697 | (?C bulk-cut)) | 1697 | (?C bulk-cut)) |
| 1698 | 1698 | ||
| 1699 | With selected entries in an agenda buffer, `B R' will call | 1699 | With selected entries in an agenda buffer, `B R' will call |
| 1700 | the custom function `set-category' on the selected entries. | 1700 | the custom function `set-category' on the selected entries. |
| 1701 | Note that functions in this alist don't need to be quoted." | 1701 | Note that functions in this alist don't need to be quoted." |
| 1702 | :type 'alist | 1702 | :type 'alist |
| 1703 | :group 'org-agenda) | 1703 | :group 'org-agenda) |
| @@ -5003,9 +5003,9 @@ See also the user option `org-agenda-clock-consistency-checks'." | |||
| 5003 | "\\(-\\{1,3\\}\\(\\[.*?\\]\\)\\)?")) ; group 3 is second | 5003 | "\\(-\\{1,3\\}\\(\\[.*?\\]\\)\\)?")) ; group 3 is second |
| 5004 | (tlstart 0.) | 5004 | (tlstart 0.) |
| 5005 | (tlend 0.) | 5005 | (tlend 0.) |
| 5006 | (maxtime (org-hh:mm-string-to-minutes | 5006 | (maxtime (org-hh:mm-string-to-minutes |
| 5007 | (or (plist-get pl :max-duration) "24:00"))) | 5007 | (or (plist-get pl :max-duration) "24:00"))) |
| 5008 | (mintime (org-hh:mm-string-to-minutes | 5008 | (mintime (org-hh:mm-string-to-minutes |
| 5009 | (or (plist-get pl :min-duration) 0))) | 5009 | (or (plist-get pl :min-duration) 0))) |
| 5010 | (maxgap (org-hh:mm-string-to-minutes | 5010 | (maxgap (org-hh:mm-string-to-minutes |
| 5011 | ;; default 30:00 means never complain | 5011 | ;; default 30:00 means never complain |
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 156c90159cd..3dba1af515a 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -157,7 +157,7 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) | |||
| 157 | 157 | ||
| 158 | (python-tracebacks-and-caml | 158 | (python-tracebacks-and-caml |
| 159 | "^[ \t]*File \\(\"?\\)\\([^,\" \n\t<>]+\\)\\1, lines? \\([0-9]+\\)-?\\([0-9]+\\)?\\(?:$\\|,\ | 159 | "^[ \t]*File \\(\"?\\)\\([^,\" \n\t<>]+\\)\\1, lines? \\([0-9]+\\)-?\\([0-9]+\\)?\\(?:$\\|,\ |
| 160 | \\(?: characters? \\([0-9]+\\)-?\\([0-9]+\\)?:\\)?\\([ \n]Warning:\\)?\\)" | 160 | \\(?: characters? \\([0-9]+\\)-?\\([0-9]+\\)?:\\)?\\([ \n]Warning\\(?: [0-9]+\\)?:\\)?\\)" |
| 161 | 2 (3 . 4) (5 . 6) (7)) | 161 | 2 (3 . 4) (5 . 6) (7)) |
| 162 | 162 | ||
| 163 | (comma | 163 | (comma |
| @@ -1056,7 +1056,7 @@ FMTS is a list of format specs for transforming the file name. | |||
| 1056 | (cadr (compilation--file-struct->loc-tree file-struct))) | 1056 | (cadr (compilation--file-struct->loc-tree file-struct))) |
| 1057 | (marker | 1057 | (marker |
| 1058 | (if marker-line (compilation--loc->marker (cadr marker-line)))) | 1058 | (if marker-line (compilation--loc->marker (cadr marker-line)))) |
| 1059 | (compilation-error-screen-columns compilation-error-screen-columns) | 1059 | (screen-columns compilation-error-screen-columns) |
| 1060 | end-marker loc end-loc) | 1060 | end-marker loc end-loc) |
| 1061 | (if (not (and marker (marker-buffer marker))) | 1061 | (if (not (and marker (marker-buffer marker))) |
| 1062 | (setq marker nil) ; no valid marker for this file | 1062 | (setq marker nil) ; no valid marker for this file |
| @@ -1064,16 +1064,21 @@ FMTS is a list of format specs for transforming the file name. | |||
| 1064 | (catch 'marker ; find nearest loc, at least one exists | 1064 | (catch 'marker ; find nearest loc, at least one exists |
| 1065 | (dolist (x (cddr (compilation--file-struct->loc-tree | 1065 | (dolist (x (cddr (compilation--file-struct->loc-tree |
| 1066 | file-struct))) ; Loop over remaining lines. | 1066 | file-struct))) ; Loop over remaining lines. |
| 1067 | (if (> (car x) loc) ; still bigger | 1067 | (if (> (car x) loc) ; Still bigger. |
| 1068 | (setq marker-line x) | 1068 | (setq marker-line x) |
| 1069 | (if (> (- (or (car marker-line) 1) loc) | 1069 | (if (> (- (or (car marker-line) 1) loc) |
| 1070 | (- loc (car x))) ; current line is nearer | 1070 | (- loc (car x))) ; Current line is nearer. |
| 1071 | (setq marker-line x)) | 1071 | (setq marker-line x)) |
| 1072 | (throw 'marker t)))) | 1072 | (throw 'marker t)))) |
| 1073 | (setq marker (compilation--loc->marker (cadr marker-line)) | 1073 | (setq marker (compilation--loc->marker (cadr marker-line)) |
| 1074 | marker-line (or (car marker-line) 1)) | 1074 | marker-line (or (car marker-line) 1)) |
| 1075 | (with-current-buffer (marker-buffer marker) | 1075 | (with-current-buffer (marker-buffer marker) |
| 1076 | (save-excursion | 1076 | (let ((screen-columns |
| 1077 | ;; Obey the compilation-error-screen-columns of the target | ||
| 1078 | ;; buffer if its major mode set it buffer-locally. | ||
| 1079 | (if (local-variable-p 'compilation-error-screen-columns) | ||
| 1080 | compilation-error-screen-columns screen-columns))) | ||
| 1081 | (save-excursion | ||
| 1077 | (save-restriction | 1082 | (save-restriction |
| 1078 | (widen) | 1083 | (widen) |
| 1079 | (goto-char (marker-position marker)) | 1084 | (goto-char (marker-position marker)) |
| @@ -1081,17 +1086,15 @@ FMTS is a list of format specs for transforming the file name. | |||
| 1081 | (beginning-of-line (- (or end-line line) marker-line -1)) | 1086 | (beginning-of-line (- (or end-line line) marker-line -1)) |
| 1082 | (if (or (null end-col) (< end-col 0)) | 1087 | (if (or (null end-col) (< end-col 0)) |
| 1083 | (end-of-line) | 1088 | (end-of-line) |
| 1084 | (compilation-move-to-column | 1089 | (compilation-move-to-column end-col screen-columns)) |
| 1085 | end-col compilation-error-screen-columns)) | ||
| 1086 | (setq end-marker (point-marker))) | 1090 | (setq end-marker (point-marker))) |
| 1087 | (beginning-of-line (if end-line | 1091 | (beginning-of-line (if end-line |
| 1088 | (- line end-line -1) | 1092 | (- line end-line -1) |
| 1089 | (- loc marker-line -1))) | 1093 | (- loc marker-line -1))) |
| 1090 | (if col | 1094 | (if col |
| 1091 | (compilation-move-to-column | 1095 | (compilation-move-to-column col screen-columns) |
| 1092 | col compilation-error-screen-columns) | ||
| 1093 | (forward-to-indentation 0)) | 1096 | (forward-to-indentation 0)) |
| 1094 | (setq marker (point-marker)))))) | 1097 | (setq marker (point-marker))))))) |
| 1095 | 1098 | ||
| 1096 | (setq loc (compilation-assq line (compilation--file-struct->loc-tree | 1099 | (setq loc (compilation-assq line (compilation--file-struct->loc-tree |
| 1097 | file-struct))) | 1100 | file-struct))) |
| @@ -2266,7 +2269,7 @@ This is the value of `next-error-function' in Compilation buffers." | |||
| 2266 | (interactive "p") | 2269 | (interactive "p") |
| 2267 | (when reset | 2270 | (when reset |
| 2268 | (setq compilation-current-error nil)) | 2271 | (setq compilation-current-error nil)) |
| 2269 | (let* ((columns compilation-error-screen-columns) ; buffer's local value | 2272 | (let* ((screen-columns compilation-error-screen-columns) |
| 2270 | (last 1) | 2273 | (last 1) |
| 2271 | (msg (compilation-next-error (or n 1) nil | 2274 | (msg (compilation-next-error (or n 1) nil |
| 2272 | (or compilation-current-error | 2275 | (or compilation-current-error |
| @@ -2301,29 +2304,34 @@ This is the value of `next-error-function' in Compilation buffers." | |||
| 2301 | marker | 2304 | marker |
| 2302 | (caar (compilation--loc->file-struct loc)) | 2305 | (caar (compilation--loc->file-struct loc)) |
| 2303 | (cadr (car (compilation--loc->file-struct loc)))) | 2306 | (cadr (car (compilation--loc->file-struct loc)))) |
| 2304 | (save-restriction | 2307 | (let ((screen-columns |
| 2305 | (widen) | 2308 | ;; Obey the compilation-error-screen-columns of the target |
| 2306 | (goto-char (point-min)) | 2309 | ;; buffer if its major mode set it buffer-locally. |
| 2307 | ;; Treat file's found lines in forward order, 1 by 1. | 2310 | (if (local-variable-p 'compilation-error-screen-columns) |
| 2308 | (dolist (line (reverse (cddr (compilation--loc->file-struct loc)))) | 2311 | compilation-error-screen-columns screen-columns))) |
| 2309 | (when (car line) ; else this is a filename w/o a line# | 2312 | (save-restriction |
| 2310 | (beginning-of-line (- (car line) last -1)) | 2313 | (widen) |
| 2311 | (setq last (car line))) | 2314 | (goto-char (point-min)) |
| 2312 | ;; Treat line's found columns and store/update a marker for each. | 2315 | ;; Treat file's found lines in forward order, 1 by 1. |
| 2313 | (dolist (col (cdr line)) | 2316 | (dolist (line (reverse (cddr (compilation--loc->file-struct loc)))) |
| 2314 | (if (compilation--loc->col col) | 2317 | (when (car line) ; else this is a filename w/o a line# |
| 2315 | (if (eq (compilation--loc->col col) -1) | 2318 | (beginning-of-line (- (car line) last -1)) |
| 2316 | ;; Special case for range end. | 2319 | (setq last (car line))) |
| 2317 | (end-of-line) | 2320 | ;; Treat line's found columns and store/update a marker for each. |
| 2318 | (compilation-move-to-column (compilation--loc->col col) | 2321 | (dolist (col (cdr line)) |
| 2319 | columns)) | 2322 | (if (compilation--loc->col col) |
| 2320 | (beginning-of-line) | 2323 | (if (eq (compilation--loc->col col) -1) |
| 2321 | (skip-chars-forward " \t")) | 2324 | ;; Special case for range end. |
| 2322 | (if (compilation--loc->marker col) | 2325 | (end-of-line) |
| 2323 | (set-marker (compilation--loc->marker col) (point)) | 2326 | (compilation-move-to-column (compilation--loc->col col) |
| 2324 | (setf (compilation--loc->marker col) (point-marker))) | 2327 | screen-columns)) |
| 2325 | ;; (setf (compilation--loc->timestamp col) timestamp) | 2328 | (beginning-of-line) |
| 2326 | ))))) | 2329 | (skip-chars-forward " \t")) |
| 2330 | (if (compilation--loc->marker col) | ||
| 2331 | (set-marker (compilation--loc->marker col) (point)) | ||
| 2332 | (setf (compilation--loc->marker col) (point-marker))) | ||
| 2333 | ;; (setf (compilation--loc->timestamp col) timestamp) | ||
| 2334 | )))))) | ||
| 2327 | (compilation-goto-locus marker (compilation--loc->marker loc) | 2335 | (compilation-goto-locus marker (compilation--loc->marker loc) |
| 2328 | (compilation--loc->marker end-loc)) | 2336 | (compilation--loc->marker end-loc)) |
| 2329 | (setf (compilation--loc->visited loc) t))) | 2337 | (setf (compilation--loc->visited loc) t))) |
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index ad3b777977c..a79d1a2c064 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el | |||
| @@ -6481,7 +6481,7 @@ are CPerl, PerlStyle, GNU, K&R, BSD, C++ and Whitesmith. | |||
| 6481 | The current value of style is memorized (unless there is a memorized | 6481 | The current value of style is memorized (unless there is a memorized |
| 6482 | data already), may be restored by `cperl-set-style-back'. | 6482 | data already), may be restored by `cperl-set-style-back'. |
| 6483 | 6483 | ||
| 6484 | Chosing \"Current\" style will not change style, so this may be used for | 6484 | Choosing \"Current\" style will not change style, so this may be used for |
| 6485 | side-effect of memorizing only. Examples in `cperl-style-examples'." | 6485 | side-effect of memorizing only. Examples in `cperl-style-examples'." |
| 6486 | (interactive | 6486 | (interactive |
| 6487 | (let ((list (mapcar (function (lambda (elt) (list (car elt)))) | 6487 | (let ((list (mapcar (function (lambda (elt) (list (car elt)))) |
diff --git a/lisp/progmodes/delphi.el b/lisp/progmodes/delphi.el index e8e2f8ffbf0..e513b617022 100644 --- a/lisp/progmodes/delphi.el +++ b/lisp/progmodes/delphi.el | |||
| @@ -1959,10 +1959,6 @@ comment block. If not in a // comment, just does a normal newline." | |||
| 1959 | kmap) | 1959 | kmap) |
| 1960 | "Keymap used in Delphi mode.") | 1960 | "Keymap used in Delphi mode.") |
| 1961 | 1961 | ||
| 1962 | (defvar delphi-mode-syntax-table nil | ||
| 1963 | "Delphi mode's syntax table. It is just a standard syntax table. | ||
| 1964 | This is ok since we do our own keyword/comment/string face coloring.") | ||
| 1965 | |||
| 1966 | ;;;###autoload | 1962 | ;;;###autoload |
| 1967 | (define-derived-mode delphi-mode prog-mode "Delphi" | 1963 | (define-derived-mode delphi-mode prog-mode "Delphi" |
| 1968 | "Major mode for editing Delphi code. \\<delphi-mode-map> | 1964 | "Major mode for editing Delphi code. \\<delphi-mode-map> |
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index f9ddabf1552..e47ba3c92f3 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el | |||
| @@ -1965,7 +1965,7 @@ Sets `gdb-thread-number' to new id." | |||
| 1965 | (setq gud-running t) | 1965 | (setq gud-running t) |
| 1966 | ;; GDB doesn't seem to respond to -thread-info before first stop or | 1966 | ;; GDB doesn't seem to respond to -thread-info before first stop or |
| 1967 | ;; thread exit (even in non-stop mode), so this is useless. | 1967 | ;; thread exit (even in non-stop mode), so this is useless. |
| 1968 | ;; Behaviour may change in the future. | 1968 | ;; Behavior may change in the future. |
| 1969 | (gdb-emit-signal gdb-buf-publisher 'update-threads)) | 1969 | (gdb-emit-signal gdb-buf-publisher 'update-threads)) |
| 1970 | 1970 | ||
| 1971 | ;; -break-insert -t didn't give a reason before gdb 6.9 | 1971 | ;; -break-insert -t didn't give a reason before gdb 6.9 |
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 7b3a2893610..944a412fb63 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el | |||
| @@ -2155,7 +2155,7 @@ during jdb initialization depending on the value of | |||
| 2155 | string | 2155 | string |
| 2156 | (concat "[ \t\n\r,\"" path-separator "]+"))))) | 2156 | (concat "[ \t\n\r,\"" path-separator "]+"))))) |
| 2157 | 2157 | ||
| 2158 | ;; See comentary for other debugger's marker filters - there you will find | 2158 | ;; See commentary for other debugger's marker filters - there you will find |
| 2159 | ;; important notes about STRING. | 2159 | ;; important notes about STRING. |
| 2160 | (defun gud-jdb-marker-filter (string) | 2160 | (defun gud-jdb-marker-filter (string) |
| 2161 | 2161 | ||
diff --git a/lisp/progmodes/meta-mode.el b/lisp/progmodes/meta-mode.el index ab640c0e270..e15f765ea58 100644 --- a/lisp/progmodes/meta-mode.el +++ b/lisp/progmodes/meta-mode.el | |||
| @@ -27,53 +27,17 @@ | |||
| 27 | ;; | 27 | ;; |
| 28 | ;; This Emacs Lisp package provides a major mode for editing Metafont | 28 | ;; This Emacs Lisp package provides a major mode for editing Metafont |
| 29 | ;; or MetaPost sources. It includes all the necessary code to set up | 29 | ;; or MetaPost sources. It includes all the necessary code to set up |
| 30 | ;; a major mode including an approriate syntax table, keymap, and a | 30 | ;; a major mode including an appropriate syntax table, keymap, and a |
| 31 | ;; mode-specific pull-down menu. It also provides a sophisticated set | 31 | ;; mode-specific pull-down menu. It also provides a sophisticated set |
| 32 | ;; of font-lock patterns, a fancy indentation function adapted from | 32 | ;; of font-lock patterns, a fancy indentation function adapted from |
| 33 | ;; AUCTeX's latex.el, and some basic mode-specific editing functions | 33 | ;; AUCTeX's latex.el, and some basic mode-specific editing functions |
| 34 | ;; such as functions to move to the beginning or end of the enclosing | 34 | ;; such as functions to move to the beginning or end of the enclosing |
| 35 | ;; environment, or to mark, re-indent, or comment-out environments. | 35 | ;; environment, or to mark, re-indent, or comment-out environments. |
| 36 | ;; On the other hand, it doesn't yet provide any functionality for | 36 | ;; On the other hand, it doesn't yet provide any functionality for |
| 37 | ;; running Metafont or MetaPost in a shell buffer form within Emacs, | 37 | ;; running Metafont or MetaPost in a shell buffer from within Emacs, |
| 38 | ;; but such functionality might be added later, either as part of this | 38 | ;; but such functionality might be added later, either as part of this |
| 39 | ;; package or as a separate Emacs Lisp package. | 39 | ;; package or as a separate Emacs Lisp package. |
| 40 | 40 | ||
| 41 | ;; Installation: | ||
| 42 | ;; | ||
| 43 | ;; An interface to running Metafont or MetaPost as a shell process | ||
| 44 | ;; from within Emacs is currently under development as a separate | ||
| 45 | ;; Emacs Lisp package (meta-buf.el). In order to have that package | ||
| 46 | ;; loaded automatically when first entering Metafont or MetaPost mode, | ||
| 47 | ;; you might use the load-hook provided in this package by adding | ||
| 48 | ;; these lines to your startup file: | ||
| 49 | ;; | ||
| 50 | ;; (add-hook 'meta-mode-load-hook | ||
| 51 | ;; (lambda () (require 'meta-buf))) | ||
| 52 | ;; | ||
| 53 | ;; The add-on package loaded this way may in turn make use of the | ||
| 54 | ;; mode-hooks provided in this package to activate additional features | ||
| 55 | ;; when entering Metafont or MetaPost mode. | ||
| 56 | |||
| 57 | ;; Font Lock Support: | ||
| 58 | ;; | ||
| 59 | ;; If you are using global-font-lock-mode (introduced in Emacs 19.31), | ||
| 60 | ;; fontification in Metafont and/or MetaPost mode will be activated | ||
| 61 | ;; automatically. To speed up fontification for the rather complex | ||
| 62 | ;; patterns used in these modes, it may be a good idea to activate | ||
| 63 | ;; lazy-lock as a font-lock-support-mode (introduced in Emacs 19.32) | ||
| 64 | ;; by adding these lines to your startup file: | ||
| 65 | ;; | ||
| 66 | ;; (global-font-lock-mode t) | ||
| 67 | ;; (setq font-lock-support-mode 'lazy-lock-mode) | ||
| 68 | ;; | ||
| 69 | ;; If you are using an older version of Emacs, which doesn't provide | ||
| 70 | ;; global-font-lock-mode or font-lock-support-mode, you can also | ||
| 71 | ;; activate fontification in Metafont and/or MetaPost mode by adding | ||
| 72 | ;; the following lines to your startup file: | ||
| 73 | ;; | ||
| 74 | ;; (add-hook 'meta-common-mode-hook 'turn-on-font-lock) | ||
| 75 | ;; (add-hook 'meta-common-mode-hook 'turn-on-lazy-lock) | ||
| 76 | |||
| 77 | ;; Customization: | 41 | ;; Customization: |
| 78 | ;; | 42 | ;; |
| 79 | ;; Following the usual Emacs Lisp coding conventions, the major modes | 43 | ;; Following the usual Emacs Lisp coding conventions, the major modes |
| @@ -88,10 +52,6 @@ | |||
| 88 | 52 | ||
| 89 | ;; Availability: | 53 | ;; Availability: |
| 90 | ;; | 54 | ;; |
| 91 | ;; This package is currently available via my "TeX Software" WWW page: | ||
| 92 | ;; | ||
| 93 | ;; http://www.thphy.uni-duesseldorf.de/~vieth/subjects/tex/software.html | ||
| 94 | ;; | ||
| 95 | ;; As of this version 1.0, this package will be uploaded to CTAN | 55 | ;; As of this version 1.0, this package will be uploaded to CTAN |
| 96 | ;; archives, where it shall find a permanent home, presumably in | 56 | ;; archives, where it shall find a permanent home, presumably in |
| 97 | ;; tex-archive/support/emacs-modes. It will also be submitted for | 57 | ;; tex-archive/support/emacs-modes. It will also be submitted for |
| @@ -104,7 +64,7 @@ | |||
| 104 | ;; v 0.2 -- 1997/02/03 UV Improved and debugged font-lock patterns. | 64 | ;; v 0.2 -- 1997/02/03 UV Improved and debugged font-lock patterns. |
| 105 | ;; Added indent-line-function for TAB. | 65 | ;; Added indent-line-function for TAB. |
| 106 | ;; v 0.3 -- 1997/02/17 UV Improved font-lock patterns and syntax table. | 66 | ;; v 0.3 -- 1997/02/17 UV Improved font-lock patterns and syntax table. |
| 107 | ;; Improved and debbuged indentation function. | 67 | ;; Improved and debugged indentation function. |
| 108 | ;; v 0.4 -- 1997/02/18 UV Added functions to indent regions for M-C-q, | 68 | ;; v 0.4 -- 1997/02/18 UV Added functions to indent regions for M-C-q, |
| 109 | ;; also added a preliminary mode-specific menu. | 69 | ;; also added a preliminary mode-specific menu. |
| 110 | ;; v 0.5 -- 1997/02/19 UV Added functions to skip to next or previous | 70 | ;; v 0.5 -- 1997/02/19 UV Added functions to skip to next or previous |
| @@ -513,13 +473,13 @@ If the list was changed, sort the list and remove duplicates first." | |||
| 513 | :group 'meta-font) | 473 | :group 'meta-font) |
| 514 | 474 | ||
| 515 | (defcustom meta-right-comment-regexp nil | 475 | (defcustom meta-right-comment-regexp nil |
| 516 | "Regexp matching comments that should be placed to the right margin." | 476 | "Regexp matching comments that should be placed on the right margin." |
| 517 | :type '(choice regexp | 477 | :type '(choice regexp |
| 518 | (const :tag "None" nil)) | 478 | (const :tag "None" nil)) |
| 519 | :group 'meta-font) | 479 | :group 'meta-font) |
| 520 | 480 | ||
| 521 | (defcustom meta-ignore-comment-regexp "%[^%]" | 481 | (defcustom meta-ignore-comment-regexp "%[^%]" |
| 522 | "Regexp matching comments that whose indentation should not be touched." | 482 | "Regexp matching comments whose indentation should not be touched." |
| 523 | :type 'regexp | 483 | :type 'regexp |
| 524 | :group 'meta-font) | 484 | :group 'meta-font) |
| 525 | 485 | ||
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 38bf9552b2a..8615400bf6a 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -948,22 +948,12 @@ Finds end of innermost nested class or method definition." | |||
| 948 | "Go to start of current statement. | 948 | "Go to start of current statement. |
| 949 | Accounts for continuation lines, multi-line strings, and | 949 | Accounts for continuation lines, multi-line strings, and |
| 950 | multi-line bracketed expressions." | 950 | multi-line bracketed expressions." |
| 951 | (beginning-of-line) | 951 | (while |
| 952 | (python-beginning-of-string) | ||
| 953 | (let (point) | ||
| 954 | (while (and (python-continuation-line-p) | ||
| 955 | (if point | ||
| 956 | (< (point) point) | ||
| 957 | t)) | ||
| 958 | (beginning-of-line) | ||
| 959 | (if (python-backslash-continuation-line-p) | 952 | (if (python-backslash-continuation-line-p) |
| 960 | (progn | 953 | (progn (forward-line -1) t) |
| 961 | (forward-line -1) | 954 | (beginning-of-line) |
| 962 | (while (python-backslash-continuation-line-p) | 955 | (or (python-beginning-of-string) |
| 963 | (forward-line -1))) | 956 | (python-skip-out)))) |
| 964 | (python-beginning-of-string) | ||
| 965 | (python-skip-out)) | ||
| 966 | (setq point (point)))) | ||
| 967 | (back-to-indentation)) | 957 | (back-to-indentation)) |
| 968 | 958 | ||
| 969 | (defun python-skip-out (&optional forward syntax) | 959 | (defun python-skip-out (&optional forward syntax) |
| @@ -971,6 +961,7 @@ multi-line bracketed expressions." | |||
| 971 | Skip forward if FORWARD is non-nil, else backward. | 961 | Skip forward if FORWARD is non-nil, else backward. |
| 972 | If SYNTAX is non-nil it is the state returned by `syntax-ppss' at point. | 962 | If SYNTAX is non-nil it is the state returned by `syntax-ppss' at point. |
| 973 | Return non-nil if and only if skipping was done." | 963 | Return non-nil if and only if skipping was done." |
| 964 | ;; FIXME: Use syntax-ppss-toplevel-pos. | ||
| 974 | (let ((depth (syntax-ppss-depth (or syntax (syntax-ppss)))) | 965 | (let ((depth (syntax-ppss-depth (or syntax (syntax-ppss)))) |
| 975 | (forward (if forward -1 1))) | 966 | (forward (if forward -1 1))) |
| 976 | (unless (zerop depth) | 967 | (unless (zerop depth) |
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index d7aa82aee1b..2f06afaa5ef 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el | |||
| @@ -3510,7 +3510,7 @@ STRING are replaced by `-' and substrings are converted to lower case." | |||
| 3510 | menu-list)) | 3510 | menu-list)) |
| 3511 | (setq comp-alist (cdr comp-alist))) | 3511 | (setq comp-alist (cdr comp-alist))) |
| 3512 | (setq menu-list (nreverse menu-list)) | 3512 | (setq menu-list (nreverse menu-list)) |
| 3513 | (vhdl-menu-split menu-list "Compler"))) | 3513 | (vhdl-menu-split menu-list "Compiler"))) |
| 3514 | ["Use Local Error Regexp" | 3514 | ["Use Local Error Regexp" |
| 3515 | (customize-set-variable 'vhdl-compile-use-local-error-regexp | 3515 | (customize-set-variable 'vhdl-compile-use-local-error-regexp |
| 3516 | (not vhdl-compile-use-local-error-regexp)) | 3516 | (not vhdl-compile-use-local-error-regexp)) |
diff --git a/lisp/rot13.el b/lisp/rot13.el index 89b687efdc6..d4885395900 100644 --- a/lisp/rot13.el +++ b/lisp/rot13.el | |||
| @@ -32,7 +32,7 @@ | |||
| 32 | ;; This hack is mainly to show off the char table stuff. | 32 | ;; This hack is mainly to show off the char table stuff. |
| 33 | ;; | 33 | ;; |
| 34 | ;; New entry points, `rot13', `rot13-string', and `rot13-region' that | 34 | ;; New entry points, `rot13', `rot13-string', and `rot13-region' that |
| 35 | ;; performs Ceasar cipher encrypt/decrypt on buffers and strings, was | 35 | ;; performs Caesar cipher encrypt/decrypt on buffers and strings, was |
| 36 | ;; added by Simon Josefsson. | 36 | ;; added by Simon Josefsson. |
| 37 | 37 | ||
| 38 | ;;; Code: | 38 | ;;; Code: |
diff --git a/lisp/subr.el b/lisp/subr.el index d5120826812..1cd6598eeb5 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -1797,30 +1797,29 @@ This function makes or adds to an entry on `after-load-alist'." | |||
| 1797 | (push elt after-load-alist)) | 1797 | (push elt after-load-alist)) |
| 1798 | ;; Make sure `form' is evalled in the current lexical/dynamic code. | 1798 | ;; Make sure `form' is evalled in the current lexical/dynamic code. |
| 1799 | (setq form `(funcall ',(eval `(lambda () ,form) lexical-binding))) | 1799 | (setq form `(funcall ',(eval `(lambda () ,form) lexical-binding))) |
| 1800 | (when (symbolp regexp-or-feature) | ||
| 1801 | ;; For features, the after-load-alist elements get run when `provide' is | ||
| 1802 | ;; called rather than at the end of the file. So add an indirection to | ||
| 1803 | ;; make sure that `form' is really run "after-load" in case the provide | ||
| 1804 | ;; call happens early. | ||
| 1805 | (setq form | ||
| 1806 | `(when load-file-name | ||
| 1807 | (let ((fun (make-symbol "eval-after-load-helper"))) | ||
| 1808 | (fset fun `(lambda (file) | ||
| 1809 | (if (not (equal file ',load-file-name)) | ||
| 1810 | nil | ||
| 1811 | (remove-hook 'after-load-functions ',fun) | ||
| 1812 | ,',form))) | ||
| 1813 | (add-hook 'after-load-functions fun))))) | ||
| 1814 | ;; Add FORM to the element unless it's already there. | ||
| 1815 | (unless (member form (cdr elt)) | ||
| 1816 | (nconc elt (purecopy (list form)))) | ||
| 1817 | |||
| 1818 | ;; Is there an already loaded file whose name (or `provide' name) | 1800 | ;; Is there an already loaded file whose name (or `provide' name) |
| 1819 | ;; matches FILE? | 1801 | ;; matches FILE? |
| 1820 | (if (if (stringp file) | 1802 | (prog1 (if (if (stringp file) |
| 1821 | (load-history-filename-element regexp-or-feature) | 1803 | (load-history-filename-element regexp-or-feature) |
| 1822 | (featurep file)) | 1804 | (featurep file)) |
| 1823 | (eval form)))) | 1805 | (eval form)) |
| 1806 | (when (symbolp regexp-or-feature) | ||
| 1807 | ;; For features, the after-load-alist elements get run when `provide' is | ||
| 1808 | ;; called rather than at the end of the file. So add an indirection to | ||
| 1809 | ;; make sure that `form' is really run "after-load" in case the provide | ||
| 1810 | ;; call happens early. | ||
| 1811 | (setq form | ||
| 1812 | `(when load-file-name | ||
| 1813 | (let ((fun (make-symbol "eval-after-load-helper"))) | ||
| 1814 | (fset fun `(lambda (file) | ||
| 1815 | (if (not (equal file ',load-file-name)) | ||
| 1816 | nil | ||
| 1817 | (remove-hook 'after-load-functions ',fun) | ||
| 1818 | ,',form))) | ||
| 1819 | (add-hook 'after-load-functions fun))))) | ||
| 1820 | ;; Add FORM to the element unless it's already there. | ||
| 1821 | (unless (member form (cdr elt)) | ||
| 1822 | (nconc elt (purecopy (list form))))))) | ||
| 1824 | 1823 | ||
| 1825 | (defvar after-load-functions nil | 1824 | (defvar after-load-functions nil |
| 1826 | "Special hook run after loading a file. | 1825 | "Special hook run after loading a file. |
diff --git a/lisp/textmodes/reftex-parse.el b/lisp/textmodes/reftex-parse.el index b0f22085064..4d6b5e5fb83 100644 --- a/lisp/textmodes/reftex-parse.el +++ b/lisp/textmodes/reftex-parse.el | |||
| @@ -443,7 +443,7 @@ of master file." | |||
| 443 | (defvar test-dummy) | 443 | (defvar test-dummy) |
| 444 | (defun reftex-index-info (file) | 444 | (defun reftex-index-info (file) |
| 445 | ;; Return an index entry for the current match. | 445 | ;; Return an index entry for the current match. |
| 446 | ;; Carefull: This function expects the match-data to be still in place! | 446 | ;; Careful: This function expects the match-data to be still in place! |
| 447 | (catch 'exit | 447 | (catch 'exit |
| 448 | (let* ((macro (reftex-match-string 10)) | 448 | (let* ((macro (reftex-match-string 10)) |
| 449 | (bom (match-beginning 10)) | 449 | (bom (match-beginning 10)) |
diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el index f9fda7e0a74..0ce71c25ad7 100644 --- a/lisp/textmodes/rst.el +++ b/lisp/textmodes/rst.el | |||
| @@ -476,8 +476,8 @@ for modes derived from Text mode, like Mail mode." | |||
| 476 | 476 | ||
| 477 | 477 | ||
| 478 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 478 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 479 | ;; Section Decoration Adjusment | 479 | ;; Section Decoration Adjustment |
| 480 | ;; ============================ | 480 | ;; ============================= |
| 481 | ;; | 481 | ;; |
| 482 | ;; The following functions implement a smart automatic title sectioning feature. | 482 | ;; The following functions implement a smart automatic title sectioning feature. |
| 483 | ;; The idea is that with the cursor sitting on a section title, we try to get as | 483 | ;; The idea is that with the cursor sitting on a section title, we try to get as |
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index 557ef33919c..6e192cd5aae 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el | |||
| @@ -257,7 +257,7 @@ request.") | |||
| 257 | (if (not (equal extra-headers "")) | 257 | (if (not (equal extra-headers "")) |
| 258 | (setq extra-headers (concat extra-headers "\r\n"))) | 258 | (setq extra-headers (concat extra-headers "\r\n"))) |
| 259 | 259 | ||
| 260 | ;; This was done with a call to `format'. Concatting parts has | 260 | ;; This was done with a call to `format'. Concatenating parts has |
| 261 | ;; the advantage of keeping the parts of each header together and | 261 | ;; the advantage of keeping the parts of each header together and |
| 262 | ;; allows us to elide null lines directly, at the cost of making | 262 | ;; allows us to elide null lines directly, at the cost of making |
| 263 | ;; the layout less clear. | 263 | ;; the layout less clear. |
diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el index 7362258a42d..dc4e179e060 100644 --- a/lisp/vc/vc-svn.el +++ b/lisp/vc/vc-svn.el | |||
| @@ -263,8 +263,8 @@ RESULT is a list of conses (FILE . STATE) for directory DIR." | |||
| 263 | (defun vc-svn-create-repo () | 263 | (defun vc-svn-create-repo () |
| 264 | "Create a new SVN repository." | 264 | "Create a new SVN repository." |
| 265 | (vc-do-command "*vc*" 0 "svnadmin" '("create" "SVN")) | 265 | (vc-do-command "*vc*" 0 "svnadmin" '("create" "SVN")) |
| 266 | (vc-do-command "*vc*" 0 vc-svn-program '(".") | 266 | (vc-svn-command "*vc*" 0 "." "checkout" |
| 267 | "checkout" (concat "file://" default-directory "SVN"))) | 267 | (concat "file://" default-directory "SVN"))) |
| 268 | 268 | ||
| 269 | (defun vc-svn-register (files &optional rev comment) | 269 | (defun vc-svn-register (files &optional rev comment) |
| 270 | "Register FILES into the SVN version-control system. | 270 | "Register FILES into the SVN version-control system. |
| @@ -334,7 +334,6 @@ This is only possible if SVN is responsible for FILE's directory.") | |||
| 334 | ;; Check out a particular version (or recreate the file). | 334 | ;; Check out a particular version (or recreate the file). |
| 335 | (vc-file-setprop file 'vc-working-revision nil) | 335 | (vc-file-setprop file 'vc-working-revision nil) |
| 336 | (apply 'vc-svn-command nil 0 file | 336 | (apply 'vc-svn-command nil 0 file |
| 337 | "--non-interactive" ; bug#4280 | ||
| 338 | "update" | 337 | "update" |
| 339 | (cond | 338 | (cond |
| 340 | ((null rev) "-rBASE") | 339 | ((null rev) "-rBASE") |
| @@ -373,7 +372,7 @@ The changes are between FIRST-VERSION and SECOND-VERSION." | |||
| 373 | (message "Merging changes into %s..." file) | 372 | (message "Merging changes into %s..." file) |
| 374 | ;; (vc-file-setprop file 'vc-working-revision nil) | 373 | ;; (vc-file-setprop file 'vc-working-revision nil) |
| 375 | (vc-file-setprop file 'vc-checkout-time 0) | 374 | (vc-file-setprop file 'vc-checkout-time 0) |
| 376 | (vc-svn-command nil 0 file "--non-interactive" "update") ; see bug#7152 | 375 | (vc-svn-command nil 0 file "update") |
| 377 | ;; Analyze the merge result reported by SVN, and set | 376 | ;; Analyze the merge result reported by SVN, and set |
| 378 | ;; file properties accordingly. | 377 | ;; file properties accordingly. |
| 379 | (with-current-buffer (get-buffer "*vc*") | 378 | (with-current-buffer (get-buffer "*vc*") |
| @@ -425,7 +424,7 @@ This is only supported if the repository access method is either file:// | |||
| 425 | or svn+ssh://." | 424 | or svn+ssh://." |
| 426 | (let (tempfile host remotefile directory fileurl-p) | 425 | (let (tempfile host remotefile directory fileurl-p) |
| 427 | (with-temp-buffer | 426 | (with-temp-buffer |
| 428 | (vc-do-command (current-buffer) 0 vc-svn-program nil "info") | 427 | (vc-svn-command (current-buffer) 0 nil "info") |
| 429 | (goto-char (point-min)) | 428 | (goto-char (point-min)) |
| 430 | (unless (re-search-forward "Repository Root: \\(file://\\(/.*\\)\\)\\|\\(svn\\+ssh://\\([^/]+\\)\\(/.*\\)\\)" nil t) | 429 | (unless (re-search-forward "Repository Root: \\(file://\\(/.*\\)\\)\\|\\(svn\\+ssh://\\([^/]+\\)\\(/.*\\)\\)" nil t) |
| 431 | (error "Repository information is unavailable")) | 430 | (error "Repository information is unavailable")) |
| @@ -581,12 +580,19 @@ NAME is assumed to be a URL." | |||
| 581 | (defun vc-svn-command (buffer okstatus file-or-list &rest flags) | 580 | (defun vc-svn-command (buffer okstatus file-or-list &rest flags) |
| 582 | "A wrapper around `vc-do-command' for use in vc-svn.el. | 581 | "A wrapper around `vc-do-command' for use in vc-svn.el. |
| 583 | The difference to vc-do-command is that this function always invokes `svn', | 582 | The difference to vc-do-command is that this function always invokes `svn', |
| 584 | and that it passes `vc-svn-global-switches' to it before FLAGS." | 583 | and that it passes \"--non-interactive\" and `vc-svn-global-switches' to |
| 585 | (apply 'vc-do-command (or buffer "*vc*") okstatus vc-svn-program file-or-list | 584 | it before FLAGS." |
| 586 | (if (stringp vc-svn-global-switches) | 585 | ;; Might be nice if svn defaulted to non-interactive if stdin not tty. |
| 586 | ;; http://svn.haxx.se/dev/archive-2008-05/0762.shtml | ||
| 587 | ;; http://svn.haxx.se/dev/archive-2009-04/0094.shtml | ||
| 588 | ;; Maybe newer ones do? | ||
| 589 | (or (member "--non-interactive" | ||
| 590 | (setq flags (if (stringp vc-svn-global-switches) | ||
| 587 | (cons vc-svn-global-switches flags) | 591 | (cons vc-svn-global-switches flags) |
| 588 | (append vc-svn-global-switches | 592 | (append vc-svn-global-switches flags)))) |
| 589 | flags)))) | 593 | (setq flags (cons "--non-interactive" flags))) |
| 594 | (apply 'vc-do-command (or buffer "*vc*") okstatus vc-svn-program file-or-list | ||
| 595 | flags)) | ||
| 590 | 596 | ||
| 591 | (defun vc-svn-repository-hostname (dirname) | 597 | (defun vc-svn-repository-hostname (dirname) |
| 592 | (with-temp-buffer | 598 | (with-temp-buffer |
diff --git a/lisp/window.el b/lisp/window.el index 1b51bde36bd..ecd4a62b093 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -68,19 +68,19 @@ are not altered by this macro (unless they are altered in BODY)." | |||
| 68 | ;; they don't substitute the selected window for nil), and they return | 68 | ;; they don't substitute the selected window for nil), and they return |
| 69 | ;; nil when WINDOW doesn't have a parent (like a frame's root window or | 69 | ;; nil when WINDOW doesn't have a parent (like a frame's root window or |
| 70 | ;; a minibuffer window). | 70 | ;; a minibuffer window). |
| 71 | (defsubst window-right (window) | 71 | (defun window-right (window) |
| 72 | "Return WINDOW's right sibling. | 72 | "Return WINDOW's right sibling. |
| 73 | Return nil if WINDOW is the root window of its frame. WINDOW can | 73 | Return nil if WINDOW is the root window of its frame. WINDOW can |
| 74 | be any window." | 74 | be any window." |
| 75 | (and window (window-parent window) (window-next-sibling window))) | 75 | (and window (window-parent window) (window-next-sibling window))) |
| 76 | 76 | ||
| 77 | (defsubst window-left (window) | 77 | (defun window-left (window) |
| 78 | "Return WINDOW's left sibling. | 78 | "Return WINDOW's left sibling. |
| 79 | Return nil if WINDOW is the root window of its frame. WINDOW can | 79 | Return nil if WINDOW is the root window of its frame. WINDOW can |
| 80 | be any window." | 80 | be any window." |
| 81 | (and window (window-parent window) (window-prev-sibling window))) | 81 | (and window (window-parent window) (window-prev-sibling window))) |
| 82 | 82 | ||
| 83 | (defsubst window-child (window) | 83 | (defun window-child (window) |
| 84 | "Return WINDOW's first child window." | 84 | "Return WINDOW's first child window." |
| 85 | (or (window-top-child window) (window-left-child window))) | 85 | (or (window-top-child window) (window-left-child window))) |
| 86 | 86 | ||
| @@ -100,7 +100,7 @@ be any window." | |||
| 100 | (setq window (window-next-sibling window)))) | 100 | (setq window (window-next-sibling window)))) |
| 101 | window) | 101 | window) |
| 102 | 102 | ||
| 103 | (defsubst window-valid-p (object) | 103 | (defun window-valid-p (object) |
| 104 | "Return t if OBJECT denotes a live window or internal window. | 104 | "Return t if OBJECT denotes a live window or internal window. |
| 105 | Otherwise, return nil; this includes the case where OBJECT is a | 105 | Otherwise, return nil; this includes the case where OBJECT is a |
| 106 | deleted window." | 106 | deleted window." |
| @@ -108,7 +108,7 @@ deleted window." | |||
| 108 | (or (window-buffer object) (window-child object)) | 108 | (or (window-buffer object) (window-child object)) |
| 109 | t)) | 109 | t)) |
| 110 | 110 | ||
| 111 | (defsubst window-normalize-buffer (buffer-or-name) | 111 | (defun window-normalize-buffer (buffer-or-name) |
| 112 | "Return buffer specified by BUFFER-OR-NAME. | 112 | "Return buffer specified by BUFFER-OR-NAME. |
| 113 | BUFFER-OR-NAME must be either a buffer or a string naming a live | 113 | BUFFER-OR-NAME must be either a buffer or a string naming a live |
| 114 | buffer and defaults to the current buffer." | 114 | buffer and defaults to the current buffer." |
| @@ -123,7 +123,7 @@ buffer and defaults to the current buffer." | |||
| 123 | (t | 123 | (t |
| 124 | (error "No such buffer %s" buffer-or-name)))) | 124 | (error "No such buffer %s" buffer-or-name)))) |
| 125 | 125 | ||
| 126 | (defsubst window-normalize-frame (frame) | 126 | (defun window-normalize-frame (frame) |
| 127 | "Return frame specified by FRAME. | 127 | "Return frame specified by FRAME. |
| 128 | FRAME must be a live frame and defaults to the selected frame." | 128 | FRAME must be a live frame and defaults to the selected frame." |
| 129 | (if frame | 129 | (if frame |
| @@ -132,7 +132,7 @@ FRAME must be a live frame and defaults to the selected frame." | |||
| 132 | (error "%s is not a live frame" frame)) | 132 | (error "%s is not a live frame" frame)) |
| 133 | (selected-frame))) | 133 | (selected-frame))) |
| 134 | 134 | ||
| 135 | (defsubst window-normalize-window (window &optional live-only) | 135 | (defun window-normalize-window (window &optional live-only) |
| 136 | "Return window specified by WINDOW. | 136 | "Return window specified by WINDOW. |
| 137 | If WINDOW is nil, return `selected-window'. | 137 | If WINDOW is nil, return `selected-window'. |
| 138 | If WINDOW is a live window or internal window, return WINDOW; | 138 | If WINDOW is a live window or internal window, return WINDOW; |
| @@ -195,7 +195,7 @@ narrower, explictly specify the SIZE argument of that function." | |||
| 195 | :version "24.1" | 195 | :version "24.1" |
| 196 | :group 'windows) | 196 | :group 'windows) |
| 197 | 197 | ||
| 198 | (defsubst window-combined-p (&optional window horizontal) | 198 | (defun window-combined-p (&optional window horizontal) |
| 199 | "Return non-nil if WINDOW has siblings in a given direction. | 199 | "Return non-nil if WINDOW has siblings in a given direction. |
| 200 | If WINDOW is omitted or nil, it defaults to the selected window. | 200 | If WINDOW is omitted or nil, it defaults to the selected window. |
| 201 | 201 | ||
| @@ -211,11 +211,11 @@ horizontal window combination." | |||
| 211 | (window-left-child parent) | 211 | (window-left-child parent) |
| 212 | (window-top-child parent))))) | 212 | (window-top-child parent))))) |
| 213 | 213 | ||
| 214 | (defun window-combinations (&optional window horizontal) | 214 | (defun window-combinations (window &optional horizontal) |
| 215 | "Return largest number of vertically arranged subwindows of WINDOW. | 215 | "Return largest number of windows vertically arranged within WINDOW. |
| 216 | If WINDOW is omitted or nil, it defaults to the selected window. | 216 | If WINDOW is omitted or nil, it defaults to the selected window. |
| 217 | If HORIZONTAL is non-nil, return the largest number of | 217 | If HORIZONTAL is non-nil, return the largest number of |
| 218 | horizontally arranged subwindows of WINDOW." | 218 | windows horizontally arranged within WINDOW." |
| 219 | (setq window (window-normalize-window window)) | 219 | (setq window (window-normalize-window window)) |
| 220 | (cond | 220 | (cond |
| 221 | ((window-live-p window) | 221 | ((window-live-p window) |
| @@ -225,7 +225,7 @@ horizontally arranged subwindows of WINDOW." | |||
| 225 | (window-left-child window) | 225 | (window-left-child window) |
| 226 | (window-top-child window)) | 226 | (window-top-child window)) |
| 227 | ;; If WINDOW is iso-combined, return the sum of the values for all | 227 | ;; If WINDOW is iso-combined, return the sum of the values for all |
| 228 | ;; subwindows of WINDOW. | 228 | ;; child windows of WINDOW. |
| 229 | (let ((child (window-child window)) | 229 | (let ((child (window-child window)) |
| 230 | (count 0)) | 230 | (count 0)) |
| 231 | (while child | 231 | (while child |
| @@ -236,7 +236,7 @@ horizontally arranged subwindows of WINDOW." | |||
| 236 | count)) | 236 | count)) |
| 237 | (t | 237 | (t |
| 238 | ;; If WINDOW is not iso-combined, return the maximum value of any | 238 | ;; If WINDOW is not iso-combined, return the maximum value of any |
| 239 | ;; subwindow of WINDOW. | 239 | ;; child window of WINDOW. |
| 240 | (let ((child (window-child window)) | 240 | (let ((child (window-child window)) |
| 241 | (count 1)) | 241 | (count 1)) |
| 242 | (while child | 242 | (while child |
| @@ -279,14 +279,16 @@ unpredictable." | |||
| 279 | proc (frame-root-window walk-window-tree-frame) any))) | 279 | proc (frame-root-window walk-window-tree-frame) any))) |
| 280 | 280 | ||
| 281 | (defun walk-window-subtree (proc &optional window any) | 281 | (defun walk-window-subtree (proc &optional window any) |
| 282 | "Run function PROC on each live subwindow of WINDOW. | 282 | "Run function PROC on the subtree of windows rooted at WINDOW. |
| 283 | WINDOW defaults to the selected window. PROC must be a function | 283 | WINDOW defaults to the selected window. PROC must be a function |
| 284 | with one argument - a window. ANY, if non-nil means to run PROC | 284 | with one argument - a window. By default, run PROC only on live |
| 285 | on all live and internal subwindows of WINDOW. | 285 | windows of the subtree. If the optional argument ANY is non-nil, |
| 286 | run PROC on all live and internal windows of the subtree. If | ||
| 287 | WINDOW is live, run PROC on WINDOW only. | ||
| 286 | 288 | ||
| 287 | This function performs a pre-order, depth-first traversal of the | 289 | This function performs a pre-order, depth-first traversal of the |
| 288 | window tree rooted at WINDOW. If PROC changes that window tree, | 290 | subtree rooted at WINDOW. If PROC changes that tree, the result |
| 289 | the result is unpredictable." | 291 | is unpredictable." |
| 290 | (setq window (window-normalize-window window)) | 292 | (setq window (window-normalize-window window)) |
| 291 | (walk-window-tree-1 proc window any t)) | 293 | (walk-window-tree-1 proc window any t)) |
| 292 | 294 | ||
| @@ -381,9 +383,9 @@ WINDOW must be an internal window. Return WINDOW." | |||
| 381 | (defun window-atom-check (&optional frame) | 383 | (defun window-atom-check (&optional frame) |
| 382 | "Check atomicity of all windows on FRAME. | 384 | "Check atomicity of all windows on FRAME. |
| 383 | FRAME defaults to the selected frame. If an atomic window is | 385 | FRAME defaults to the selected frame. If an atomic window is |
| 384 | wrongly configured, reset the atomicity of all its subwindows to | 386 | wrongly configured, reset the atomicity of all its windows on |
| 385 | nil. An atomic window is wrongly configured if it has no | 387 | FRAME to nil. An atomic window is wrongly configured if it has |
| 386 | subwindows or one of its subwindows is not atomic." | 388 | no child windows or one of its child windows is not atomic." |
| 387 | (window-atom-check-1 (frame-root-window frame))) | 389 | (window-atom-check-1 (frame-root-window frame))) |
| 388 | 390 | ||
| 389 | ;; Side windows. | 391 | ;; Side windows. |
| @@ -528,7 +530,7 @@ unless it has no other choice \(like when deleting a neighboring | |||
| 528 | window).") | 530 | window).") |
| 529 | (make-variable-buffer-local 'window-size-fixed) | 531 | (make-variable-buffer-local 'window-size-fixed) |
| 530 | 532 | ||
| 531 | (defsubst window-size-ignore (window ignore) | 533 | (defun window-size-ignore (window ignore) |
| 532 | "Return non-nil if IGNORE says to ignore size restrictions for WINDOW." | 534 | "Return non-nil if IGNORE says to ignore size restrictions for WINDOW." |
| 533 | (if (window-valid-p ignore) (eq window ignore) ignore)) | 535 | (if (window-valid-p ignore) (eq window ignore) ignore)) |
| 534 | 536 | ||
| @@ -555,13 +557,13 @@ restrictions for that window only." | |||
| 555 | ;; WINDOW is an internal window. | 557 | ;; WINDOW is an internal window. |
| 556 | (if (window-combined-p sub horizontal) | 558 | (if (window-combined-p sub horizontal) |
| 557 | ;; The minimum size of an iso-combination is the sum of | 559 | ;; The minimum size of an iso-combination is the sum of |
| 558 | ;; the minimum sizes of its subwindows. | 560 | ;; the minimum sizes of its child windows. |
| 559 | (while sub | 561 | (while sub |
| 560 | (setq value (+ value | 562 | (setq value (+ value |
| 561 | (window-min-size-1 sub horizontal ignore))) | 563 | (window-min-size-1 sub horizontal ignore))) |
| 562 | (setq sub (window-right sub))) | 564 | (setq sub (window-right sub))) |
| 563 | ;; The minimum size of an ortho-combination is the maximum of | 565 | ;; The minimum size of an ortho-combination is the maximum of |
| 564 | ;; the minimum sizes of its subwindows. | 566 | ;; the minimum sizes of its child windows. |
| 565 | (while sub | 567 | (while sub |
| 566 | (setq value (max value | 568 | (setq value (max value |
| 567 | (window-min-size-1 sub horizontal ignore))) | 569 | (window-min-size-1 sub horizontal ignore))) |
| @@ -619,8 +621,9 @@ Optional argument HORIZONTAL non-nil means return DELTA if DELTA | |||
| 619 | columns can be added to WINDOW. A return value of zero means | 621 | columns can be added to WINDOW. A return value of zero means |
| 620 | that no lines (or columns) can be added to WINDOW. | 622 | that no lines (or columns) can be added to WINDOW. |
| 621 | 623 | ||
| 622 | This function looks only at WINDOW and its subwindows. The | 624 | This function looks only at WINDOW and, recursively, its child |
| 623 | function `window-resizable' looks at other windows as well. | 625 | windows. The function `window-resizable' looks at other windows |
| 626 | as well. | ||
| 624 | 627 | ||
| 625 | DELTA positive means WINDOW shall be enlarged by DELTA lines or | 628 | DELTA positive means WINDOW shall be enlarged by DELTA lines or |
| 626 | columns. If WINDOW cannot be enlarged by DELTA lines or columns | 629 | columns. If WINDOW cannot be enlarged by DELTA lines or columns |
| @@ -652,7 +655,7 @@ restrictions for that window only." | |||
| 652 | delta)) | 655 | delta)) |
| 653 | (t 0))) | 656 | (t 0))) |
| 654 | 657 | ||
| 655 | (defsubst window-sizable-p (window delta &optional horizontal ignore) | 658 | (defun window-sizable-p (window delta &optional horizontal ignore) |
| 656 | "Return t if WINDOW can be resized by DELTA lines. | 659 | "Return t if WINDOW can be resized by DELTA lines. |
| 657 | For the meaning of the arguments of this function see the | 660 | For the meaning of the arguments of this function see the |
| 658 | doc-string of `window-sizable'." | 661 | doc-string of `window-sizable'." |
| @@ -668,24 +671,24 @@ doc-string of `window-sizable'." | |||
| 668 | (if sub | 671 | (if sub |
| 669 | ;; WINDOW is an internal window. | 672 | ;; WINDOW is an internal window. |
| 670 | (if (window-combined-p sub horizontal) | 673 | (if (window-combined-p sub horizontal) |
| 671 | ;; An iso-combination is fixed size if all its subwindows | 674 | ;; An iso-combination is fixed size if all its child |
| 672 | ;; are fixed-size. | 675 | ;; windows are fixed-size. |
| 673 | (progn | 676 | (progn |
| 674 | (while sub | 677 | (while sub |
| 675 | (unless (window-size-fixed-1 sub horizontal) | 678 | (unless (window-size-fixed-1 sub horizontal) |
| 676 | ;; We found a non-fixed-size subwindow, so WINDOW's | 679 | ;; We found a non-fixed-size child window, so |
| 677 | ;; size is not fixed. | 680 | ;; WINDOW's size is not fixed. |
| 678 | (throw 'fixed nil)) | 681 | (throw 'fixed nil)) |
| 679 | (setq sub (window-right sub))) | 682 | (setq sub (window-right sub))) |
| 680 | ;; All subwindows are fixed-size, so WINDOW's size is | 683 | ;; All child windows are fixed-size, so WINDOW's size is |
| 681 | ;; fixed. | 684 | ;; fixed. |
| 682 | (throw 'fixed t)) | 685 | (throw 'fixed t)) |
| 683 | ;; An ortho-combination is fixed-size if at least one of its | 686 | ;; An ortho-combination is fixed-size if at least one of its |
| 684 | ;; subwindows is fixed-size. | 687 | ;; child windows is fixed-size. |
| 685 | (while sub | 688 | (while sub |
| 686 | (when (window-size-fixed-1 sub horizontal) | 689 | (when (window-size-fixed-1 sub horizontal) |
| 687 | ;; We found a fixed-size subwindow, so WINDOW's size is | 690 | ;; We found a fixed-size child window, so WINDOW's size |
| 688 | ;; fixed. | 691 | ;; is fixed. |
| 689 | (throw 'fixed t)) | 692 | (throw 'fixed t)) |
| 690 | (setq sub (window-right sub)))) | 693 | (setq sub (window-right sub)))) |
| 691 | ;; WINDOW is a live window. | 694 | ;; WINDOW is a live window. |
| @@ -701,8 +704,8 @@ window. Optional argument HORIZONTAL non-nil means return | |||
| 701 | non-nil if WINDOW's width is fixed. | 704 | non-nil if WINDOW's width is fixed. |
| 702 | 705 | ||
| 703 | If this function returns nil, this does not necessarily mean that | 706 | If this function returns nil, this does not necessarily mean that |
| 704 | WINDOW can be resized in the desired direction. The functions | 707 | WINDOW can be resized in the desired direction. The function |
| 705 | `window-resizable' and `window-resizable-p' will tell that." | 708 | `window-resizable' can tell that." |
| 706 | (window-size-fixed-1 | 709 | (window-size-fixed-1 |
| 707 | (window-normalize-window window) horizontal)) | 710 | (window-normalize-window window) horizontal)) |
| 708 | 711 | ||
| @@ -717,8 +720,8 @@ WINDOW can be resized in the desired direction. The functions | |||
| 717 | (catch 'done | 720 | (catch 'done |
| 718 | (if (window-combined-p sub horizontal) | 721 | (if (window-combined-p sub horizontal) |
| 719 | ;; In an iso-combination throw DELTA if we find at least one | 722 | ;; In an iso-combination throw DELTA if we find at least one |
| 720 | ;; subwindow and that subwindow is either not of fixed-size | 723 | ;; child window and that window is either not fixed-size or |
| 721 | ;; or we can ignore fixed-sizeness. | 724 | ;; we can ignore fixed-sizeness. |
| 722 | (let ((skip (eq trail 'after))) | 725 | (let ((skip (eq trail 'after))) |
| 723 | (while sub | 726 | (while sub |
| 724 | (cond | 727 | (cond |
| @@ -728,11 +731,11 @@ WINDOW can be resized in the desired direction. The functions | |||
| 728 | ((and (not (window-size-ignore window ignore)) | 731 | ((and (not (window-size-ignore window ignore)) |
| 729 | (window-size-fixed-p sub horizontal))) | 732 | (window-size-fixed-p sub horizontal))) |
| 730 | (t | 733 | (t |
| 731 | ;; We found a non-fixed-size subwindow. | 734 | ;; We found a non-fixed-size child window. |
| 732 | (throw 'done delta))) | 735 | (throw 'done delta))) |
| 733 | (setq sub (window-right sub)))) | 736 | (setq sub (window-right sub)))) |
| 734 | ;; In an ortho-combination set DELTA to the minimum value by | 737 | ;; In an ortho-combination set DELTA to the minimum value by |
| 735 | ;; which other subwindows can shrink. | 738 | ;; which other child windows can shrink. |
| 736 | (while sub | 739 | (while sub |
| 737 | (unless (eq sub window) | 740 | (unless (eq sub window) |
| 738 | (setq delta | 741 | (setq delta |
| @@ -768,8 +771,8 @@ Optional argument NOUP non-nil means don't go up in the window | |||
| 768 | tree but try to enlarge windows within WINDOW's combination only. | 771 | tree but try to enlarge windows within WINDOW's combination only. |
| 769 | 772 | ||
| 770 | Optional argument NODOWN non-nil means don't check whether WINDOW | 773 | Optional argument NODOWN non-nil means don't check whether WINDOW |
| 771 | itself \(and its subwindows) can be shrunk; check only whether at | 774 | itself \(and its child windows) can be shrunk; check only whether |
| 772 | least one other windows can be enlarged appropriately." | 775 | at least one other window can be enlarged appropriately." |
| 773 | (setq window (window-normalize-window window)) | 776 | (setq window (window-normalize-window window)) |
| 774 | (let ((size (window-total-size window horizontal)) | 777 | (let ((size (window-total-size window horizontal)) |
| 775 | (minimum (window-min-size window horizontal ignore))) | 778 | (minimum (window-min-size window horizontal ignore))) |
| @@ -797,7 +800,7 @@ least one other windows can be enlarged appropriately." | |||
| 797 | (catch 'fixed | 800 | (catch 'fixed |
| 798 | (if (window-combined-p sub horizontal) | 801 | (if (window-combined-p sub horizontal) |
| 799 | ;; For an iso-combination calculate how much we can get from | 802 | ;; For an iso-combination calculate how much we can get from |
| 800 | ;; other subwindows. | 803 | ;; other child windows. |
| 801 | (let ((skip (eq trail 'after))) | 804 | (let ((skip (eq trail 'after))) |
| 802 | (while sub | 805 | (while sub |
| 803 | (cond | 806 | (cond |
| @@ -811,7 +814,7 @@ least one other windows can be enlarged appropriately." | |||
| 811 | (window-min-size sub horizontal ignore)))))) | 814 | (window-min-size sub horizontal ignore)))))) |
| 812 | (setq sub (window-right sub)))) | 815 | (setq sub (window-right sub)))) |
| 813 | ;; For an ortho-combination throw DELTA when at least one | 816 | ;; For an ortho-combination throw DELTA when at least one |
| 814 | ;; subwindow is fixed-size. | 817 | ;; child window is fixed-size. |
| 815 | (while sub | 818 | (while sub |
| 816 | (when (and (not (eq sub window)) | 819 | (when (and (not (eq sub window)) |
| 817 | (not (window-size-ignore sub ignore)) | 820 | (not (window-size-ignore sub ignore)) |
| @@ -850,8 +853,8 @@ tree but try to obtain the entire space from windows within | |||
| 850 | WINDOW's combination. | 853 | WINDOW's combination. |
| 851 | 854 | ||
| 852 | Optional argument NODOWN non-nil means do not check whether | 855 | Optional argument NODOWN non-nil means do not check whether |
| 853 | WINDOW itself \(and its subwindows) can be enlarged; check only | 856 | WINDOW itself \(and its child windows) can be enlarged; check |
| 854 | whether other windows can be shrunk appropriately." | 857 | only whether other windows can be shrunk appropriately." |
| 855 | (setq window (window-normalize-window window)) | 858 | (setq window (window-normalize-window window)) |
| 856 | (if (and (not (window-size-ignore window ignore)) | 859 | (if (and (not (window-size-ignore window ignore)) |
| 857 | (not nodown) (window-size-fixed-p window horizontal)) | 860 | (not nodown) (window-size-fixed-p window horizontal)) |
| @@ -862,14 +865,14 @@ whether other windows can be shrunk appropriately." | |||
| 862 | (window-max-delta-1 window 0 horizontal ignore trail noup))) | 865 | (window-max-delta-1 window 0 horizontal ignore trail noup))) |
| 863 | 866 | ||
| 864 | ;; Make NOUP also inhibit the min-size check. | 867 | ;; Make NOUP also inhibit the min-size check. |
| 865 | (defun window-resizable (window delta &optional horizontal ignore trail noup nodown) | 868 | (defun window--resizable (window delta &optional horizontal ignore trail noup nodown) |
| 866 | "Return DELTA if WINDOW can be resized vertically by DELTA lines. | 869 | "Return DELTA if WINDOW can be resized vertically by DELTA lines. |
| 867 | Optional argument HORIZONTAL non-nil means return DELTA if WINDOW | 870 | Optional argument HORIZONTAL non-nil means return DELTA if WINDOW |
| 868 | can be resized horizontally by DELTA columns. A return value of | 871 | can be resized horizontally by DELTA columns. A return value of |
| 869 | zero means that WINDOW is not resizable. | 872 | zero means that WINDOW is not resizable. |
| 870 | 873 | ||
| 871 | DELTA positive means WINDOW shall be enlarged by DELTA lines or | 874 | DELTA positive means WINDOW shall be enlarged by DELTA lines or |
| 872 | columns. If WINDOW cannot be enlarged by DELTA lines or columns | 875 | columns. If WINDOW cannot be enlarged by DELTA lines or columns, |
| 873 | return the maximum value in the range 0..DELTA by which WINDOW | 876 | return the maximum value in the range 0..DELTA by which WINDOW |
| 874 | can be enlarged. | 877 | can be enlarged. |
| 875 | 878 | ||
| @@ -891,11 +894,12 @@ of or below WINDOW can be shrunk. Optional argument TRAIL | |||
| 891 | shrunk. | 894 | shrunk. |
| 892 | 895 | ||
| 893 | Optional argument NOUP non-nil means don't go up in the window | 896 | Optional argument NOUP non-nil means don't go up in the window |
| 894 | tree but try to distribute the space among the other windows | 897 | tree but check only whether space can be obtained from (or given |
| 895 | within WINDOW's combination. | 898 | to) WINDOW's siblings. |
| 896 | 899 | ||
| 897 | Optional argument NODOWN non-nil means don't check whether WINDOW | 900 | Optional argument NODOWN non-nil means don't go down in the |
| 898 | and its subwindows can be resized." | 901 | window tree. This means do not check whether resizing would |
| 902 | violate size restrictions of WINDOW or its child windows." | ||
| 899 | (setq window (window-normalize-window window)) | 903 | (setq window (window-normalize-window window)) |
| 900 | (cond | 904 | (cond |
| 901 | ((< delta 0) | 905 | ((< delta 0) |
| @@ -906,34 +910,58 @@ and its subwindows can be resized." | |||
| 906 | delta)) | 910 | delta)) |
| 907 | (t 0))) | 911 | (t 0))) |
| 908 | 912 | ||
| 909 | (defun window-resizable-p (window delta &optional horizontal ignore trail noup nodown) | 913 | (defun window--resizable-p (window delta &optional horizontal ignore trail noup nodown) |
| 910 | "Return t if WINDOW can be resized vertically by DELTA lines. | 914 | "Return t if WINDOW can be resized vertically by DELTA lines. |
| 911 | For the meaning of the arguments of this function see the | 915 | For the meaning of the arguments of this function see the |
| 912 | doc-string of `window-resizable'." | 916 | doc-string of `window--resizable'." |
| 913 | (setq window (window-normalize-window window)) | 917 | (setq window (window-normalize-window window)) |
| 914 | (if (> delta 0) | 918 | (if (> delta 0) |
| 915 | (>= (window-resizable window delta horizontal ignore trail noup nodown) | 919 | (>= (window--resizable window delta horizontal ignore trail noup nodown) |
| 916 | delta) | 920 | delta) |
| 917 | (<= (window-resizable window delta horizontal ignore trail noup nodown) | 921 | (<= (window--resizable window delta horizontal ignore trail noup nodown) |
| 918 | delta))) | 922 | delta))) |
| 919 | 923 | ||
| 920 | (defsubst window-total-height (&optional window) | 924 | (defun window-resizable (window delta &optional horizontal ignore) |
| 921 | "Return the total number of lines of WINDOW. | 925 | "Return DELTA if WINDOW can be resized vertically by DELTA lines. |
| 922 | WINDOW can be any window and defaults to the selected one. The | 926 | Optional argument HORIZONTAL non-nil means return DELTA if WINDOW |
| 923 | return value includes WINDOW's mode line and header line, if any. | 927 | can be resized horizontally by DELTA columns. A return value of |
| 924 | If WINDOW is internal the return value is the sum of the total | 928 | zero means that WINDOW is not resizable. |
| 925 | number of lines of WINDOW's child windows if these are vertically | 929 | |
| 926 | combined and the height of WINDOW's first child otherwise. | 930 | DELTA positive means WINDOW shall be enlarged by DELTA lines or |
| 931 | columns. If WINDOW cannot be enlarged by DELTA lines or columns | ||
| 932 | return the maximum value in the range 0..DELTA by which WINDOW | ||
| 933 | can be enlarged. | ||
| 934 | |||
| 935 | DELTA negative means WINDOW shall be shrunk by -DELTA lines or | ||
| 936 | columns. If WINDOW cannot be shrunk by -DELTA lines or columns, | ||
| 937 | return the minimum value in the range DELTA..0 that can be used | ||
| 938 | for shrinking WINDOW. | ||
| 939 | |||
| 940 | Optional argument IGNORE non-nil means ignore any restrictions | ||
| 941 | imposed by fixed size windows, `window-min-height' or | ||
| 942 | `window-min-width' settings. IGNORE a window means ignore | ||
| 943 | restrictions for that window only. IGNORE equal `safe' means | ||
| 944 | live windows may get as small as `window-safe-min-height' lines | ||
| 945 | and `window-safe-min-width' columns." | ||
| 946 | (setq window (window-normalize-window window)) | ||
| 947 | (window--resizable window delta horizontal ignore)) | ||
| 927 | 948 | ||
| 928 | Note: This function does not take into account the value of | 949 | (defun window-total-size (&optional window horizontal) |
| 929 | `line-spacing' when calculating the number of lines in WINDOW." | 950 | "Return the total height or width of window WINDOW. |
| 930 | (window-total-size window)) | 951 | If WINDOW is omitted or nil, it defaults to the selected window. |
| 952 | |||
| 953 | If HORIZONTAL is omitted or nil, return the total height of | ||
| 954 | WINDOW, in lines, like `window-total-height'. Otherwise return | ||
| 955 | the total width, in columns, like `window-total-width'." | ||
| 956 | (if horizontal | ||
| 957 | (window-total-width window) | ||
| 958 | (window-total-height window))) | ||
| 931 | 959 | ||
| 932 | ;; Eventually we should make `window-height' obsolete. | 960 | ;; Eventually we should make `window-height' obsolete. |
| 933 | (defalias 'window-height 'window-total-height) | 961 | (defalias 'window-height 'window-total-height) |
| 934 | 962 | ||
| 935 | ;; See discussion in bug#4543. | 963 | ;; See discussion in bug#4543. |
| 936 | (defsubst window-full-height-p (&optional window) | 964 | (defun window-full-height-p (&optional window) |
| 937 | "Return t if WINDOW is as high as the containing frame. | 965 | "Return t if WINDOW is as high as the containing frame. |
| 938 | More precisely, return t if and only if the total height of | 966 | More precisely, return t if and only if the total height of |
| 939 | WINDOW equals the total height of the root window of WINDOW's | 967 | WINDOW equals the total height of the root window of WINDOW's |
| @@ -943,17 +971,7 @@ one." | |||
| 943 | (= (window-total-size window) | 971 | (= (window-total-size window) |
| 944 | (window-total-size (frame-root-window window)))) | 972 | (window-total-size (frame-root-window window)))) |
| 945 | 973 | ||
| 946 | (defsubst window-total-width (&optional window) | 974 | (defun window-full-width-p (&optional window) |
| 947 | "Return the total number of columns of WINDOW. | ||
| 948 | WINDOW can be any window and defaults to the selected one. The | ||
| 949 | return value includes any vertical dividers or scrollbars of | ||
| 950 | WINDOW. If WINDOW is internal, the return value is the sum of | ||
| 951 | the total number of columns of WINDOW's child windows if these | ||
| 952 | are horizontally combined and the width of WINDOW's first child | ||
| 953 | otherwise." | ||
| 954 | (window-total-size window t)) | ||
| 955 | |||
| 956 | (defsubst window-full-width-p (&optional window) | ||
| 957 | "Return t if WINDOW is as wide as the containing frame. | 975 | "Return t if WINDOW is as wide as the containing frame. |
| 958 | More precisely, return t if and only if the total width of WINDOW | 976 | More precisely, return t if and only if the total width of WINDOW |
| 959 | equals the total width of the root window of WINDOW's frame. | 977 | equals the total width of the root window of WINDOW's frame. |
| @@ -962,40 +980,17 @@ WINDOW can be any window and defaults to the selected one." | |||
| 962 | (= (window-total-size window t) | 980 | (= (window-total-size window t) |
| 963 | (window-total-size (frame-root-window window) t))) | 981 | (window-total-size (frame-root-window window) t))) |
| 964 | 982 | ||
| 965 | (defsubst window-body-height (&optional window) | 983 | (defun window-body-size (&optional window horizontal) |
| 966 | "Return the number of lines of WINDOW's body. | 984 | "Return the height or width of WINDOW's text area. |
| 967 | WINDOW must be a live window and defaults to the selected one. | 985 | If WINDOW is omitted or nil, it defaults to the selected window. |
| 968 | 986 | Signal an error if the window is not live. | |
| 969 | The return value does not include WINDOW's mode line and header | ||
| 970 | line, if any. If a line at the bottom of the window is only | ||
| 971 | partially visible, that line is included in the return value. If | ||
| 972 | you do not want to include a partially visible bottom line in the | ||
| 973 | return value, use `window-text-height' instead. | ||
| 974 | |||
| 975 | Note that the return value is measured in canonical units, i.e. for | ||
| 976 | the default frame's face. If the window shows some characters with | ||
| 977 | non-default face, e.g., if the font of some characters is larger or | ||
| 978 | smaller than the default font, the value returned by this function | ||
| 979 | will not match the actual number of lines shown in the window. To | ||
| 980 | get the actual number of lines, use `posn-at-point'." | ||
| 981 | (window-body-size window)) | ||
| 982 | |||
| 983 | (defsubst window-body-width (&optional window) | ||
| 984 | "Return the number of columns of WINDOW's body. | ||
| 985 | WINDOW must be a live window and defaults to the selected one. | ||
| 986 | |||
| 987 | The return value does not include any vertical dividers or scroll | ||
| 988 | bars owned by WINDOW. On a window-system the return value does | ||
| 989 | not include the number of columns used for WINDOW's fringes or | ||
| 990 | display margins either. | ||
| 991 | 987 | ||
| 992 | Note that the return value is measured in canonical units, i.e. for | 988 | If HORIZONTAL is omitted or nil, return the height of the text |
| 993 | the default frame's face. If the window shows some characters with | 989 | area, like `window-body-height'. Otherwise, return the width of |
| 994 | non-default face, e.g., if the font of some characters is larger or | 990 | the text area, like `window-body-width'." |
| 995 | smaller than the default font, the value returned by this function | 991 | (if horizontal |
| 996 | will not match the actual number of characters per line shown in the | 992 | (window-body-width window) |
| 997 | window. To get the actual number of columns, use `posn-at-point'." | 993 | (window-body-height window))) |
| 998 | (window-body-size window t)) | ||
| 999 | 994 | ||
| 1000 | ;; Eventually we should make `window-height' obsolete. | 995 | ;; Eventually we should make `window-height' obsolete. |
| 1001 | (defalias 'window-width 'window-body-width) | 996 | (defalias 'window-width 'window-body-width) |
| @@ -1463,9 +1458,9 @@ as small) as possible but don't signal an error." | |||
| 1463 | 1458 | ||
| 1464 | ;; Resize now. | 1459 | ;; Resize now. |
| 1465 | (window--resize-reset frame) | 1460 | (window--resize-reset frame) |
| 1466 | ;; Ideally we should be able to resize just the last subwindow of | 1461 | ;; Ideally we should be able to resize just the last child of root |
| 1467 | ;; root here. See the comment in `resize-root-window-vertically' | 1462 | ;; here. See the comment in `resize-root-window-vertically' for |
| 1468 | ;; for why we do not do that. | 1463 | ;; why we do not do that. |
| 1469 | (window--resize-this-window root (- delta) nil nil t) | 1464 | (window--resize-this-window root (- delta) nil nil t) |
| 1470 | (set-window-new-total window (+ height delta)) | 1465 | (set-window-new-total window (+ height delta)) |
| 1471 | ;; The following routine catches the case where we want to resize | 1466 | ;; The following routine catches the case where we want to resize |
| @@ -1506,7 +1501,7 @@ instead." | |||
| 1506 | (error "Cannot resize the root window of a frame")) | 1501 | (error "Cannot resize the root window of a frame")) |
| 1507 | ((window-minibuffer-p window) | 1502 | ((window-minibuffer-p window) |
| 1508 | (window--resize-mini-window window delta)) | 1503 | (window--resize-mini-window window delta)) |
| 1509 | ((window-resizable-p window delta horizontal ignore) | 1504 | ((window--resizable-p window delta horizontal ignore) |
| 1510 | (window--resize-reset frame horizontal) | 1505 | (window--resize-reset frame horizontal) |
| 1511 | (window--resize-this-window window delta horizontal ignore t) | 1506 | (window--resize-this-window window delta horizontal ignore t) |
| 1512 | (if (and (not (window-splits window)) | 1507 | (if (and (not (window-splits window)) |
| @@ -1532,14 +1527,14 @@ instead." | |||
| 1532 | (t | 1527 | (t |
| 1533 | (error "Cannot resize window %s" window))))) | 1528 | (error "Cannot resize window %s" window))))) |
| 1534 | 1529 | ||
| 1535 | (defsubst window--resize-subwindows-skip-p (window) | 1530 | (defun window--resize-child-windows-skip-p (window) |
| 1536 | "Return non-nil if WINDOW shall be skipped by resizing routines." | 1531 | "Return non-nil if WINDOW shall be skipped by resizing routines." |
| 1537 | (memq (window-new-normal window) '(ignore stuck skip))) | 1532 | (memq (window-new-normal window) '(ignore stuck skip))) |
| 1538 | 1533 | ||
| 1539 | (defun window--resize-subwindows-normal (parent horizontal window this-delta &optional trail other-delta) | 1534 | (defun window--resize-child-windows-normal (parent horizontal window this-delta &optional trail other-delta) |
| 1540 | "Set the new normal height of subwindows of window PARENT. | 1535 | "Recursively set new normal height of child windows of window PARENT. |
| 1541 | HORIZONTAL non-nil means set the new normal width of these | 1536 | HORIZONTAL non-nil means set the new normal width of these |
| 1542 | windows. WINDOW specifies a subwindow of PARENT that has been | 1537 | windows. WINDOW specifies a child window of PARENT that has been |
| 1543 | resized by THIS-DELTA lines \(columns). | 1538 | resized by THIS-DELTA lines \(columns). |
| 1544 | 1539 | ||
| 1545 | Optional argument TRAIL either 'before or 'after means set values | 1540 | Optional argument TRAIL either 'before or 'after means set values |
| @@ -1561,8 +1556,8 @@ PARENT in order to resize WINDOW." | |||
| 1561 | (parent-normal 0.0) | 1556 | (parent-normal 0.0) |
| 1562 | (skip (eq trail 'after))) | 1557 | (skip (eq trail 'after))) |
| 1563 | 1558 | ||
| 1564 | ;; Set parent-normal to the sum of the normal sizes of all | 1559 | ;; Set parent-normal to the sum of the normal sizes of all child |
| 1565 | ;; subwindows of PARENT that shall be resized, excluding only WINDOW | 1560 | ;; windows of PARENT that shall be resized, excluding only WINDOW |
| 1566 | ;; and any windows specified by the optional TRAIL argument. | 1561 | ;; and any windows specified by the optional TRAIL argument. |
| 1567 | (while sub | 1562 | (while sub |
| 1568 | (cond | 1563 | (cond |
| @@ -1574,7 +1569,7 @@ PARENT in order to resize WINDOW." | |||
| 1574 | (+ parent-normal (window-normal-size sub horizontal))))) | 1569 | (+ parent-normal (window-normal-size sub horizontal))))) |
| 1575 | (setq sub (window-right sub))) | 1570 | (setq sub (window-right sub))) |
| 1576 | 1571 | ||
| 1577 | ;; Set the new normal size of all subwindows of PARENT from what | 1572 | ;; Set the new normal size of all child windows of PARENT from what |
| 1578 | ;; they should have contributed for recovering THIS-DELTA lines | 1573 | ;; they should have contributed for recovering THIS-DELTA lines |
| 1579 | ;; (columns). | 1574 | ;; (columns). |
| 1580 | (setq sub (window-child parent)) | 1575 | (setq sub (window-child parent)) |
| @@ -1633,11 +1628,11 @@ PARENT in order to resize WINDOW." | |||
| 1633 | ;; Don't get larger than 1 or smaller than 0. | 1628 | ;; Don't get larger than 1 or smaller than 0. |
| 1634 | (min 1.0 (max (- 1.0 sum) 0.0)))))) | 1629 | (min 1.0 (max (- 1.0 sum) 0.0)))))) |
| 1635 | 1630 | ||
| 1636 | (defun window--resize-subwindows (parent delta &optional horizontal window ignore trail edge) | 1631 | (defun window--resize-child-windows (parent delta &optional horizontal window ignore trail edge) |
| 1637 | "Resize subwindows of window PARENT vertically by DELTA lines. | 1632 | "Resize child windows of window PARENT vertically by DELTA lines. |
| 1638 | PARENT must be a vertically combined internal window. | 1633 | PARENT must be a vertically combined internal window. |
| 1639 | 1634 | ||
| 1640 | Optional argument HORIZONTAL non-nil means resize subwindows of | 1635 | Optional argument HORIZONTAL non-nil means resize child windows of |
| 1641 | PARENT horizontally by DELTA columns. In this case PARENT must | 1636 | PARENT horizontally by DELTA columns. In this case PARENT must |
| 1642 | be a horizontally combined internal window. | 1637 | be a horizontally combined internal window. |
| 1643 | 1638 | ||
| @@ -1669,10 +1664,10 @@ already set by this routine." | |||
| 1669 | (setq sub first) | 1664 | (setq sub first) |
| 1670 | (while (and (window-right sub) | 1665 | (while (and (window-right sub) |
| 1671 | (or (and (eq trail 'before) | 1666 | (or (and (eq trail 'before) |
| 1672 | (not (window--resize-subwindows-skip-p | 1667 | (not (window--resize-child-windows-skip-p |
| 1673 | (window-right sub)))) | 1668 | (window-right sub)))) |
| 1674 | (and (eq trail 'after) | 1669 | (and (eq trail 'after) |
| 1675 | (window--resize-subwindows-skip-p sub)))) | 1670 | (window--resize-child-windows-skip-p sub)))) |
| 1676 | (setq sub (window-right sub))) | 1671 | (setq sub (window-right sub))) |
| 1677 | sub) | 1672 | sub) |
| 1678 | (if horizontal | 1673 | (if horizontal |
| @@ -1700,7 +1695,7 @@ already set by this routine." | |||
| 1700 | window (- (window-normal-size window horizontal) | 1695 | window (- (window-normal-size window horizontal) |
| 1701 | (- (window-new-normal sub) | 1696 | (- (window-new-normal sub) |
| 1702 | (window-normal-size sub horizontal))))) | 1697 | (window-normal-size sub horizontal))))) |
| 1703 | (window--resize-subwindows-normal | 1698 | (window--resize-child-windows-normal |
| 1704 | parent horizontal sub 0 trail delta)) | 1699 | parent horizontal sub 0 trail delta)) |
| 1705 | ;; Return 'normalized to notify `window--resize-siblings' that | 1700 | ;; Return 'normalized to notify `window--resize-siblings' that |
| 1706 | ;; normal sizes have been already set. | 1701 | ;; normal sizes have been already set. |
| @@ -1709,9 +1704,9 @@ already set by this routine." | |||
| 1709 | (setq sub first) | 1704 | (setq sub first) |
| 1710 | (while sub | 1705 | (while sub |
| 1711 | (cond | 1706 | (cond |
| 1712 | ((or (window--resize-subwindows-skip-p sub) | 1707 | ((or (window--resize-child-windows-skip-p sub) |
| 1713 | ;; Ignore windows to skip and fixed-size subwindows - in | 1708 | ;; Ignore windows to skip and fixed-size child windows - |
| 1714 | ;; the latter case make it a window to skip. | 1709 | ;; in the latter case make it a window to skip. |
| 1715 | (and (not ignore) | 1710 | (and (not ignore) |
| 1716 | (window-size-fixed-p sub horizontal) | 1711 | (window-size-fixed-p sub horizontal) |
| 1717 | (set-window-new-normal sub 'ignore)))) | 1712 | (set-window-new-normal sub 'ignore)))) |
| @@ -1799,7 +1794,7 @@ already set by this routine." | |||
| 1799 | (set-window-new-normal sub)) | 1794 | (set-window-new-normal sub)) |
| 1800 | 1795 | ||
| 1801 | (unless (eq (window-new-normal sub) 'ignore) | 1796 | (unless (eq (window-new-normal sub) 'ignore) |
| 1802 | ;; Resize this subwindow's subwindows (back-engineering | 1797 | ;; Resize this window's child windows (back-engineering |
| 1803 | ;; delta from sub's old and new total sizes). | 1798 | ;; delta from sub's old and new total sizes). |
| 1804 | (let ((delta (- (window-new-total sub) | 1799 | (let ((delta (- (window-new-total sub) |
| 1805 | (window-total-size sub horizontal)))) | 1800 | (window-total-size sub horizontal)))) |
| @@ -1860,7 +1855,7 @@ preferably only resize windows adjacent to EDGE." | |||
| 1860 | ;; Set this-delta to what we can get from WINDOW's siblings. | 1855 | ;; Set this-delta to what we can get from WINDOW's siblings. |
| 1861 | (if (= (- delta) (window-total-size window horizontal)) | 1856 | (if (= (- delta) (window-total-size window horizontal)) |
| 1862 | ;; A deletion, presumably. We must handle this case | 1857 | ;; A deletion, presumably. We must handle this case |
| 1863 | ;; specially since `window-resizable' can't be used. | 1858 | ;; specially since `window--resizable' can't be used. |
| 1864 | (if this-delta | 1859 | (if this-delta |
| 1865 | ;; There's at least one resizable sibling we can | 1860 | ;; There's at least one resizable sibling we can |
| 1866 | ;; give WINDOW's size to. | 1861 | ;; give WINDOW's size to. |
| @@ -1869,7 +1864,7 @@ preferably only resize windows adjacent to EDGE." | |||
| 1869 | (setq this-delta 0)) | 1864 | (setq this-delta 0)) |
| 1870 | ;; Any other form of resizing. | 1865 | ;; Any other form of resizing. |
| 1871 | (setq this-delta | 1866 | (setq this-delta |
| 1872 | (window-resizable window delta horizontal ignore trail t))) | 1867 | (window--resizable window delta horizontal ignore trail t))) |
| 1873 | 1868 | ||
| 1874 | ;; Set other-delta to what we still have to get from | 1869 | ;; Set other-delta to what we still have to get from |
| 1875 | ;; ancestor windows of parent. | 1870 | ;; ancestor windows of parent. |
| @@ -1882,19 +1877,19 @@ preferably only resize windows adjacent to EDGE." | |||
| 1882 | (if (zerop this-delta) | 1877 | (if (zerop this-delta) |
| 1883 | ;; We haven't got anything from WINDOW's siblings but we | 1878 | ;; We haven't got anything from WINDOW's siblings but we |
| 1884 | ;; must update the normal sizes to respect other-delta. | 1879 | ;; must update the normal sizes to respect other-delta. |
| 1885 | (window--resize-subwindows-normal | 1880 | (window--resize-child-windows-normal |
| 1886 | parent horizontal window this-delta trail other-delta) | 1881 | parent horizontal window this-delta trail other-delta) |
| 1887 | ;; We did get something from WINDOW's siblings which means | 1882 | ;; We did get something from WINDOW's siblings which means |
| 1888 | ;; we have to resize their subwindows. | 1883 | ;; we have to resize their child windows. |
| 1889 | (unless (eq (window--resize-subwindows | 1884 | (unless (eq (window--resize-child-windows |
| 1890 | parent (- this-delta) horizontal | 1885 | parent (- this-delta) horizontal |
| 1891 | window ignore trail edge) | 1886 | window ignore trail edge) |
| 1892 | ;; If `window--resize-subwindows' returns | 1887 | ;; If `window--resize-child-windows' returns |
| 1893 | ;; 'normalized, this means it has set the | 1888 | ;; 'normalized, this means it has set the |
| 1894 | ;; normal sizes already. | 1889 | ;; normal sizes already. |
| 1895 | 'normalized) | 1890 | 'normalized) |
| 1896 | ;; Set the normal sizes. | 1891 | ;; Set the normal sizes. |
| 1897 | (window--resize-subwindows-normal | 1892 | (window--resize-child-windows-normal |
| 1898 | parent horizontal window this-delta trail other-delta)) | 1893 | parent horizontal window this-delta trail other-delta)) |
| 1899 | ;; Set DELTA to what we still have to get from ancestor | 1894 | ;; Set DELTA to what we still have to get from ancestor |
| 1900 | ;; windows. | 1895 | ;; windows. |
| @@ -1934,8 +1929,8 @@ resize only windows on the left or above EDGE. If TRAIL equals | |||
| 1934 | `after', resize only windows on the right or below EDGE. Also, | 1929 | `after', resize only windows on the right or below EDGE. Also, |
| 1935 | preferably only resize windows adjacent to EDGE. | 1930 | preferably only resize windows adjacent to EDGE. |
| 1936 | 1931 | ||
| 1937 | This function recursively resizes WINDOW's subwindows to fit the | 1932 | This function recursively resizes WINDOW's child windows to fit the |
| 1938 | new size. Make sure that WINDOW is `window-resizable' before | 1933 | new size. Make sure that WINDOW is `window--resizable' before |
| 1939 | calling this function. Note that this function does not resize | 1934 | calling this function. Note that this function does not resize |
| 1940 | siblings of WINDOW or WINDOW's parent window. You have to | 1935 | siblings of WINDOW or WINDOW's parent window. You have to |
| 1941 | eventually call `window-resize-apply' in order to make resizing | 1936 | eventually call `window-resize-apply' in order to make resizing |
| @@ -1948,11 +1943,11 @@ actually take effect." | |||
| 1948 | (cond | 1943 | (cond |
| 1949 | ((not sub)) | 1944 | ((not sub)) |
| 1950 | ((window-combined-p sub horizontal) | 1945 | ((window-combined-p sub horizontal) |
| 1951 | ;; In an iso-combination resize subwindows according to their | 1946 | ;; In an iso-combination resize child windows according to their |
| 1952 | ;; normal sizes. | 1947 | ;; normal sizes. |
| 1953 | (window--resize-subwindows | 1948 | (window--resize-child-windows |
| 1954 | window delta horizontal nil ignore trail edge)) | 1949 | window delta horizontal nil ignore trail edge)) |
| 1955 | ;; In an ortho-combination resize each subwindow by DELTA. | 1950 | ;; In an ortho-combination resize each child window by DELTA. |
| 1956 | (t | 1951 | (t |
| 1957 | (while sub | 1952 | (while sub |
| 1958 | (window--resize-this-window | 1953 | (window--resize-this-window |
| @@ -1978,7 +1973,7 @@ resizes windows proportionally and never deletes any windows." | |||
| 1978 | "Resize root window WINDOW vertically by DELTA lines. | 1973 | "Resize root window WINDOW vertically by DELTA lines. |
| 1979 | If DELTA is less than zero and we can't shrink WINDOW by DELTA | 1974 | If DELTA is less than zero and we can't shrink WINDOW by DELTA |
| 1980 | lines, shrink it as much as possible. If DELTA is greater than | 1975 | lines, shrink it as much as possible. If DELTA is greater than |
| 1981 | zero, this function can resize fixed-size subwindows in order to | 1976 | zero, this function can resize fixed-size windows in order to |
| 1982 | recover the necessary lines. | 1977 | recover the necessary lines. |
| 1983 | 1978 | ||
| 1984 | Return the number of lines that were recovered. | 1979 | Return the number of lines that were recovered. |
| @@ -2075,7 +2070,7 @@ move it as far as possible in the desired direction." | |||
| 2075 | ;; Start resizing. | 2070 | ;; Start resizing. |
| 2076 | (window--resize-reset frame horizontal) | 2071 | (window--resize-reset frame horizontal) |
| 2077 | ;; Try to enlarge LEFT first. | 2072 | ;; Try to enlarge LEFT first. |
| 2078 | (setq this-delta (window-resizable left delta horizontal)) | 2073 | (setq this-delta (window--resizable left delta horizontal)) |
| 2079 | (unless (zerop this-delta) | 2074 | (unless (zerop this-delta) |
| 2080 | (window--resize-this-window | 2075 | (window--resize-this-window |
| 2081 | left this-delta horizontal nil t 'before | 2076 | left this-delta horizontal nil t 'before |
| @@ -2098,7 +2093,7 @@ move it as far as possible in the desired direction." | |||
| 2098 | ;; Start resizing. | 2093 | ;; Start resizing. |
| 2099 | (window--resize-reset frame horizontal) | 2094 | (window--resize-reset frame horizontal) |
| 2100 | ;; Try to enlarge RIGHT. | 2095 | ;; Try to enlarge RIGHT. |
| 2101 | (setq this-delta (window-resizable right (- delta) horizontal)) | 2096 | (setq this-delta (window--resizable right (- delta) horizontal)) |
| 2102 | (unless (zerop this-delta) | 2097 | (unless (zerop this-delta) |
| 2103 | (window--resize-this-window | 2098 | (window--resize-this-window |
| 2104 | right this-delta horizontal nil t 'after | 2099 | right this-delta horizontal nil t 'after |
| @@ -2129,7 +2124,7 @@ Return nil." | |||
| 2129 | ((zerop delta)) | 2124 | ((zerop delta)) |
| 2130 | ((window-size-fixed-p nil horizontal) | 2125 | ((window-size-fixed-p nil horizontal) |
| 2131 | (error "Selected window has fixed size")) | 2126 | (error "Selected window has fixed size")) |
| 2132 | ((window-resizable-p nil delta horizontal) | 2127 | ((window--resizable-p nil delta horizontal) |
| 2133 | (window-resize nil delta horizontal)) | 2128 | (window-resize nil delta horizontal)) |
| 2134 | (t | 2129 | (t |
| 2135 | (window-resize | 2130 | (window-resize |
| @@ -2150,7 +2145,7 @@ Return nil." | |||
| 2150 | ((zerop delta)) | 2145 | ((zerop delta)) |
| 2151 | ((window-size-fixed-p nil horizontal) | 2146 | ((window-size-fixed-p nil horizontal) |
| 2152 | (error "Selected window has fixed size")) | 2147 | (error "Selected window has fixed size")) |
| 2153 | ((window-resizable-p nil (- delta) horizontal) | 2148 | ((window--resizable-p nil (- delta) horizontal) |
| 2154 | (window-resize nil (- delta) horizontal)) | 2149 | (window-resize nil (- delta) horizontal)) |
| 2155 | (t | 2150 | (t |
| 2156 | (window-resize | 2151 | (window-resize |
| @@ -2177,7 +2172,7 @@ WINDOW can be any window and defaults to the selected window." | |||
| 2177 | (window-resize window (- (window-min-delta window))) | 2172 | (window-resize window (- (window-min-delta window))) |
| 2178 | (window-resize window (- (window-min-delta window t)) t)) | 2173 | (window-resize window (- (window-min-delta window t)) t)) |
| 2179 | 2174 | ||
| 2180 | (defsubst frame-root-window-p (window) | 2175 | (defun frame-root-window-p (window) |
| 2181 | "Return non-nil if WINDOW is the root window of its frame." | 2176 | "Return non-nil if WINDOW is the root window of its frame." |
| 2182 | (eq window (frame-root-window window))) | 2177 | (eq window (frame-root-window window))) |
| 2183 | 2178 | ||
| @@ -2214,9 +2209,9 @@ is the frame's minibuffer window. | |||
| 2214 | If the root window is not split, ROOT is the root window itself. | 2209 | If the root window is not split, ROOT is the root window itself. |
| 2215 | Otherwise, ROOT is a list (DIR EDGES W1 W2 ...) where DIR is nil | 2210 | Otherwise, ROOT is a list (DIR EDGES W1 W2 ...) where DIR is nil |
| 2216 | for a horizontal split, and t for a vertical split. EDGES gives | 2211 | for a horizontal split, and t for a vertical split. EDGES gives |
| 2217 | the combined size and position of the subwindows in the split, | 2212 | the combined size and position of the child windows in the split, |
| 2218 | and the rest of the elements are the subwindows in the split. | 2213 | and the rest of the elements are the child windows in the split. |
| 2219 | Each of the subwindows may again be a window or a list | 2214 | Each of the child windows may again be a window or a list |
| 2220 | representing a window split, and so on. EDGES is a list \(LEFT | 2215 | representing a window split, and so on. EDGES is a list \(LEFT |
| 2221 | TOP RIGHT BOTTOM) as returned by `window-edges'." | 2216 | TOP RIGHT BOTTOM) as returned by `window-edges'." |
| 2222 | (setq frame (window-normalize-frame frame)) | 2217 | (setq frame (window-normalize-frame frame)) |
| @@ -2352,13 +2347,13 @@ frame." | |||
| 2352 | ;; frame. | 2347 | ;; frame. |
| 2353 | t)))) | 2348 | t)))) |
| 2354 | 2349 | ||
| 2355 | (defun window-or-subwindow-p (subwindow window) | 2350 | (defun window--in-subtree-p (window root) |
| 2356 | "Return t if SUBWINDOW is either WINDOW or a subwindow of WINDOW." | 2351 | "Return t if WINDOW is either ROOT or a member of ROOT's subtree." |
| 2357 | (or (eq subwindow window) | 2352 | (or (eq window root) |
| 2358 | (let ((parent (window-parent subwindow))) | 2353 | (let ((parent (window-parent window))) |
| 2359 | (catch 'done | 2354 | (catch 'done |
| 2360 | (while parent | 2355 | (while parent |
| 2361 | (if (eq parent window) | 2356 | (if (eq parent root) |
| 2362 | (throw 'done t) | 2357 | (throw 'done t) |
| 2363 | (setq parent (window-parent parent)))))))) | 2358 | (setq parent (window-parent parent)))))))) |
| 2364 | 2359 | ||
| @@ -2410,7 +2405,7 @@ non-side window, signal an error." | |||
| 2410 | (let* ((horizontal (window-left-child parent)) | 2405 | (let* ((horizontal (window-left-child parent)) |
| 2411 | (size (window-total-size window horizontal)) | 2406 | (size (window-total-size window horizontal)) |
| 2412 | (frame-selected | 2407 | (frame-selected |
| 2413 | (window-or-subwindow-p (frame-selected-window frame) window)) | 2408 | (window--in-subtree-p (frame-selected-window frame) window)) |
| 2414 | ;; Emacs 23 preferably gives WINDOW's space to its left | 2409 | ;; Emacs 23 preferably gives WINDOW's space to its left |
| 2415 | ;; sibling. | 2410 | ;; sibling. |
| 2416 | (sibling (or (window-left window) (window-right window)))) | 2411 | (sibling (or (window-left window) (window-right window)))) |
| @@ -2423,7 +2418,7 @@ non-side window, signal an error." | |||
| 2423 | (set-window-new-normal | 2418 | (set-window-new-normal |
| 2424 | sibling (+ (window-normal-size sibling horizontal) | 2419 | sibling (+ (window-normal-size sibling horizontal) |
| 2425 | (window-normal-size window horizontal)))) | 2420 | (window-normal-size window horizontal)))) |
| 2426 | ((window-resizable-p window (- size) horizontal nil nil nil t) | 2421 | ((window--resizable-p window (- size) horizontal nil nil nil t) |
| 2427 | ;; Can do without resizing fixed-size windows. | 2422 | ;; Can do without resizing fixed-size windows. |
| 2428 | (window--resize-siblings window (- size) horizontal)) | 2423 | (window--resize-siblings window (- size) horizontal)) |
| 2429 | (t | 2424 | (t |
| @@ -3050,7 +3045,7 @@ showing BUFFER-OR-NAME." | |||
| 3050 | (unrecord-window-buffer window buffer))))) | 3045 | (unrecord-window-buffer window buffer))))) |
| 3051 | 3046 | ||
| 3052 | ;;; Splitting windows. | 3047 | ;;; Splitting windows. |
| 3053 | (defsubst window-split-min-size (&optional horizontal) | 3048 | (defun window-split-min-size (&optional horizontal) |
| 3054 | "Return minimum height of any window when splitting windows. | 3049 | "Return minimum height of any window when splitting windows. |
| 3055 | Optional argument HORIZONTAL non-nil means return minimum width." | 3050 | Optional argument HORIZONTAL non-nil means return minimum width." |
| 3056 | (if horizontal | 3051 | (if horizontal |
| @@ -3126,8 +3121,8 @@ frame. The selected window is not changed by this function." | |||
| 3126 | ;; The `split-window' parameter specifies the function to call. | 3121 | ;; The `split-window' parameter specifies the function to call. |
| 3127 | ;; If that function is `ignore', do nothing. | 3122 | ;; If that function is `ignore', do nothing. |
| 3128 | (throw 'done (funcall function window size side))) | 3123 | (throw 'done (funcall function window size side))) |
| 3129 | ;; If WINDOW is a subwindow of an atomic window, split the root | 3124 | ;; If WINDOW is part of an atomic window, split the root window |
| 3130 | ;; window of that atomic window instead. | 3125 | ;; of that atomic window instead. |
| 3131 | ((and (window-parameter window 'window-atom) | 3126 | ((and (window-parameter window 'window-atom) |
| 3132 | (setq atom-root (window-atom-root window)) | 3127 | (setq atom-root (window-atom-root window)) |
| 3133 | (not (eq atom-root window))) | 3128 | (not (eq atom-root window))) |
| @@ -3249,7 +3244,7 @@ frame. The selected window is not changed by this function." | |||
| 3249 | ;; we won't be able to return space to those windows when we | 3244 | ;; we won't be able to return space to those windows when we |
| 3250 | ;; delete the one we create here. Hence we do not go up. | 3245 | ;; delete the one we create here. Hence we do not go up. |
| 3251 | (progn | 3246 | (progn |
| 3252 | (window--resize-subwindows parent (- new-size) horizontal) | 3247 | (window--resize-child-windows parent (- new-size) horizontal) |
| 3253 | (let* ((normal (- 1.0 new-normal)) | 3248 | (let* ((normal (- 1.0 new-normal)) |
| 3254 | (sub (window-child parent))) | 3249 | (sub (window-child parent))) |
| 3255 | (while sub | 3250 | (while sub |
| @@ -3365,8 +3360,8 @@ right, if any." | |||
| 3365 | ;;; Balancing windows. | 3360 | ;;; Balancing windows. |
| 3366 | 3361 | ||
| 3367 | ;; The following routine uses the recycled code from an old version of | 3362 | ;; The following routine uses the recycled code from an old version of |
| 3368 | ;; `window--resize-subwindows'. It's not very pretty, but coding it the way the | 3363 | ;; `window--resize-child-windows'. It's not very pretty, but coding it the way the |
| 3369 | ;; new `window--resize-subwindows' code does would hardly make it any shorter or | 3364 | ;; new `window--resize-child-windows' code does would hardly make it any shorter or |
| 3370 | ;; more readable (FWIW we'd need three loops - one to calculate the | 3365 | ;; more readable (FWIW we'd need three loops - one to calculate the |
| 3371 | ;; minimum sizes per window, one to enlarge or shrink windows until the | 3366 | ;; minimum sizes per window, one to enlarge or shrink windows until the |
| 3372 | ;; new parent-size matches, and one where we shrink the largest/enlarge | 3367 | ;; new parent-size matches, and one where we shrink the largest/enlarge |
| @@ -3395,14 +3390,14 @@ is non-nil." | |||
| 3395 | (setq failed nil) | 3390 | (setq failed nil) |
| 3396 | (setq sub first) | 3391 | (setq sub first) |
| 3397 | (while (and sub (not failed)) | 3392 | (while (and sub (not failed)) |
| 3398 | ;; Ignore subwindows that should be ignored or are stuck. | 3393 | ;; Ignore child windows that should be ignored or are stuck. |
| 3399 | (unless (window--resize-subwindows-skip-p sub) | 3394 | (unless (window--resize-child-windows-skip-p sub) |
| 3400 | (setq found t) | 3395 | (setq found t) |
| 3401 | (setq sub-total (window-total-size sub horizontal)) | 3396 | (setq sub-total (window-total-size sub horizontal)) |
| 3402 | (setq sub-delta (- size sub-total)) | 3397 | (setq sub-delta (- size sub-total)) |
| 3403 | (setq sub-amount | 3398 | (setq sub-amount |
| 3404 | (window-sizable sub sub-delta horizontal)) | 3399 | (window-sizable sub sub-delta horizontal)) |
| 3405 | ;; Register the new total size for this subwindow. | 3400 | ;; Register the new total size for this child window. |
| 3406 | (set-window-new-total sub (+ sub-total sub-amount)) | 3401 | (set-window-new-total sub (+ sub-total sub-amount)) |
| 3407 | (unless (= sub-amount sub-delta) | 3402 | (unless (= sub-amount sub-delta) |
| 3408 | (setq total-sum (- total-sum sub-total sub-amount)) | 3403 | (setq total-sum (- total-sum sub-total sub-amount)) |
| @@ -3417,7 +3412,7 @@ is non-nil." | |||
| 3417 | ;; (column) until `rest' is zero. | 3412 | ;; (column) until `rest' is zero. |
| 3418 | (setq sub first) | 3413 | (setq sub first) |
| 3419 | (while (and sub (> rest 0)) | 3414 | (while (and sub (> rest 0)) |
| 3420 | (unless (window--resize-subwindows-skip-p window) | 3415 | (unless (window--resize-child-windows-skip-p window) |
| 3421 | (set-window-new-total sub 1 t) | 3416 | (set-window-new-total sub 1 t) |
| 3422 | (setq rest (1- rest))) | 3417 | (setq rest (1- rest))) |
| 3423 | (setq sub (window-right sub))) | 3418 | (setq sub (window-right sub))) |
| @@ -3439,7 +3434,7 @@ is non-nil." | |||
| 3439 | (window-total-size sub horizontal) | 3434 | (window-total-size sub horizontal) |
| 3440 | (window-new-total sub)) | 3435 | (window-new-total sub)) |
| 3441 | (float parent-size))) | 3436 | (float parent-size))) |
| 3442 | ;; Recursively balance each subwindow's subwindows. | 3437 | ;; Recursively balance each window's child windows. |
| 3443 | (balance-windows-1 sub horizontal) | 3438 | (balance-windows-1 sub horizontal) |
| 3444 | (setq sub (window-right sub))))) | 3439 | (setq sub (window-right sub))))) |
| 3445 | 3440 | ||
| @@ -3456,11 +3451,11 @@ is non-nil." | |||
| 3456 | (setq sub (window-right sub)))))))) | 3451 | (setq sub (window-right sub)))))))) |
| 3457 | 3452 | ||
| 3458 | (defun balance-windows (&optional window-or-frame) | 3453 | (defun balance-windows (&optional window-or-frame) |
| 3459 | "Balance the sizes of subwindows of WINDOW-OR-FRAME. | 3454 | "Balance the sizes of windows of WINDOW-OR-FRAME. |
| 3460 | WINDOW-OR-FRAME is optional and defaults to the selected frame. | 3455 | WINDOW-OR-FRAME is optional and defaults to the selected frame. |
| 3461 | If WINDOW-OR-FRAME denotes a frame, balance the sizes of all | 3456 | If WINDOW-OR-FRAME denotes a frame, balance the sizes of all |
| 3462 | subwindows of that frame's root window. If WINDOW-OR-FRAME | 3457 | windows of that frame. If WINDOW-OR-FRAME denots a window, |
| 3463 | denots a window, balance the sizes of all subwindows of that | 3458 | recursively balance the sizes of all child windows of that |
| 3464 | window." | 3459 | window." |
| 3465 | (interactive) | 3460 | (interactive) |
| 3466 | (let* ((window | 3461 | (let* ((window |
| @@ -3593,10 +3588,6 @@ specific buffers." | |||
| 3593 | )) | 3588 | )) |
| 3594 | 3589 | ||
| 3595 | ;;; Window states, how to get them and how to put them in a window. | 3590 | ;;; Window states, how to get them and how to put them in a window. |
| 3596 | (defsubst window-list-no-nils (&rest args) | ||
| 3597 | "Like LIST but do not add nil elements of ARGS." | ||
| 3598 | (delq nil (apply 'list args))) | ||
| 3599 | |||
| 3600 | (defvar window-state-ignored-parameters '(quit-restore) | 3591 | (defvar window-state-ignored-parameters '(quit-restore) |
| 3601 | "List of window parameters ignored by `window-state-get'.") | 3592 | "List of window parameters ignored by `window-state-get'.") |
| 3602 | 3593 | ||
| @@ -3610,46 +3601,47 @@ specific buffers." | |||
| 3610 | (buffer (window-buffer window)) | 3601 | (buffer (window-buffer window)) |
| 3611 | (selected (eq window (selected-window))) | 3602 | (selected (eq window (selected-window))) |
| 3612 | (head | 3603 | (head |
| 3613 | (window-list-no-nils | 3604 | `(,type |
| 3614 | type | 3605 | ,@(unless (window-next-sibling window) `((last . t))) |
| 3615 | (unless (window-next-sibling window) (cons 'last t)) | 3606 | (total-height . ,(window-total-size window)) |
| 3616 | (cons 'total-height (window-total-size window)) | 3607 | (total-width . ,(window-total-size window t)) |
| 3617 | (cons 'total-width (window-total-size window t)) | 3608 | (normal-height . ,(window-normal-size window)) |
| 3618 | (cons 'normal-height (window-normal-size window)) | 3609 | (normal-width . ,(window-normal-size window t)) |
| 3619 | (cons 'normal-width (window-normal-size window t)) | 3610 | (splits . ,(window-splits window)) |
| 3620 | (cons 'splits (window-splits window)) | 3611 | (nest . ,(window-nest window)) |
| 3621 | (cons 'nest (window-nest window)) | 3612 | ,@(let (list) |
| 3622 | (let (list) | 3613 | (dolist (parameter (window-parameters window)) |
| 3623 | (dolist (parameter (window-parameters window)) | 3614 | (unless (memq (car parameter) |
| 3624 | (unless (memq (car parameter) | 3615 | window-state-ignored-parameters) |
| 3625 | window-state-ignored-parameters) | 3616 | (setq list (cons parameter list)))) |
| 3626 | (setq list (cons parameter list)))) | 3617 | (unless (window-parameter window 'clone-of) |
| 3627 | (unless (window-parameter window 'clone-of) | 3618 | ;; Make a clone-of parameter. |
| 3628 | ;; Make a clone-of parameter. | 3619 | (setq list (cons (cons 'clone-of window) list))) |
| 3629 | (setq list (cons (cons 'clone-of window) list))) | 3620 | (when list |
| 3630 | (when list | 3621 | `((parameters . ,list)))) |
| 3631 | (cons 'parameters list))) | 3622 | ,@(when buffer |
| 3632 | (when buffer | 3623 | ;; All buffer related things go in here - make the buffer |
| 3633 | ;; All buffer related things go in here - make the buffer | 3624 | ;; current when retrieving `point' and `mark'. |
| 3634 | ;; current when retrieving `point' and `mark'. | 3625 | (with-current-buffer (window-buffer window) |
| 3635 | (with-current-buffer (window-buffer window) | 3626 | (let ((point (window-point-1 window)) |
| 3636 | (let ((point (window-point-1 window)) | 3627 | (start (window-start window)) |
| 3637 | (start (window-start window)) | 3628 | (mark (mark))) |
| 3638 | (mark (mark))) | 3629 | `((buffer |
| 3639 | (window-list-no-nils | 3630 | ,(buffer-name buffer) |
| 3640 | 'buffer (buffer-name buffer) | 3631 | (selected . ,selected) |
| 3641 | (cons 'selected selected) | 3632 | ,@(when window-size-fixed |
| 3642 | (when window-size-fixed (cons 'size-fixed window-size-fixed)) | 3633 | `((size-fixed . ,window-size-fixed))) |
| 3643 | (cons 'hscroll (window-hscroll window)) | 3634 | (hscroll . ,(window-hscroll window)) |
| 3644 | (cons 'fringes (window-fringes window)) | 3635 | (fringes . ,(window-fringes window)) |
| 3645 | (cons 'margins (window-margins window)) | 3636 | (margins . ,(window-margins window)) |
| 3646 | (cons 'scroll-bars (window-scroll-bars window)) | 3637 | (scroll-bars . ,(window-scroll-bars window)) |
| 3647 | (cons 'vscroll (window-vscroll window)) | 3638 | (vscroll . ,(window-vscroll window)) |
| 3648 | (cons 'dedicated (window-dedicated-p window)) | 3639 | (dedicated . ,(window-dedicated-p window)) |
| 3649 | (cons 'point (if markers (copy-marker point) point)) | 3640 | (point . ,(if markers (copy-marker point) point)) |
| 3650 | (cons 'start (if markers (copy-marker start) start)) | 3641 | (start . ,(if markers (copy-marker start) start)) |
| 3651 | (when mark | 3642 | ,@(when mark |
| 3652 | (cons 'mark (if markers (copy-marker mark) mark))))))))) | 3643 | `((mark . ,(if markers |
| 3644 | (copy-marker mark) mark))))))))))) | ||
| 3653 | (tail | 3645 | (tail |
| 3654 | (when (memq type '(vc hc)) | 3646 | (when (memq type '(vc hc)) |
| 3655 | (let (list) | 3647 | (let (list) |
| @@ -3680,21 +3672,20 @@ value can be also stored on disk and read back in a new session." | |||
| 3680 | (error "%s is not a live or internal window" window)) | 3672 | (error "%s is not a live or internal window" window)) |
| 3681 | (frame-root-window))) | 3673 | (frame-root-window))) |
| 3682 | ;; The return value is a cons whose car specifies some constraints on | 3674 | ;; The return value is a cons whose car specifies some constraints on |
| 3683 | ;; the size of WINDOW. The cdr lists the states of the subwindows of | 3675 | ;; the size of WINDOW. The cdr lists the states of the child windows |
| 3684 | ;; WINDOW. | 3676 | ;; of WINDOW. |
| 3685 | (cons | 3677 | (cons |
| 3686 | ;; Frame related things would go into a function, say `frame-state', | 3678 | ;; Frame related things would go into a function, say `frame-state', |
| 3687 | ;; calling `window-state-get' to insert the frame's root window. | 3679 | ;; calling `window-state-get' to insert the frame's root window. |
| 3688 | (window-list-no-nils | 3680 | `((min-height . ,(window-min-size window)) |
| 3689 | (cons 'min-height (window-min-size window)) | 3681 | (min-width . ,(window-min-size window t)) |
| 3690 | (cons 'min-width (window-min-size window t)) | 3682 | (min-height-ignore . ,(window-min-size window nil t)) |
| 3691 | (cons 'min-height-ignore (window-min-size window nil t)) | 3683 | (min-width-ignore . ,(window-min-size window t t)) |
| 3692 | (cons 'min-width-ignore (window-min-size window t t)) | 3684 | (min-height-safe . ,(window-min-size window nil 'safe)) |
| 3693 | (cons 'min-height-safe (window-min-size window nil 'safe)) | 3685 | (min-width-safe . ,(window-min-size window t 'safe)) |
| 3694 | (cons 'min-width-safe (window-min-size window t 'safe)) | 3686 | ;; These are probably not needed. |
| 3695 | ;; These are probably not needed. | 3687 | ,@(when (window-size-fixed-p window) `((fixed-height . t))) |
| 3696 | (when (window-size-fixed-p window) (cons 'fixed-height t)) | 3688 | ,@(when (window-size-fixed-p window t) `((fixed-width . t)))) |
| 3697 | (when (window-size-fixed-p window t) (cons 'fixed-width t))) | ||
| 3698 | (window-state-get-1 window markers))) | 3689 | (window-state-get-1 window markers))) |
| 3699 | 3690 | ||
| 3700 | (defvar window-state-put-list nil | 3691 | (defvar window-state-put-list nil |
| @@ -3798,13 +3789,13 @@ value can be also stored on disk and read back in a new session." | |||
| 3798 | (let ((delta (- (cdr (assq 'total-height item)) | 3789 | (let ((delta (- (cdr (assq 'total-height item)) |
| 3799 | (window-total-height window))) | 3790 | (window-total-height window))) |
| 3800 | window-size-fixed) | 3791 | window-size-fixed) |
| 3801 | (when (window-resizable-p window delta) | 3792 | (when (window--resizable-p window delta) |
| 3802 | (window-resize window delta))) | 3793 | (window-resize window delta))) |
| 3803 | ;; Else check whether the window is not high enough. | 3794 | ;; Else check whether the window is not high enough. |
| 3804 | (let* ((min-size (window-min-size window nil ignore)) | 3795 | (let* ((min-size (window-min-size window nil ignore)) |
| 3805 | (delta (- min-size (window-total-size window)))) | 3796 | (delta (- min-size (window-total-size window)))) |
| 3806 | (when (and (> delta 0) | 3797 | (when (and (> delta 0) |
| 3807 | (window-resizable-p window delta nil ignore)) | 3798 | (window--resizable-p window delta nil ignore)) |
| 3808 | (window-resize window delta nil ignore)))) | 3799 | (window-resize window delta nil ignore)))) |
| 3809 | ;; Adjust horizontally. | 3800 | ;; Adjust horizontally. |
| 3810 | (if (memq window-size-fixed '(t width)) | 3801 | (if (memq window-size-fixed '(t width)) |
| @@ -3812,13 +3803,13 @@ value can be also stored on disk and read back in a new session." | |||
| 3812 | (let ((delta (- (cdr (assq 'total-width item)) | 3803 | (let ((delta (- (cdr (assq 'total-width item)) |
| 3813 | (window-total-width window))) | 3804 | (window-total-width window))) |
| 3814 | window-size-fixed) | 3805 | window-size-fixed) |
| 3815 | (when (window-resizable-p window delta) | 3806 | (when (window--resizable-p window delta) |
| 3816 | (window-resize window delta))) | 3807 | (window-resize window delta))) |
| 3817 | ;; Else check whether the window is not wide enough. | 3808 | ;; Else check whether the window is not wide enough. |
| 3818 | (let* ((min-size (window-min-size window t ignore)) | 3809 | (let* ((min-size (window-min-size window t ignore)) |
| 3819 | (delta (- min-size (window-total-size window t)))) | 3810 | (delta (- min-size (window-total-size window t)))) |
| 3820 | (when (and (> delta 0) | 3811 | (when (and (> delta 0) |
| 3821 | (window-resizable-p window delta t ignore)) | 3812 | (window--resizable-p window delta t ignore)) |
| 3822 | (window-resize window delta t ignore)))) | 3813 | (window-resize window delta t ignore)))) |
| 3823 | ;; Set dedicated status. | 3814 | ;; Set dedicated status. |
| 3824 | (set-window-dedicated-p window (cdr (assq 'dedicated state))) | 3815 | (set-window-dedicated-p window (cdr (assq 'dedicated state))) |
| @@ -3843,7 +3834,7 @@ specify a live window and defaults to the selected one. | |||
| 3843 | 3834 | ||
| 3844 | Optional argument IGNORE non-nil means ignore minimum window | 3835 | Optional argument IGNORE non-nil means ignore minimum window |
| 3845 | sizes and fixed size restrictions. IGNORE equal `safe' means | 3836 | sizes and fixed size restrictions. IGNORE equal `safe' means |
| 3846 | subwindows can get as small as `window-safe-min-height' and | 3837 | windows can get as small as `window-safe-min-height' and |
| 3847 | `window-safe-min-width'." | 3838 | `window-safe-min-width'." |
| 3848 | (setq window (window-normalize-window window t)) | 3839 | (setq window (window-normalize-window window t)) |
| 3849 | (let* ((frame (window-frame window)) | 3840 | (let* ((frame (window-frame window)) |
| @@ -3948,8 +3939,9 @@ means that the currently selected window is not acceptable. It | |||
| 3948 | should choose or create a window, display the specified buffer in | 3939 | should choose or create a window, display the specified buffer in |
| 3949 | it, and return the window. | 3940 | it, and return the window. |
| 3950 | 3941 | ||
| 3951 | The function specified here is responsible for setting the | 3942 | The specified function should call `display-buffer-record-window' |
| 3952 | quit-restore and help-setup parameters of the window used." | 3943 | with corresponding arguments to set up the quit-restore parameter |
| 3944 | of the window used." | ||
| 3953 | :type '(choice | 3945 | :type '(choice |
| 3954 | (const nil) | 3946 | (const nil) |
| 3955 | (function :tag "function")) | 3947 | (function :tag "function")) |
| @@ -4202,6 +4194,7 @@ and (cdr ARGS) as second." | |||
| 4202 | (make-frame (append args special-display-frame-alist)))) | 4194 | (make-frame (append args special-display-frame-alist)))) |
| 4203 | (window (frame-selected-window frame))) | 4195 | (window (frame-selected-window frame))) |
| 4204 | (display-buffer-record-window 'frame window buffer) | 4196 | (display-buffer-record-window 'frame window buffer) |
| 4197 | ;; FIXME: Use window--display-buffer-2? | ||
| 4205 | (set-window-buffer window buffer) | 4198 | (set-window-buffer window buffer) |
| 4206 | ;; Reset list of WINDOW's previous buffers to nil. | 4199 | ;; Reset list of WINDOW's previous buffers to nil. |
| 4207 | (set-window-prev-buffers window nil) | 4200 | (set-window-prev-buffers window nil) |
| @@ -4221,8 +4214,9 @@ A buffer is special when its name is either listed in | |||
| 4221 | `special-display-buffer-names' or matches a regexp in | 4214 | `special-display-buffer-names' or matches a regexp in |
| 4222 | `special-display-regexps'. | 4215 | `special-display-regexps'. |
| 4223 | 4216 | ||
| 4224 | The function specified here is responsible for setting the | 4217 | The specified function should call `display-buffer-record-window' |
| 4225 | quit-restore and help-setup parameters of the window used." | 4218 | with corresponding arguments to set up the quit-restore parameter |
| 4219 | of the window used." | ||
| 4226 | :type 'function | 4220 | :type 'function |
| 4227 | :group 'frames) | 4221 | :group 'frames) |
| 4228 | 4222 | ||
| @@ -4622,9 +4616,8 @@ See `display-buffer' for details." | |||
| 4622 | :group 'windows) | 4616 | :group 'windows) |
| 4623 | 4617 | ||
| 4624 | (defconst display-buffer-fallback-action | 4618 | (defconst display-buffer-fallback-action |
| 4625 | '((display-buffer--maybe-same-window | 4619 | '((display-buffer--maybe-same-window ;FIXME: why isn't this redundant? |
| 4626 | display-buffer-reuse-window | 4620 | display-buffer-reuse-window |
| 4627 | display-buffer--special | ||
| 4628 | display-buffer--maybe-pop-up-frame-or-window | 4621 | display-buffer--maybe-pop-up-frame-or-window |
| 4629 | display-buffer-use-some-window | 4622 | display-buffer-use-some-window |
| 4630 | ;; If all else fails, pop up a new frame. | 4623 | ;; If all else fails, pop up a new frame. |
| @@ -4655,7 +4648,6 @@ specified, e.g. by the user options `display-buffer-alist' or | |||
| 4655 | 4648 | ||
| 4656 | (defvar display-buffer--other-frame-action | 4649 | (defvar display-buffer--other-frame-action |
| 4657 | '((display-buffer-reuse-window | 4650 | '((display-buffer-reuse-window |
| 4658 | display-buffer--special | ||
| 4659 | display-buffer-pop-up-frame) | 4651 | display-buffer-pop-up-frame) |
| 4660 | (reusable-frames . 0) | 4652 | (reusable-frames . 0) |
| 4661 | (inhibit-same-window . t)) | 4653 | (inhibit-same-window . t)) |
| @@ -4721,6 +4713,7 @@ search for a window that is already displaying the buffer. See | |||
| 4721 | (let* ((user-action | 4713 | (let* ((user-action |
| 4722 | (display-buffer-assq-regexp (buffer-name buffer) | 4714 | (display-buffer-assq-regexp (buffer-name buffer) |
| 4723 | display-buffer-alist)) | 4715 | display-buffer-alist)) |
| 4716 | (special-action (display-buffer--special-action buffer)) | ||
| 4724 | ;; Extra actions from the arguments to this function: | 4717 | ;; Extra actions from the arguments to this function: |
| 4725 | (extra-action | 4718 | (extra-action |
| 4726 | (cons nil (append (if inhibit-same-window | 4719 | (cons nil (append (if inhibit-same-window |
| @@ -4729,7 +4722,7 @@ search for a window that is already displaying the buffer. See | |||
| 4729 | `((reusable-frames . ,frame)))))) | 4722 | `((reusable-frames . ,frame)))))) |
| 4730 | ;; Construct action function list and action alist. | 4723 | ;; Construct action function list and action alist. |
| 4731 | (actions (list display-buffer-overriding-action | 4724 | (actions (list display-buffer-overriding-action |
| 4732 | user-action action extra-action | 4725 | user-action special-action action extra-action |
| 4733 | display-buffer-base-action | 4726 | display-buffer-base-action |
| 4734 | display-buffer-fallback-action)) | 4727 | display-buffer-fallback-action)) |
| 4735 | (functions (apply 'append | 4728 | (functions (apply 'append |
| @@ -4812,7 +4805,7 @@ terminal if either of those variables is non-nil." | |||
| 4812 | (display-buffer-record-window 'reuse window buffer) | 4805 | (display-buffer-record-window 'reuse window buffer) |
| 4813 | (window--display-buffer-1 window)))) | 4806 | (window--display-buffer-1 window)))) |
| 4814 | 4807 | ||
| 4815 | (defun display-buffer--special (buffer alist) | 4808 | (defun display-buffer--special-action (buffer) |
| 4816 | "Try to display BUFFER using `special-display-function'. | 4809 | "Try to display BUFFER using `special-display-function'. |
| 4817 | Call `special-display-p' on BUFFER's name, and if that returns | 4810 | Call `special-display-p' on BUFFER's name, and if that returns |
| 4818 | non-nil, call `special-display-function' on BUFFER." | 4811 | non-nil, call `special-display-function' on BUFFER." |
| @@ -4821,8 +4814,10 @@ non-nil, call `special-display-function' on BUFFER." | |||
| 4821 | ;; parameters to pass to `special-display-function'. | 4814 | ;; parameters to pass to `special-display-function'. |
| 4822 | (let ((pars (special-display-p (buffer-name buffer)))) | 4815 | (let ((pars (special-display-p (buffer-name buffer)))) |
| 4823 | (when pars | 4816 | (when pars |
| 4824 | (funcall special-display-function | 4817 | (list (list #'display-buffer-reuse-window |
| 4825 | buffer (if (listp pars) pars)))))) | 4818 | `(lambda (buffer _alist) |
| 4819 | (funcall special-display-function | ||
| 4820 | buffer ',(if (listp pars) pars))))))))) | ||
| 4826 | 4821 | ||
| 4827 | (defun display-buffer-pop-up-frame (buffer alist) | 4822 | (defun display-buffer-pop-up-frame (buffer alist) |
| 4828 | "Display BUFFER in a new frame. | 4823 | "Display BUFFER in a new frame. |
| @@ -4970,8 +4965,7 @@ the buffer. | |||
| 4970 | NORECORD, if non-nil means do not put this buffer at the front of | 4965 | NORECORD, if non-nil means do not put this buffer at the front of |
| 4971 | the list of recently selected ones." | 4966 | the list of recently selected ones." |
| 4972 | (pop-to-buffer buffer | 4967 | (pop-to-buffer buffer |
| 4973 | '((display-buffer--special | 4968 | '(display-buffer-same-window |
| 4974 | display-buffer-same-window) | ||
| 4975 | (inhibit-same-window . nil)) | 4969 | (inhibit-same-window . nil)) |
| 4976 | norecord)) | 4970 | norecord)) |
| 4977 | 4971 | ||
| @@ -5435,8 +5429,8 @@ by `recenter-positions'." | |||
| 5435 | 5429 | ||
| 5436 | ;;; Scrolling commands. | 5430 | ;;; Scrolling commands. |
| 5437 | 5431 | ||
| 5438 | ;;; Scrolling commands which does not signal errors at top/bottom | 5432 | ;;; Scrolling commands which do not signal errors at top/bottom |
| 5439 | ;;; of buffer at first key-press (instead moves to top/bottom | 5433 | ;;; of buffer at first key-press (instead move to top/bottom |
| 5440 | ;;; of buffer). | 5434 | ;;; of buffer). |
| 5441 | 5435 | ||
| 5442 | (defcustom scroll-error-top-bottom nil | 5436 | (defcustom scroll-error-top-bottom nil |
diff --git a/lisp/woman.el b/lisp/woman.el index 7b530d1004f..078acfc0362 100644 --- a/lisp/woman.el +++ b/lisp/woman.el | |||
| @@ -1440,7 +1440,7 @@ The cdr of each alist element is the path-index / filename." | |||
| 1440 | files)) | 1440 | files)) |
| 1441 | (setq path-index (1+ path-index))) | 1441 | (setq path-index (1+ path-index))) |
| 1442 | ;; Uniquefy topics: | 1442 | ;; Uniquefy topics: |
| 1443 | ;; Concate all lists with a single nconc call to | 1443 | ;; Concatenate all lists with a single nconc call to |
| 1444 | ;; avoid retraversing the first lists repeatedly -- dak | 1444 | ;; avoid retraversing the first lists repeatedly -- dak |
| 1445 | (woman-topic-all-completions-merge | 1445 | (woman-topic-all-completions-merge |
| 1446 | (apply #'nconc files)))) | 1446 | (apply #'nconc files)))) |
diff --git a/src/ChangeLog b/src/ChangeLog index b09dae946f4..42dede8e300 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -3,6 +3,74 @@ | |||
| 3 | * xdisp.c (fill_composite_glyph_string): Always set s->face, to | 3 | * xdisp.c (fill_composite_glyph_string): Always set s->face, to |
| 4 | avoid a crash (bug#9496). | 4 | avoid a crash (bug#9496). |
| 5 | 5 | ||
| 6 | 2011-11-09 Chong Yidong <cyd@gnu.org> | ||
| 7 | |||
| 8 | * window.c (Fwindow_inside_edges, Fwindow_inside_pixel_edges) | ||
| 9 | (Fwindow_inside_absolute_pixel_edges): Only allow live windows. | ||
| 10 | |||
| 11 | 2011-11-08 Paul Eggert <eggert@cs.ucla.edu> | ||
| 12 | |||
| 13 | * s/gnu.h (GC_MARK_STACK): Define to GC_MAKE_GCPROS_NOOPS (Bug#9926). | ||
| 14 | |||
| 15 | 2011-11-08 Paul Eggert <eggert@cs.ucla.edu> | ||
| 16 | |||
| 17 | Avoid some portability problems by eschewing 'extern inline' functions. | ||
| 18 | The trivial performance wins aren't worth the portability hassles; see | ||
| 19 | <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html> | ||
| 20 | et seq. | ||
| 21 | * dispextern.h (window_box, window_box_height, window_text_bottom_y) | ||
| 22 | (window_box_width, window_box_left, window_box_left_offset) | ||
| 23 | (window_box_right, window_box_right_offset): Undo previous change, | ||
| 24 | by removing the "extern"s. | ||
| 25 | * intervals.c (adjust_intervals_for_insertion) | ||
| 26 | (adjust_intervals_for_deletion): Undo previous change, | ||
| 27 | making these static again. | ||
| 28 | (offset_intervals, temp_set_point_both, temp_set_point) | ||
| 29 | (copy_intervals_to_string): No longer inline. | ||
| 30 | * xdisp.c (window_text_bottom_y, window_box_width) | ||
| 31 | (window_box_height, window_box_left_offset) | ||
| 32 | (window_box_right_offset, window_box_left, window_box_right) | ||
| 33 | (window_box): No longer inline. | ||
| 34 | |||
| 35 | 2011-11-08 Chong Yidong <cyd@gnu.org> | ||
| 36 | |||
| 37 | * window.c (Fwindow_left_column, Fwindow_top_line): Doc fix. | ||
| 38 | (Fwindow_body_height, Fwindow_body_width): Move from Lisp. Signal | ||
| 39 | an error if not a live window. | ||
| 40 | (Fwindow_total_width, Fwindow_total_height): Move from Lisp. | ||
| 41 | (Fwindow_total_size, Fwindow_body_size): Move to Lisp. | ||
| 42 | |||
| 43 | 2011-11-07 Juanma Barranquero <lekktu@gmail.com> | ||
| 44 | |||
| 45 | * lisp.h (syms_of_abbrev): Remove declaration. | ||
| 46 | Reported by CHENG Gao <chenggao@royau.me>. | ||
| 47 | |||
| 48 | 2011-11-07 Eli Zaretskii <eliz@gnu.org> | ||
| 49 | |||
| 50 | * w32.c (check_windows_init_file): Don't look for term/w32-win.el | ||
| 51 | if Vpurify_flag is non-nil. Fixes a crash when running w32 build | ||
| 52 | of temacs in GUI mode. | ||
| 53 | |||
| 54 | 2011-11-07 Martin Rudalics <rudalics@gmx.at> | ||
| 55 | |||
| 56 | * window.h: Declare delete_all_child_windows instead of | ||
| 57 | delete_all_subwindows. | ||
| 58 | * window.c (Fwindow_nest, Fset_window_nest) | ||
| 59 | (Fset_window_new_total, Fset_window_new_normal) | ||
| 60 | (Fwindow_resize_apply): Don't use term subwindow in doc-strings. | ||
| 61 | (delete_all_subwindows): Rename to delete_all_child_windows. | ||
| 62 | (Fdelete_other_windows_internal, Fset_window_configuration): | ||
| 63 | Call delete_all_child_windows instead of delete_all_subwindows. | ||
| 64 | * frame.c (delete_frame): Call delete_all_child_windows instead | ||
| 65 | of delete_all_subwindows. | ||
| 66 | |||
| 67 | 2011-11-07 Paul Eggert <eggert@cs.ucla.edu> | ||
| 68 | |||
| 69 | * alloc.c (DEADP): New macro, for porting to GNU/Hurd (Bug#9926). | ||
| 70 | This is also needed for porting to any host where GC_MARK_STACK is | ||
| 71 | not GC_MAKE_GCPROS_NOOPS. | ||
| 72 | (which_symbols): Use it. | ||
| 73 | |||
| 6 | 2011-11-07 Kenichi Handa <handa@m17n.org> | 74 | 2011-11-07 Kenichi Handa <handa@m17n.org> |
| 7 | 75 | ||
| 8 | * coding.c (coding_set_destination): Check coding->src_pos only | 76 | * coding.c (coding_set_destination): Check coding->src_pos only |
diff --git a/src/alloc.c b/src/alloc.c index 210dd7d1687..985e4b71426 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -315,6 +315,7 @@ static POINTER_TYPE *lisp_malloc (size_t, enum mem_type); | |||
| 315 | on free lists recognizable in O(1). */ | 315 | on free lists recognizable in O(1). */ |
| 316 | 316 | ||
| 317 | static Lisp_Object Vdead; | 317 | static Lisp_Object Vdead; |
| 318 | #define DEADP(x) EQ (x, Vdead) | ||
| 318 | 319 | ||
| 319 | #ifdef GC_MALLOC_CHECK | 320 | #ifdef GC_MALLOC_CHECK |
| 320 | 321 | ||
| @@ -411,6 +412,10 @@ static void check_gcpros (void); | |||
| 411 | 412 | ||
| 412 | #endif /* GC_MARK_STACK || GC_MALLOC_CHECK */ | 413 | #endif /* GC_MARK_STACK || GC_MALLOC_CHECK */ |
| 413 | 414 | ||
| 415 | #ifndef DEADP | ||
| 416 | # define DEADP(x) 0 | ||
| 417 | #endif | ||
| 418 | |||
| 414 | /* Recording what needs to be marked for gc. */ | 419 | /* Recording what needs to be marked for gc. */ |
| 415 | 420 | ||
| 416 | struct gcpro *gcprolist; | 421 | struct gcpro *gcprolist; |
| @@ -6261,7 +6266,7 @@ which_symbols (Lisp_Object obj, EMACS_INT find_max) | |||
| 6261 | int gc_count = inhibit_garbage_collection (); | 6266 | int gc_count = inhibit_garbage_collection (); |
| 6262 | Lisp_Object found = Qnil; | 6267 | Lisp_Object found = Qnil; |
| 6263 | 6268 | ||
| 6264 | if (!EQ (obj, Vdead)) | 6269 | if (! DEADP (obj)) |
| 6265 | { | 6270 | { |
| 6266 | for (sblk = symbol_block; sblk; sblk = sblk->next) | 6271 | for (sblk = symbol_block; sblk; sblk = sblk->next) |
| 6267 | { | 6272 | { |
| @@ -429,7 +429,7 @@ static Lisp_Object Vccl_program_table; | |||
| 429 | 429 | ||
| 430 | #define CCL_Extension 0x1F /* Extended CCL code | 430 | #define CCL_Extension 0x1F /* Extended CCL code |
| 431 | 1:ExtendedCOMMNDRrrRRRrrrXXXXX | 431 | 1:ExtendedCOMMNDRrrRRRrrrXXXXX |
| 432 | 2:ARGUEMENT | 432 | 2:ARGUMENT |
| 433 | 3:... | 433 | 3:... |
| 434 | ------------------------------ | 434 | ------------------------------ |
| 435 | extended_command (rrr,RRR,Rrr,ARGS) | 435 | extended_command (rrr,RRR,Rrr,ARGS) |
diff --git a/src/dispextern.h b/src/dispextern.h index fdc7f2f908d..5c60a5499da 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -3006,14 +3006,14 @@ int resize_mini_window (struct window *, int); | |||
| 3006 | void set_vertical_scroll_bar (struct window *); | 3006 | void set_vertical_scroll_bar (struct window *); |
| 3007 | #endif | 3007 | #endif |
| 3008 | int try_window (Lisp_Object, struct text_pos, int); | 3008 | int try_window (Lisp_Object, struct text_pos, int); |
| 3009 | extern void window_box (struct window *, int, int *, int *, int *, int *); | 3009 | void window_box (struct window *, int, int *, int *, int *, int *); |
| 3010 | extern int window_box_height (struct window *); | 3010 | int window_box_height (struct window *); |
| 3011 | extern int window_text_bottom_y (struct window *); | 3011 | int window_text_bottom_y (struct window *); |
| 3012 | extern int window_box_width (struct window *, int); | 3012 | int window_box_width (struct window *, int); |
| 3013 | extern int window_box_left (struct window *, int); | 3013 | int window_box_left (struct window *, int); |
| 3014 | extern int window_box_left_offset (struct window *, int); | 3014 | int window_box_left_offset (struct window *, int); |
| 3015 | extern int window_box_right (struct window *, int); | 3015 | int window_box_right (struct window *, int); |
| 3016 | extern int window_box_right_offset (struct window *, int); | 3016 | int window_box_right_offset (struct window *, int); |
| 3017 | int estimate_mode_line_height (struct frame *, enum face_id); | 3017 | int estimate_mode_line_height (struct frame *, enum face_id); |
| 3018 | void pixel_to_glyph_coords (struct frame *, int, int, int *, int *, | 3018 | void pixel_to_glyph_coords (struct frame *, int, int, int *, int *, |
| 3019 | NativeRectangle *, int); | 3019 | NativeRectangle *, int); |
diff --git a/src/font.c b/src/font.c index 1a4742ba959..f6723157de1 100644 --- a/src/font.c +++ b/src/font.c | |||
| @@ -162,7 +162,7 @@ static struct font_driver_list *font_driver_list; | |||
| 162 | 162 | ||
| 163 | 163 | ||
| 164 | 164 | ||
| 165 | /* Creaters of font-related Lisp object. */ | 165 | /* Creators of font-related Lisp object. */ |
| 166 | 166 | ||
| 167 | static Lisp_Object | 167 | static Lisp_Object |
| 168 | font_make_spec (void) | 168 | font_make_spec (void) |
diff --git a/src/frame.c b/src/frame.c index 112f102a1f2..d56a2efb17f 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -1320,7 +1320,7 @@ delete_frame (Lisp_Object frame, Lisp_Object force) | |||
| 1320 | 1320 | ||
| 1321 | /* Mark all the windows that used to be on FRAME as deleted, and then | 1321 | /* Mark all the windows that used to be on FRAME as deleted, and then |
| 1322 | remove the reference to them. */ | 1322 | remove the reference to them. */ |
| 1323 | delete_all_subwindows (f->root_window); | 1323 | delete_all_child_windows (f->root_window); |
| 1324 | f->root_window = Qnil; | 1324 | f->root_window = Qnil; |
| 1325 | 1325 | ||
| 1326 | Vframe_list = Fdelq (frame, Vframe_list); | 1326 | Vframe_list = Fdelq (frame, Vframe_list); |
diff --git a/src/intervals.c b/src/intervals.c index be1bdfb9056..a78c7f07f6c 100644 --- a/src/intervals.c +++ b/src/intervals.c | |||
| @@ -52,11 +52,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 52 | 52 | ||
| 53 | #define TMEM(sym, set) (CONSP (set) ? ! NILP (Fmemq (sym, set)) : ! NILP (set)) | 53 | #define TMEM(sym, set) (CONSP (set) ? ! NILP (Fmemq (sym, set)) : ! NILP (set)) |
| 54 | 54 | ||
| 55 | extern INTERVAL adjust_intervals_for_insertion (INTERVAL, | ||
| 56 | EMACS_INT, EMACS_INT); | ||
| 57 | extern void adjust_intervals_for_deletion (struct buffer *, | ||
| 58 | EMACS_INT, EMACS_INT); | ||
| 59 | |||
| 60 | static Lisp_Object merge_properties_sticky (Lisp_Object, Lisp_Object); | 55 | static Lisp_Object merge_properties_sticky (Lisp_Object, Lisp_Object); |
| 61 | static INTERVAL merge_interval_right (INTERVAL); | 56 | static INTERVAL merge_interval_right (INTERVAL); |
| 62 | static INTERVAL reproduce_tree (INTERVAL, INTERVAL); | 57 | static INTERVAL reproduce_tree (INTERVAL, INTERVAL); |
| @@ -803,7 +798,7 @@ update_interval (register INTERVAL i, EMACS_INT pos) | |||
| 803 | and check the hungry bits of both. Then add the length going back up | 798 | and check the hungry bits of both. Then add the length going back up |
| 804 | to the root. */ | 799 | to the root. */ |
| 805 | 800 | ||
| 806 | INTERVAL | 801 | static INTERVAL |
| 807 | adjust_intervals_for_insertion (INTERVAL tree, EMACS_INT position, | 802 | adjust_intervals_for_insertion (INTERVAL tree, EMACS_INT position, |
| 808 | EMACS_INT length) | 803 | EMACS_INT length) |
| 809 | { | 804 | { |
| @@ -864,7 +859,7 @@ adjust_intervals_for_insertion (INTERVAL tree, EMACS_INT position, | |||
| 864 | interval. Another possibility would be to create a new interval for | 859 | interval. Another possibility would be to create a new interval for |
| 865 | this text, and make it have the merged properties of both ends. */ | 860 | this text, and make it have the merged properties of both ends. */ |
| 866 | 861 | ||
| 867 | INTERVAL | 862 | static INTERVAL |
| 868 | adjust_intervals_for_insertion (INTERVAL tree, | 863 | adjust_intervals_for_insertion (INTERVAL tree, |
| 869 | EMACS_INT position, EMACS_INT length) | 864 | EMACS_INT position, EMACS_INT length) |
| 870 | { | 865 | { |
| @@ -1374,7 +1369,7 @@ interval_deletion_adjustment (register INTERVAL tree, register EMACS_INT from, | |||
| 1374 | text. The deletion is effected at position START (which is a | 1369 | text. The deletion is effected at position START (which is a |
| 1375 | buffer position, i.e. origin 1). */ | 1370 | buffer position, i.e. origin 1). */ |
| 1376 | 1371 | ||
| 1377 | void | 1372 | static void |
| 1378 | adjust_intervals_for_deletion (struct buffer *buffer, | 1373 | adjust_intervals_for_deletion (struct buffer *buffer, |
| 1379 | EMACS_INT start, EMACS_INT length) | 1374 | EMACS_INT start, EMACS_INT length) |
| 1380 | { | 1375 | { |
| @@ -1430,7 +1425,7 @@ adjust_intervals_for_deletion (struct buffer *buffer, | |||
| 1430 | compiler that does not allow calling a static function (here, | 1425 | compiler that does not allow calling a static function (here, |
| 1431 | adjust_intervals_for_deletion) from a non-static inline function. */ | 1426 | adjust_intervals_for_deletion) from a non-static inline function. */ |
| 1432 | 1427 | ||
| 1433 | inline void | 1428 | void |
| 1434 | offset_intervals (struct buffer *buffer, EMACS_INT start, EMACS_INT length) | 1429 | offset_intervals (struct buffer *buffer, EMACS_INT start, EMACS_INT length) |
| 1435 | { | 1430 | { |
| 1436 | if (NULL_INTERVAL_P (BUF_INTERVALS (buffer)) || length == 0) | 1431 | if (NULL_INTERVAL_P (BUF_INTERVALS (buffer)) || length == 0) |
| @@ -1882,7 +1877,7 @@ lookup_char_property (Lisp_Object plist, register Lisp_Object prop, int textprop | |||
| 1882 | /* Set point in BUFFER "temporarily" to CHARPOS, which corresponds to | 1877 | /* Set point in BUFFER "temporarily" to CHARPOS, which corresponds to |
| 1883 | byte position BYTEPOS. */ | 1878 | byte position BYTEPOS. */ |
| 1884 | 1879 | ||
| 1885 | inline void | 1880 | void |
| 1886 | temp_set_point_both (struct buffer *buffer, | 1881 | temp_set_point_both (struct buffer *buffer, |
| 1887 | EMACS_INT charpos, EMACS_INT bytepos) | 1882 | EMACS_INT charpos, EMACS_INT bytepos) |
| 1888 | { | 1883 | { |
| @@ -1902,7 +1897,7 @@ temp_set_point_both (struct buffer *buffer, | |||
| 1902 | 1897 | ||
| 1903 | /* Set point "temporarily", without checking any text properties. */ | 1898 | /* Set point "temporarily", without checking any text properties. */ |
| 1904 | 1899 | ||
| 1905 | inline void | 1900 | void |
| 1906 | temp_set_point (struct buffer *buffer, EMACS_INT charpos) | 1901 | temp_set_point (struct buffer *buffer, EMACS_INT charpos) |
| 1907 | { | 1902 | { |
| 1908 | temp_set_point_both (buffer, charpos, | 1903 | temp_set_point_both (buffer, charpos, |
| @@ -2391,7 +2386,7 @@ copy_intervals (INTERVAL tree, EMACS_INT start, EMACS_INT length) | |||
| 2391 | 2386 | ||
| 2392 | /* Give STRING the properties of BUFFER from POSITION to LENGTH. */ | 2387 | /* Give STRING the properties of BUFFER from POSITION to LENGTH. */ |
| 2393 | 2388 | ||
| 2394 | inline void | 2389 | void |
| 2395 | copy_intervals_to_string (Lisp_Object string, struct buffer *buffer, | 2390 | copy_intervals_to_string (Lisp_Object string, struct buffer *buffer, |
| 2396 | EMACS_INT position, EMACS_INT length) | 2391 | EMACS_INT position, EMACS_INT length) |
| 2397 | { | 2392 | { |
diff --git a/src/lisp.h b/src/lisp.h index f3c704bc763..46448f7a1fb 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -3155,10 +3155,6 @@ extern void syms_of_fileio (void); | |||
| 3155 | extern Lisp_Object make_temp_name (Lisp_Object, int); | 3155 | extern Lisp_Object make_temp_name (Lisp_Object, int); |
| 3156 | extern Lisp_Object Qdelete_file; | 3156 | extern Lisp_Object Qdelete_file; |
| 3157 | 3157 | ||
| 3158 | /* Defined in abbrev.c */ | ||
| 3159 | |||
| 3160 | extern void syms_of_abbrev (void); | ||
| 3161 | |||
| 3162 | /* Defined in search.c */ | 3158 | /* Defined in search.c */ |
| 3163 | extern void shrink_regexp_cache (void); | 3159 | extern void shrink_regexp_cache (void); |
| 3164 | EXFUN (Fstring_match, 3); | 3160 | EXFUN (Fstring_match, 3); |
diff --git a/src/s/gnu.h b/src/s/gnu.h index c40f764f8bf..b40f7b0a95b 100644 --- a/src/s/gnu.h +++ b/src/s/gnu.h | |||
| @@ -44,3 +44,5 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 44 | #endif /* !_IO_STDIO_H */ | 44 | #endif /* !_IO_STDIO_H */ |
| 45 | #endif /* emacs */ | 45 | #endif /* emacs */ |
| 46 | 46 | ||
| 47 | /* Use the GC_MAKE_GCPROS_NOOPS (see lisp.h) method for marking the stack. */ | ||
| 48 | #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS | ||
| @@ -5784,7 +5784,10 @@ check_windows_init_file (void) | |||
| 5784 | it cannot find the Windows installation file. If this file does | 5784 | it cannot find the Windows installation file. If this file does |
| 5785 | not exist in the expected place, tell the user. */ | 5785 | not exist in the expected place, tell the user. */ |
| 5786 | 5786 | ||
| 5787 | if (!noninteractive && !inhibit_window_system) | 5787 | if (!noninteractive && !inhibit_window_system |
| 5788 | /* Vload_path is not yet initialized when we are loading | ||
| 5789 | loadup.el. */ | ||
| 5790 | && NILP (Vpurify_flag)) | ||
| 5788 | { | 5791 | { |
| 5789 | Lisp_Object objs[2]; | 5792 | Lisp_Object objs[2]; |
| 5790 | Lisp_Object full_load_path; | 5793 | Lisp_Object full_load_path; |
diff --git a/src/window.c b/src/window.c index 605d00b8e05..83a8974e88d 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -504,8 +504,8 @@ DEFUN ("window-nest", Fwindow_nest, Swindow_nest, 0, 1, 0, | |||
| 504 | doc: /* Return nest status of window WINDOW. | 504 | doc: /* Return nest status of window WINDOW. |
| 505 | If WINDOW is omitted or nil, it defaults to the selected window. | 505 | If WINDOW is omitted or nil, it defaults to the selected window. |
| 506 | 506 | ||
| 507 | If the return value is nil, subwindows of WINDOW can be recombined with | 507 | If the return value is nil, child windows of WINDOW can be recombined with |
| 508 | WINDOW's siblings. A return value of non-nil means that subwindows of | 508 | WINDOW's siblings. A return value of non-nil means that child windows of |
| 509 | WINDOW are never \(re-)combined with WINDOW's siblings. */) | 509 | WINDOW are never \(re-)combined with WINDOW's siblings. */) |
| 510 | (Lisp_Object window) | 510 | (Lisp_Object window) |
| 511 | { | 511 | { |
| @@ -516,8 +516,8 @@ DEFUN ("set-window-nest", Fset_window_nest, Sset_window_nest, 2, 2, 0, | |||
| 516 | doc: /* Set nest status of window WINDOW to STATUS; return STATUS. | 516 | doc: /* Set nest status of window WINDOW to STATUS; return STATUS. |
| 517 | If WINDOW is omitted or nil, it defaults to the selected window. | 517 | If WINDOW is omitted or nil, it defaults to the selected window. |
| 518 | 518 | ||
| 519 | If STATUS is nil, subwindows of WINDOW can be recombined with WINDOW's | 519 | If STATUS is nil, child windows of WINDOW can be recombined with WINDOW's |
| 520 | siblings. STATUS non-nil means that subwindows of WINDOW are never | 520 | siblings. STATUS non-nil means that child windows of WINDOW are never |
| 521 | \(re-)combined with WINDOW's siblings. */) | 521 | \(re-)combined with WINDOW's siblings. */) |
| 522 | (Lisp_Object window, Lisp_Object status) | 522 | (Lisp_Object window, Lisp_Object status) |
| 523 | { | 523 | { |
| @@ -539,27 +539,34 @@ selected one. */) | |||
| 539 | return decode_window (window)->use_time; | 539 | return decode_window (window)->use_time; |
| 540 | } | 540 | } |
| 541 | 541 | ||
| 542 | DEFUN ("window-total-size", Fwindow_total_size, Swindow_total_size, 0, 2, 0, | 542 | DEFUN ("window-total-height", Fwindow_total_height, Swindow_total_height, 0, 1, 0, |
| 543 | doc: /* Return the total number of lines of window WINDOW. | 543 | doc: /* Return the total height, in lines, of window WINDOW. |
| 544 | If WINDOW is omitted or nil, it defaults to the selected window. | 544 | If WINDOW is omitted or nil, it defaults to the selected window. |
| 545 | 545 | ||
| 546 | The return value includes WINDOW's mode line and header line, if any. | 546 | The return value includes the mode line and header line, if any. |
| 547 | If WINDOW is internal, the return value is the sum of the total number | 547 | If WINDOW is an internal window, the total height is the height |
| 548 | of lines of WINDOW's child windows if these are vertically combined | 548 | of the screen areas spanned by its children. |
| 549 | and the height of WINDOW's first child otherwise. | 549 | |
| 550 | 550 | On a graphical display, this total height is reported as an | |
| 551 | Optional argument HORIZONTAL non-nil means return the total number of | 551 | integer multiple of the default character height. */) |
| 552 | columns of WINDOW. In this case the return value includes any vertical | 552 | (Lisp_Object window) |
| 553 | dividers or scrollbars of WINDOW. If WINDOW is internal, the return | ||
| 554 | value is the sum of the total number of columns of WINDOW's child | ||
| 555 | windows if they are horizontally combined and the width of WINDOW's | ||
| 556 | first child otherwise. */) | ||
| 557 | (Lisp_Object window, Lisp_Object horizontal) | ||
| 558 | { | 553 | { |
| 559 | if (NILP (horizontal)) | 554 | return decode_any_window (window)->total_lines; |
| 560 | return decode_any_window (window)->total_lines; | 555 | } |
| 561 | else | 556 | |
| 562 | return decode_any_window (window)->total_cols; | 557 | DEFUN ("window-total-width", Fwindow_total_width, Swindow_total_width, 0, 1, 0, |
| 558 | doc: /* Return the total width, in columns, of window WINDOW. | ||
| 559 | If WINDOW is omitted or nil, it defaults to the selected window. | ||
| 560 | |||
| 561 | The return value includes any vertical dividers or scroll bars | ||
| 562 | belonging to WINDOW. If WINDOW is an internal window, the total width | ||
| 563 | is the width of the screen areas spanned by its children. | ||
| 564 | |||
| 565 | On a graphical display, this total width is reported as an | ||
| 566 | integer multiple of the default character width. */) | ||
| 567 | (Lisp_Object window) | ||
| 568 | { | ||
| 569 | return decode_any_window (window)->total_cols; | ||
| 563 | } | 570 | } |
| 564 | 571 | ||
| 565 | DEFUN ("window-new-total", Fwindow_new_total, Swindow_new_total, 0, 1, 0, | 572 | DEFUN ("window-new-total", Fwindow_new_total, Swindow_new_total, 0, 1, 0, |
| @@ -592,6 +599,10 @@ If WINDOW is omitted or nil, it defaults to the selected window. */) | |||
| 592 | 599 | ||
| 593 | DEFUN ("window-left-column", Fwindow_left_column, Swindow_left_column, 0, 1, 0, | 600 | DEFUN ("window-left-column", Fwindow_left_column, Swindow_left_column, 0, 1, 0, |
| 594 | doc: /* Return left column of window WINDOW. | 601 | doc: /* Return left column of window WINDOW. |
| 602 | This is the distance, in columns, between the left edge of WINDOW and | ||
| 603 | the left edge of the frame's window area. For instance, the return | ||
| 604 | value is 0 if there is no window to the left of WINDOW. | ||
| 605 | |||
| 595 | If WINDOW is omitted or nil, it defaults to the selected window. */) | 606 | If WINDOW is omitted or nil, it defaults to the selected window. */) |
| 596 | (Lisp_Object window) | 607 | (Lisp_Object window) |
| 597 | { | 608 | { |
| @@ -600,6 +611,10 @@ If WINDOW is omitted or nil, it defaults to the selected window. */) | |||
| 600 | 611 | ||
| 601 | DEFUN ("window-top-line", Fwindow_top_line, Swindow_top_line, 0, 1, 0, | 612 | DEFUN ("window-top-line", Fwindow_top_line, Swindow_top_line, 0, 1, 0, |
| 602 | doc: /* Return top line of window WINDOW. | 613 | doc: /* Return top line of window WINDOW. |
| 614 | This is the distance, in lines, between the top of WINDOW and the top | ||
| 615 | of the frame's window area. For instance, the return value is 0 if | ||
| 616 | there is no window above WINDOW. | ||
| 617 | |||
| 603 | If WINDOW is omitted or nil, it defaults to the selected window. */) | 618 | If WINDOW is omitted or nil, it defaults to the selected window. */) |
| 604 | (Lisp_Object window) | 619 | (Lisp_Object window) |
| 605 | { | 620 | { |
| @@ -655,34 +670,34 @@ window_body_cols (struct window *w) | |||
| 655 | return width; | 670 | return width; |
| 656 | } | 671 | } |
| 657 | 672 | ||
| 658 | DEFUN ("window-body-size", Fwindow_body_size, Swindow_body_size, 0, 2, 0, | 673 | DEFUN ("window-body-height", Fwindow_body_height, Swindow_body_height, 0, 1, 0, |
| 659 | doc: /* Return the number of lines or columns of WINDOW's body. | 674 | doc: /* Return the height, in lines, of WINDOW's text area. |
| 660 | WINDOW must be a live window and defaults to the selected one. | 675 | If WINDOW is omitted or nil, it defaults to the selected window. |
| 676 | Signal an error if the window is not live. | ||
| 661 | 677 | ||
| 662 | If the optional argument HORIZONTAL is omitted or nil, the function | 678 | The returned height does not include the mode line or header line. |
| 663 | returns the number of WINDOW's lines, excluding the mode line and | 679 | On a graphical display, the height is expressed as an integer multiple |
| 664 | header line, if any. | 680 | of the default character height. If a line at the bottom of the text |
| 665 | 681 | area is only partially visible, that counts as a whole line; to | |
| 666 | If HORIZONTAL is non-nil, the function returns the number of columns | 682 | exclude partially-visible lines, use `window-text-height'. */) |
| 667 | excluding any vertical dividers or scroll bars owned by WINDOW. On a | 683 | (Lisp_Object window) |
| 668 | window-system the return value also excludes the number of columns | ||
| 669 | used for WINDOW's fringes or display margins. | ||
| 670 | |||
| 671 | Note that the return value is measured in canonical units, i.e. for | ||
| 672 | the default frame's face. If the window shows some characters with | ||
| 673 | non-default face, e.g., if the font of some characters is larger or | ||
| 674 | smaller than the default font, the value returned by this function | ||
| 675 | will not match the actual number of lines or characters per line | ||
| 676 | shown in the window. To get the actual number of columns and lines, | ||
| 677 | use `posn-at-point'. */) | ||
| 678 | (Lisp_Object window, Lisp_Object horizontal) | ||
| 679 | { | 684 | { |
| 680 | struct window *w = decode_any_window (window); | 685 | struct window *w = decode_window (window); |
| 686 | return make_number (window_body_lines (w)); | ||
| 687 | } | ||
| 681 | 688 | ||
| 682 | if (NILP (horizontal)) | 689 | DEFUN ("window-body-width", Fwindow_body_width, Swindow_body_width, 0, 1, 0, |
| 683 | return make_number (window_body_lines (w)); | 690 | doc: /* Return the width, in columns, of WINDOW's text area. |
| 684 | else | 691 | If WINDOW is omitted or nil, it defaults to the selected window. |
| 685 | return make_number (window_body_cols (w)); | 692 | Signal an error if the window is not live. |
| 693 | |||
| 694 | The return value does not include any vertical dividers, fringe or | ||
| 695 | marginal areas, or scroll bars. On a graphical display, the width is | ||
| 696 | expressed as an integer multiple of the default character width. */) | ||
| 697 | (Lisp_Object window) | ||
| 698 | { | ||
| 699 | struct window *w = decode_window (window); | ||
| 700 | return make_number (window_body_cols (w)); | ||
| 686 | } | 701 | } |
| 687 | 702 | ||
| 688 | DEFUN ("window-hscroll", Fwindow_hscroll, Swindow_hscroll, 0, 1, 0, | 703 | DEFUN ("window-hscroll", Fwindow_hscroll, Swindow_hscroll, 0, 1, 0, |
| @@ -844,7 +859,7 @@ The inside edges do not include the space used by the WINDOW's scroll | |||
| 844 | bar, display margins, fringes, header line, and/or mode line. */) | 859 | bar, display margins, fringes, header line, and/or mode line. */) |
| 845 | (Lisp_Object window) | 860 | (Lisp_Object window) |
| 846 | { | 861 | { |
| 847 | register struct window *w = decode_any_window (window); | 862 | register struct window *w = decode_window (window); |
| 848 | 863 | ||
| 849 | return list4 (make_number (WINDOW_BOX_LEFT_EDGE_COL (w) | 864 | return list4 (make_number (WINDOW_BOX_LEFT_EDGE_COL (w) |
| 850 | + WINDOW_LEFT_MARGIN_COLS (w) | 865 | + WINDOW_LEFT_MARGIN_COLS (w) |
| @@ -859,9 +874,9 @@ bar, display margins, fringes, header line, and/or mode line. */) | |||
| 859 | } | 874 | } |
| 860 | 875 | ||
| 861 | DEFUN ("window-inside-pixel-edges", Fwindow_inside_pixel_edges, Swindow_inside_pixel_edges, 0, 1, 0, | 876 | DEFUN ("window-inside-pixel-edges", Fwindow_inside_pixel_edges, Swindow_inside_pixel_edges, 0, 1, 0, |
| 862 | doc: /* Return a list of the edge pixel coordinates of WINDOW. | 877 | doc: /* Return a list of the edge pixel coordinates of WINDOW's text area. |
| 863 | The list has the form (LEFT TOP RIGHT BOTTOM), all relative to 0, 0 at | 878 | The list has the form (LEFT TOP RIGHT BOTTOM), all relative to (0,0) |
| 864 | the top left corner of the frame. | 879 | at the top left corner of the frame's window area. |
| 865 | 880 | ||
| 866 | RIGHT is one more than the rightmost x position of WINDOW's text area. | 881 | RIGHT is one more than the rightmost x position of WINDOW's text area. |
| 867 | BOTTOM is one more than the bottommost y position of WINDOW's text area. | 882 | BOTTOM is one more than the bottommost y position of WINDOW's text area. |
| @@ -869,7 +884,7 @@ The inside edges do not include the space used by WINDOW's scroll bar, | |||
| 869 | display margins, fringes, header line, and/or mode line. */) | 884 | display margins, fringes, header line, and/or mode line. */) |
| 870 | (Lisp_Object window) | 885 | (Lisp_Object window) |
| 871 | { | 886 | { |
| 872 | register struct window *w = decode_any_window (window); | 887 | register struct window *w = decode_window (window); |
| 873 | 888 | ||
| 874 | return list4 (make_number (WINDOW_BOX_LEFT_EDGE_X (w) | 889 | return list4 (make_number (WINDOW_BOX_LEFT_EDGE_X (w) |
| 875 | + WINDOW_LEFT_MARGIN_WIDTH (w) | 890 | + WINDOW_LEFT_MARGIN_WIDTH (w) |
| @@ -886,9 +901,9 @@ display margins, fringes, header line, and/or mode line. */) | |||
| 886 | DEFUN ("window-inside-absolute-pixel-edges", | 901 | DEFUN ("window-inside-absolute-pixel-edges", |
| 887 | Fwindow_inside_absolute_pixel_edges, | 902 | Fwindow_inside_absolute_pixel_edges, |
| 888 | Swindow_inside_absolute_pixel_edges, 0, 1, 0, | 903 | Swindow_inside_absolute_pixel_edges, 0, 1, 0, |
| 889 | doc: /* Return a list of the edge pixel coordinates of WINDOW. | 904 | doc: /* Return a list of the edge pixel coordinates of WINDOW's text area. |
| 890 | The list has the form (LEFT TOP RIGHT BOTTOM), all relative to 0, 0 at | 905 | The list has the form (LEFT TOP RIGHT BOTTOM), all relative to (0,0) |
| 891 | the top left corner of the display. | 906 | at the top left corner of the frame's window area. |
| 892 | 907 | ||
| 893 | RIGHT is one more than the rightmost x position of WINDOW's text area. | 908 | RIGHT is one more than the rightmost x position of WINDOW's text area. |
| 894 | BOTTOM is one more than the bottommost y position of WINDOW's text area. | 909 | BOTTOM is one more than the bottommost y position of WINDOW's text area. |
| @@ -896,7 +911,7 @@ The inside edges do not include the space used by WINDOW's scroll bar, | |||
| 896 | display margins, fringes, header line, and/or mode line. */) | 911 | display margins, fringes, header line, and/or mode line. */) |
| 897 | (Lisp_Object window) | 912 | (Lisp_Object window) |
| 898 | { | 913 | { |
| 899 | register struct window *w = decode_any_window (window); | 914 | register struct window *w = decode_window (window); |
| 900 | int add_x, add_y; | 915 | int add_x, add_y; |
| 901 | calc_absolute_offset (w, &add_x, &add_y); | 916 | calc_absolute_offset (w, &add_x, &add_y); |
| 902 | 917 | ||
| @@ -2571,9 +2586,9 @@ DEFUN ("delete-other-windows-internal", Fdelete_other_windows_internal, | |||
| 2571 | Only the frame WINDOW is on is affected. WINDOW may be any window and | 2586 | Only the frame WINDOW is on is affected. WINDOW may be any window and |
| 2572 | defaults to the selected one. | 2587 | defaults to the selected one. |
| 2573 | 2588 | ||
| 2574 | Optional argument ROOT, if non-nil, must specify an internal window | 2589 | Optional argument ROOT, if non-nil, must specify an internal window such |
| 2575 | containing WINDOW as a subwindow. If this is the case, replace ROOT by | 2590 | that WINDOW is in its window subtree. If this is the case, replace ROOT |
| 2576 | WINDOW and leave alone any windows not contained in ROOT. | 2591 | by WINDOW and leave alone any windows not part of ROOT's subtree. |
| 2577 | 2592 | ||
| 2578 | When WINDOW is live try to reduce display jumps by keeping the text | 2593 | When WINDOW is live try to reduce display jumps by keeping the text |
| 2579 | previously visible in WINDOW in the same place on the frame. Doing this | 2594 | previously visible in WINDOW in the same place on the frame. Doing this |
| @@ -2637,10 +2652,10 @@ window-start value is reasonable when this function is called. */) | |||
| 2637 | } | 2652 | } |
| 2638 | else | 2653 | else |
| 2639 | { | 2654 | { |
| 2640 | /* See if the frame's selected window is a subwindow of WINDOW, by | 2655 | /* See if the frame's selected window is a part of the window |
| 2641 | finding all the selected window's parents and comparing each | 2656 | subtree rooted at WINDOW, by finding all the selected window's |
| 2642 | one with WINDOW. If it isn't we need a new selected window for | 2657 | parents and comparing each one with WINDOW. If it isn't we |
| 2643 | this frame. */ | 2658 | need a new selected window for this frame. */ |
| 2644 | swindow = FRAME_SELECTED_WINDOW (f); | 2659 | swindow = FRAME_SELECTED_WINDOW (f); |
| 2645 | while (1) | 2660 | while (1) |
| 2646 | { | 2661 | { |
| @@ -2676,7 +2691,7 @@ window-start value is reasonable when this function is called. */) | |||
| 2676 | 2691 | ||
| 2677 | if (NILP (w->buffer)) | 2692 | if (NILP (w->buffer)) |
| 2678 | { | 2693 | { |
| 2679 | /* Resize subwindows vertically. */ | 2694 | /* Resize child windows vertically. */ |
| 2680 | XSETINT (delta, XINT (r->total_lines) - XINT (w->total_lines)); | 2695 | XSETINT (delta, XINT (r->total_lines) - XINT (w->total_lines)); |
| 2681 | w->top_line = r->top_line; | 2696 | w->top_line = r->top_line; |
| 2682 | resize_root_window (window, delta, Qnil, Qnil); | 2697 | resize_root_window (window, delta, Qnil, Qnil); |
| @@ -2691,7 +2706,7 @@ window-start value is reasonable when this function is called. */) | |||
| 2691 | resize_failed = 1; | 2706 | resize_failed = 1; |
| 2692 | } | 2707 | } |
| 2693 | 2708 | ||
| 2694 | /* Resize subwindows horizontally. */ | 2709 | /* Resize child windows horizontally. */ |
| 2695 | if (!resize_failed) | 2710 | if (!resize_failed) |
| 2696 | { | 2711 | { |
| 2697 | w->left_col = r->left_col; | 2712 | w->left_col = r->left_col; |
| @@ -2740,15 +2755,15 @@ window-start value is reasonable when this function is called. */) | |||
| 2740 | XWINDOW (w->parent)->hchild = sibling; | 2755 | XWINDOW (w->parent)->hchild = sibling; |
| 2741 | } | 2756 | } |
| 2742 | 2757 | ||
| 2743 | /* Delete ROOT and all subwindows of ROOT. */ | 2758 | /* Delete ROOT and all child windows of ROOT. */ |
| 2744 | if (!NILP (r->vchild)) | 2759 | if (!NILP (r->vchild)) |
| 2745 | { | 2760 | { |
| 2746 | delete_all_subwindows (r->vchild); | 2761 | delete_all_child_windows (r->vchild); |
| 2747 | r->vchild = Qnil; | 2762 | r->vchild = Qnil; |
| 2748 | } | 2763 | } |
| 2749 | else if (!NILP (r->hchild)) | 2764 | else if (!NILP (r->hchild)) |
| 2750 | { | 2765 | { |
| 2751 | delete_all_subwindows (r->hchild); | 2766 | delete_all_child_windows (r->hchild); |
| 2752 | r->hchild = Qnil; | 2767 | r->hchild = Qnil; |
| 2753 | } | 2768 | } |
| 2754 | 2769 | ||
| @@ -3349,7 +3364,7 @@ Return SIZE. | |||
| 3349 | Optional argument ADD non-nil means add SIZE to the new total size of | 3364 | Optional argument ADD non-nil means add SIZE to the new total size of |
| 3350 | WINDOW and return the sum. | 3365 | WINDOW and return the sum. |
| 3351 | 3366 | ||
| 3352 | Note: This function does not operate on any subwindows of WINDOW. */) | 3367 | Note: This function does not operate on any child windows of WINDOW. */) |
| 3353 | (Lisp_Object window, Lisp_Object size, Lisp_Object add) | 3368 | (Lisp_Object window, Lisp_Object size, Lisp_Object add) |
| 3354 | { | 3369 | { |
| 3355 | struct window *w = decode_any_window (window); | 3370 | struct window *w = decode_any_window (window); |
| @@ -3367,7 +3382,7 @@ DEFUN ("set-window-new-normal", Fset_window_new_normal, Sset_window_new_normal, | |||
| 3367 | doc: /* Set new normal size of WINDOW to SIZE. | 3382 | doc: /* Set new normal size of WINDOW to SIZE. |
| 3368 | Return SIZE. | 3383 | Return SIZE. |
| 3369 | 3384 | ||
| 3370 | Note: This function does not operate on any subwindows of WINDOW. */) | 3385 | Note: This function does not operate on any child windows of WINDOW. */) |
| 3371 | (Lisp_Object window, Lisp_Object size) | 3386 | (Lisp_Object window, Lisp_Object size) |
| 3372 | { | 3387 | { |
| 3373 | struct window *w = decode_any_window (window); | 3388 | struct window *w = decode_any_window (window); |
| @@ -3378,7 +3393,7 @@ Note: This function does not operate on any subwindows of WINDOW. */) | |||
| 3378 | 3393 | ||
| 3379 | /* Return 1 if setting w->total_lines (w->total_cols if HORFLAG is | 3394 | /* Return 1 if setting w->total_lines (w->total_cols if HORFLAG is |
| 3380 | non-zero) to w->new_total would result in correct heights (widths) | 3395 | non-zero) to w->new_total would result in correct heights (widths) |
| 3381 | for window W and recursively all subwindows of W. | 3396 | for window W and recursively all child windows of W. |
| 3382 | 3397 | ||
| 3383 | Note: This function does not check any of `window-fixed-size-p', | 3398 | Note: This function does not check any of `window-fixed-size-p', |
| 3384 | `window-min-height' or `window-min-width'. It does check that window | 3399 | `window-min-height' or `window-min-width'. It does check that window |
| @@ -3393,7 +3408,7 @@ window_resize_check (struct window *w, int horflag) | |||
| 3393 | { | 3408 | { |
| 3394 | c = XWINDOW (w->vchild); | 3409 | c = XWINDOW (w->vchild); |
| 3395 | if (horflag) | 3410 | if (horflag) |
| 3396 | /* All subwindows of W must have the same width as W. */ | 3411 | /* All child windows of W must have the same width as W. */ |
| 3397 | { | 3412 | { |
| 3398 | while (c) | 3413 | while (c) |
| 3399 | { | 3414 | { |
| @@ -3405,8 +3420,8 @@ window_resize_check (struct window *w, int horflag) | |||
| 3405 | return 1; | 3420 | return 1; |
| 3406 | } | 3421 | } |
| 3407 | else | 3422 | else |
| 3408 | /* The sum of the heights of the subwindows of W must equal W's | 3423 | /* The sum of the heights of the child windows of W must equal |
| 3409 | height. */ | 3424 | W's height. */ |
| 3410 | { | 3425 | { |
| 3411 | int sum_of_sizes = 0; | 3426 | int sum_of_sizes = 0; |
| 3412 | while (c) | 3427 | while (c) |
| @@ -3424,7 +3439,7 @@ window_resize_check (struct window *w, int horflag) | |||
| 3424 | { | 3439 | { |
| 3425 | c = XWINDOW (w->hchild); | 3440 | c = XWINDOW (w->hchild); |
| 3426 | if (horflag) | 3441 | if (horflag) |
| 3427 | /* The sum of the widths of the subwindows of W must equal W's | 3442 | /* The sum of the widths of the child windows of W must equal W's |
| 3428 | width. */ | 3443 | width. */ |
| 3429 | { | 3444 | { |
| 3430 | int sum_of_sizes = 0; | 3445 | int sum_of_sizes = 0; |
| @@ -3438,7 +3453,7 @@ window_resize_check (struct window *w, int horflag) | |||
| 3438 | return (sum_of_sizes == XINT (w->new_total)); | 3453 | return (sum_of_sizes == XINT (w->new_total)); |
| 3439 | } | 3454 | } |
| 3440 | else | 3455 | else |
| 3441 | /* All subwindows of W must have the same height as W. */ | 3456 | /* All child windows of W must have the same height as W. */ |
| 3442 | { | 3457 | { |
| 3443 | while (c) | 3458 | while (c) |
| 3444 | { | 3459 | { |
| @@ -3458,9 +3473,9 @@ window_resize_check (struct window *w, int horflag) | |||
| 3458 | } | 3473 | } |
| 3459 | 3474 | ||
| 3460 | /* Set w->total_lines (w->total_cols if HORIZONTAL is non-zero) to | 3475 | /* Set w->total_lines (w->total_cols if HORIZONTAL is non-zero) to |
| 3461 | w->new_total for window W and recursively all subwindows of W. Also | 3476 | w->new_total for window W and recursively all child windows of W. |
| 3462 | calculate and assign the new vertical (horizontal) start positions of | 3477 | Also calculate and assign the new vertical (horizontal) start |
| 3463 | each of these windows. | 3478 | positions of each of these windows. |
| 3464 | 3479 | ||
| 3465 | This function does not perform any error checks. Make sure you have | 3480 | This function does not perform any error checks. Make sure you have |
| 3466 | run window_resize_check on W before applying this function. */ | 3481 | run window_resize_check on W before applying this function. */ |
| @@ -3534,8 +3549,8 @@ Optional argument HORIZONTAL omitted or nil means apply requested height | |||
| 3534 | values. HORIZONTAL non-nil means apply requested width values. | 3549 | values. HORIZONTAL non-nil means apply requested width values. |
| 3535 | 3550 | ||
| 3536 | This function checks whether the requested values sum up to a valid | 3551 | This function checks whether the requested values sum up to a valid |
| 3537 | window layout, recursively assigns the new sizes of all subwindows and | 3552 | window layout, recursively assigns the new sizes of all child windows |
| 3538 | calculates and assigns the new start positions of these windows. | 3553 | and calculates and assigns the new start positions of these windows. |
| 3539 | 3554 | ||
| 3540 | Note: This function does not check any of `window-fixed-size-p', | 3555 | Note: This function does not check any of `window-fixed-size-p', |
| 3541 | `window-min-height' or `window-min-width'. All these checks have to | 3556 | `window-min-height' or `window-min-width'. All these checks have to |
| @@ -3931,12 +3946,12 @@ Signal an error when WINDOW is the only window on its frame. */) | |||
| 3931 | 3946 | ||
| 3932 | if (!NILP (w->vchild)) | 3947 | if (!NILP (w->vchild)) |
| 3933 | { | 3948 | { |
| 3934 | delete_all_subwindows (w->vchild); | 3949 | delete_all_child_windows (w->vchild); |
| 3935 | w->vchild = Qnil; | 3950 | w->vchild = Qnil; |
| 3936 | } | 3951 | } |
| 3937 | else if (!NILP (w->hchild)) | 3952 | else if (!NILP (w->hchild)) |
| 3938 | { | 3953 | { |
| 3939 | delete_all_subwindows (w->hchild); | 3954 | delete_all_child_windows (w->hchild); |
| 3940 | w->hchild = Qnil; | 3955 | w->hchild = Qnil; |
| 3941 | } | 3956 | } |
| 3942 | else if (!NILP (w->buffer)) | 3957 | else if (!NILP (w->buffer)) |
| @@ -5218,10 +5233,10 @@ and redisplay normally--don't erase and redraw the frame. */) | |||
| 5218 | DEFUN ("window-text-height", Fwindow_text_height, Swindow_text_height, | 5233 | DEFUN ("window-text-height", Fwindow_text_height, Swindow_text_height, |
| 5219 | 0, 1, 0, | 5234 | 0, 1, 0, |
| 5220 | doc: /* Return the height in lines of the text display area of WINDOW. | 5235 | doc: /* Return the height in lines of the text display area of WINDOW. |
| 5221 | WINDOW defaults to the selected window. | 5236 | If WINDOW is omitted or nil, it defaults to the selected window. |
| 5222 | 5237 | ||
| 5223 | The return value does not include the mode line, any header line, nor | 5238 | The returned height does not include the mode line, any header line, |
| 5224 | any partial-height lines in the text display area. */) | 5239 | nor any partial-height lines at the bottom of the text area. */) |
| 5225 | (Lisp_Object window) | 5240 | (Lisp_Object window) |
| 5226 | { | 5241 | { |
| 5227 | struct window *w = decode_window (window); | 5242 | struct window *w = decode_window (window); |
| @@ -5515,7 +5530,7 @@ the return value is nil. Otherwise the value is t. */) | |||
| 5515 | Save their current buffers in their height fields, since we may | 5530 | Save their current buffers in their height fields, since we may |
| 5516 | need it later, if a buffer saved in the configuration is now | 5531 | need it later, if a buffer saved in the configuration is now |
| 5517 | dead. */ | 5532 | dead. */ |
| 5518 | delete_all_subwindows (FRAME_ROOT_WINDOW (f)); | 5533 | delete_all_child_windows (FRAME_ROOT_WINDOW (f)); |
| 5519 | 5534 | ||
| 5520 | for (k = 0; k < saved_windows->header.size; k++) | 5535 | for (k = 0; k < saved_windows->header.size; k++) |
| 5521 | { | 5536 | { |
| @@ -5729,10 +5744,10 @@ the return value is nil. Otherwise the value is t. */) | |||
| 5729 | } | 5744 | } |
| 5730 | 5745 | ||
| 5731 | 5746 | ||
| 5732 | /* Delete all subwindows reachable via the next, vchild, and hchild | 5747 | /* Recursively delete all child windows reachable via the next, vchild, |
| 5733 | slots of WINDOW. */ | 5748 | and hchild slots of WINDOW. */ |
| 5734 | void | 5749 | void |
| 5735 | delete_all_subwindows (Lisp_Object window) | 5750 | delete_all_child_windows (Lisp_Object window) |
| 5736 | { | 5751 | { |
| 5737 | register struct window *w; | 5752 | register struct window *w; |
| 5738 | 5753 | ||
| @@ -5740,18 +5755,18 @@ delete_all_subwindows (Lisp_Object window) | |||
| 5740 | 5755 | ||
| 5741 | if (!NILP (w->next)) | 5756 | if (!NILP (w->next)) |
| 5742 | /* Delete WINDOW's siblings (we traverse postorderly). */ | 5757 | /* Delete WINDOW's siblings (we traverse postorderly). */ |
| 5743 | delete_all_subwindows (w->next); | 5758 | delete_all_child_windows (w->next); |
| 5744 | 5759 | ||
| 5745 | w->total_lines = w->buffer; /* See Fset_window_configuration for excuse. */ | 5760 | w->total_lines = w->buffer; /* See Fset_window_configuration for excuse. */ |
| 5746 | 5761 | ||
| 5747 | if (!NILP (w->vchild)) | 5762 | if (!NILP (w->vchild)) |
| 5748 | { | 5763 | { |
| 5749 | delete_all_subwindows (w->vchild); | 5764 | delete_all_child_windows (w->vchild); |
| 5750 | w->vchild = Qnil; | 5765 | w->vchild = Qnil; |
| 5751 | } | 5766 | } |
| 5752 | else if (!NILP (w->hchild)) | 5767 | else if (!NILP (w->hchild)) |
| 5753 | { | 5768 | { |
| 5754 | delete_all_subwindows (w->hchild); | 5769 | delete_all_child_windows (w->hchild); |
| 5755 | w->hchild = Qnil; | 5770 | w->hchild = Qnil; |
| 5756 | } | 5771 | } |
| 5757 | else if (!NILP (w->buffer)) | 5772 | else if (!NILP (w->buffer)) |
| @@ -6583,14 +6598,16 @@ function `window-nest' and altered by the function `set-window-nest'. */); | |||
| 6583 | defsubr (&Swindow_use_time); | 6598 | defsubr (&Swindow_use_time); |
| 6584 | defsubr (&Swindow_top_line); | 6599 | defsubr (&Swindow_top_line); |
| 6585 | defsubr (&Swindow_left_column); | 6600 | defsubr (&Swindow_left_column); |
| 6586 | defsubr (&Swindow_total_size); | 6601 | defsubr (&Swindow_total_height); |
| 6602 | defsubr (&Swindow_total_width); | ||
| 6587 | defsubr (&Swindow_normal_size); | 6603 | defsubr (&Swindow_normal_size); |
| 6588 | defsubr (&Swindow_new_total); | 6604 | defsubr (&Swindow_new_total); |
| 6589 | defsubr (&Swindow_new_normal); | 6605 | defsubr (&Swindow_new_normal); |
| 6590 | defsubr (&Sset_window_new_total); | 6606 | defsubr (&Sset_window_new_total); |
| 6591 | defsubr (&Sset_window_new_normal); | 6607 | defsubr (&Sset_window_new_normal); |
| 6592 | defsubr (&Swindow_resize_apply); | 6608 | defsubr (&Swindow_resize_apply); |
| 6593 | defsubr (&Swindow_body_size); | 6609 | defsubr (&Swindow_body_height); |
| 6610 | defsubr (&Swindow_body_width); | ||
| 6594 | defsubr (&Swindow_hscroll); | 6611 | defsubr (&Swindow_hscroll); |
| 6595 | defsubr (&Sset_window_hscroll); | 6612 | defsubr (&Sset_window_hscroll); |
| 6596 | defsubr (&Swindow_redisplay_end_trigger); | 6613 | defsubr (&Swindow_redisplay_end_trigger); |
diff --git a/src/window.h b/src/window.h index c6fa5e7a338..6a9641e3e6d 100644 --- a/src/window.h +++ b/src/window.h | |||
| @@ -824,7 +824,7 @@ extern Lisp_Object window_from_coordinates (struct frame *, int, int, | |||
| 824 | enum window_part *, int); | 824 | enum window_part *, int); |
| 825 | EXFUN (Fwindow_dedicated_p, 1); | 825 | EXFUN (Fwindow_dedicated_p, 1); |
| 826 | extern void resize_frame_windows (struct frame *, int, int); | 826 | extern void resize_frame_windows (struct frame *, int, int); |
| 827 | extern void delete_all_subwindows (Lisp_Object); | 827 | extern void delete_all_child_windows (Lisp_Object); |
| 828 | extern void freeze_window_starts (struct frame *, int); | 828 | extern void freeze_window_starts (struct frame *, int); |
| 829 | extern void grow_mini_window (struct window *, int); | 829 | extern void grow_mini_window (struct window *, int); |
| 830 | extern void shrink_mini_window (struct window *); | 830 | extern void shrink_mini_window (struct window *); |
diff --git a/src/xdisp.c b/src/xdisp.c index 9bb2396c4a3..ae4db3906ba 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -954,7 +954,7 @@ static int coords_in_mouse_face_p (struct window *, int, int); | |||
| 954 | 954 | ||
| 955 | This is the height of W minus the height of a mode line, if any. */ | 955 | This is the height of W minus the height of a mode line, if any. */ |
| 956 | 956 | ||
| 957 | inline int | 957 | int |
| 958 | window_text_bottom_y (struct window *w) | 958 | window_text_bottom_y (struct window *w) |
| 959 | { | 959 | { |
| 960 | int height = WINDOW_TOTAL_HEIGHT (w); | 960 | int height = WINDOW_TOTAL_HEIGHT (w); |
| @@ -968,7 +968,7 @@ window_text_bottom_y (struct window *w) | |||
| 968 | means return the total width of W, not including fringes to | 968 | means return the total width of W, not including fringes to |
| 969 | the left and right of the window. */ | 969 | the left and right of the window. */ |
| 970 | 970 | ||
| 971 | inline int | 971 | int |
| 972 | window_box_width (struct window *w, int area) | 972 | window_box_width (struct window *w, int area) |
| 973 | { | 973 | { |
| 974 | int cols = XFASTINT (w->total_cols); | 974 | int cols = XFASTINT (w->total_cols); |
| @@ -1007,7 +1007,7 @@ window_box_width (struct window *w, int area) | |||
| 1007 | /* Return the pixel height of the display area of window W, not | 1007 | /* Return the pixel height of the display area of window W, not |
| 1008 | including mode lines of W, if any. */ | 1008 | including mode lines of W, if any. */ |
| 1009 | 1009 | ||
| 1010 | inline int | 1010 | int |
| 1011 | window_box_height (struct window *w) | 1011 | window_box_height (struct window *w) |
| 1012 | { | 1012 | { |
| 1013 | struct frame *f = XFRAME (w->frame); | 1013 | struct frame *f = XFRAME (w->frame); |
| @@ -1054,7 +1054,7 @@ window_box_height (struct window *w) | |||
| 1054 | area AREA of window W. AREA < 0 means return the left edge of the | 1054 | area AREA of window W. AREA < 0 means return the left edge of the |
| 1055 | whole window, to the right of the left fringe of W. */ | 1055 | whole window, to the right of the left fringe of W. */ |
| 1056 | 1056 | ||
| 1057 | inline int | 1057 | int |
| 1058 | window_box_left_offset (struct window *w, int area) | 1058 | window_box_left_offset (struct window *w, int area) |
| 1059 | { | 1059 | { |
| 1060 | int x; | 1060 | int x; |
| @@ -1086,7 +1086,7 @@ window_box_left_offset (struct window *w, int area) | |||
| 1086 | area AREA of window W. AREA < 0 means return the right edge of the | 1086 | area AREA of window W. AREA < 0 means return the right edge of the |
| 1087 | whole window, to the left of the right fringe of W. */ | 1087 | whole window, to the left of the right fringe of W. */ |
| 1088 | 1088 | ||
| 1089 | inline int | 1089 | int |
| 1090 | window_box_right_offset (struct window *w, int area) | 1090 | window_box_right_offset (struct window *w, int area) |
| 1091 | { | 1091 | { |
| 1092 | return window_box_left_offset (w, area) + window_box_width (w, area); | 1092 | return window_box_left_offset (w, area) + window_box_width (w, area); |
| @@ -1096,7 +1096,7 @@ window_box_right_offset (struct window *w, int area) | |||
| 1096 | area AREA of window W. AREA < 0 means return the left edge of the | 1096 | area AREA of window W. AREA < 0 means return the left edge of the |
| 1097 | whole window, to the right of the left fringe of W. */ | 1097 | whole window, to the right of the left fringe of W. */ |
| 1098 | 1098 | ||
| 1099 | inline int | 1099 | int |
| 1100 | window_box_left (struct window *w, int area) | 1100 | window_box_left (struct window *w, int area) |
| 1101 | { | 1101 | { |
| 1102 | struct frame *f = XFRAME (w->frame); | 1102 | struct frame *f = XFRAME (w->frame); |
| @@ -1116,7 +1116,7 @@ window_box_left (struct window *w, int area) | |||
| 1116 | area AREA of window W. AREA < 0 means return the right edge of the | 1116 | area AREA of window W. AREA < 0 means return the right edge of the |
| 1117 | whole window, to the left of the right fringe of W. */ | 1117 | whole window, to the left of the right fringe of W. */ |
| 1118 | 1118 | ||
| 1119 | inline int | 1119 | int |
| 1120 | window_box_right (struct window *w, int area) | 1120 | window_box_right (struct window *w, int area) |
| 1121 | { | 1121 | { |
| 1122 | return window_box_left (w, area) + window_box_width (w, area); | 1122 | return window_box_left (w, area) + window_box_width (w, area); |
| @@ -1129,7 +1129,7 @@ window_box_right (struct window *w, int area) | |||
| 1129 | coordinates of the upper-left corner of the box. Return in | 1129 | coordinates of the upper-left corner of the box. Return in |
| 1130 | *BOX_WIDTH, and *BOX_HEIGHT the pixel width and height of the box. */ | 1130 | *BOX_WIDTH, and *BOX_HEIGHT the pixel width and height of the box. */ |
| 1131 | 1131 | ||
| 1132 | inline void | 1132 | void |
| 1133 | window_box (struct window *w, int area, int *box_x, int *box_y, | 1133 | window_box (struct window *w, int area, int *box_x, int *box_y, |
| 1134 | int *box_width, int *box_height) | 1134 | int *box_width, int *box_height) |
| 1135 | { | 1135 | { |
diff --git a/test/automated/compile-tests.el b/test/automated/compile-tests.el index 1d9a266904c..419cc0e9116 100644 --- a/test/automated/compile-tests.el +++ b/test/automated/compile-tests.el | |||
| @@ -71,7 +71,7 @@ | |||
| 71 | ;; caml | 71 | ;; caml |
| 72 | ("File \"foobar.ml\", lines 5-8, characters 20-155: blah blah" | 72 | ("File \"foobar.ml\", lines 5-8, characters 20-155: blah blah" |
| 73 | 1 (19 . 155) (5 . 8) "foobar.ml") | 73 | 1 (19 . 155) (5 . 8) "foobar.ml") |
| 74 | ("File \"F:\\ocaml\\sorting.ml\", line 65, characters 2-145:" | 74 | ("File \"F:\\ocaml\\sorting.ml\", line 65, characters 2-145:\nWarning 26: unused variable equ." |
| 75 | 1 (1 . 145) 65 "F:\\ocaml\\sorting.ml") | 75 | 1 (1 . 145) 65 "F:\\ocaml\\sorting.ml") |
| 76 | ("File \"/usr/share/gdesklets/display/TargetGauge.py\", line 41, in add_children" | 76 | ("File \"/usr/share/gdesklets/display/TargetGauge.py\", line 41, in add_children" |
| 77 | 1 nil 41 "/usr/share/gdesklets/display/TargetGauge.py") | 77 | 1 nil 41 "/usr/share/gdesklets/display/TargetGauge.py") |