aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2011-11-11 16:08:47 +0900
committerKenichi Handa2011-11-11 16:08:47 +0900
commit0756b0c3a6e60dd623da6f12bc8d2de05ef7b8f1 (patch)
tree0846cacac3ba56cb8d2054fbc851fee2fb9606d2
parent9ac0394b8d1e54bf1b49291c85770af36a94531e (diff)
parent68cbc58be59373e805fa200db02e4022e20050f0 (diff)
downloademacs-0756b0c3a6e60dd623da6f12bc8d2de05ef7b8f1.tar.gz
emacs-0756b0c3a6e60dd623da6f12bc8d2de05ef7b8f1.zip
merge trunk
-rw-r--r--admin/ChangeLog4
-rw-r--r--admin/charsets/mapfiles/Uni2JIS2
-rw-r--r--admin/unidata/makefile.w32-in2
-rw-r--r--doc/lispref/ChangeLog47
-rw-r--r--doc/lispref/buffers.texi9
-rw-r--r--doc/lispref/windows.texi1099
-rw-r--r--doc/misc/auth.texi18
-rw-r--r--doc/misc/gnus.texi30
-rw-r--r--etc/NEWS4
-rw-r--r--[-rwxr-xr-x]etc/images/icons/allout-widgets/light-bg/locked-encrypted.pngbin210 -> 210 bytes
-rw-r--r--[-rwxr-xr-x]etc/images/icons/allout-widgets/light-bg/unlocked-encrypted.pngbin202 -> 202 bytes
-rw-r--r--leim/quail/ipa.el2
-rw-r--r--lisp/ChangeLog119
-rw-r--r--lisp/calendar/cal-menu.el12
-rw-r--r--lisp/delim-col.el2
-rw-r--r--lisp/electric.el1
-rw-r--r--lisp/emacs-lisp/bytecomp.el2
-rw-r--r--lisp/emacs-lisp/find-func.el40
-rw-r--r--lisp/emulation/edt.el2
-rw-r--r--lisp/files.el12
-rw-r--r--lisp/generic-x.el2
-rw-r--r--lisp/gnus/ChangeLog2
-rw-r--r--lisp/gnus/smime.el2
-rw-r--r--lisp/international/robin.el2
-rw-r--r--lisp/mail/rmail.el28
-rw-r--r--lisp/net/secrets.el2
-rw-r--r--lisp/org/org-agenda.el24
-rw-r--r--lisp/progmodes/compile.el76
-rw-r--r--lisp/progmodes/cperl-mode.el2
-rw-r--r--lisp/progmodes/delphi.el4
-rw-r--r--lisp/progmodes/gdb-mi.el2
-rw-r--r--lisp/progmodes/gud.el2
-rw-r--r--lisp/progmodes/meta-mode.el50
-rw-r--r--lisp/progmodes/python.el21
-rw-r--r--lisp/progmodes/vhdl-mode.el2
-rw-r--r--lisp/rot13.el2
-rw-r--r--lisp/subr.el43
-rw-r--r--lisp/textmodes/reftex-parse.el2
-rw-r--r--lisp/textmodes/rst.el4
-rw-r--r--lisp/url/url-http.el2
-rw-r--r--lisp/vc/vc-svn.el26
-rw-r--r--lisp/window.el496
-rw-r--r--lisp/woman.el2
-rw-r--r--src/ChangeLog68
-rw-r--r--src/alloc.c7
-rw-r--r--src/ccl.c2
-rw-r--r--src/dispextern.h16
-rw-r--r--src/font.c2
-rw-r--r--src/frame.c2
-rw-r--r--src/intervals.c19
-rw-r--r--src/lisp.h4
-rw-r--r--src/s/gnu.h2
-rw-r--r--src/w32.c5
-rw-r--r--src/window.c207
-rw-r--r--src/window.h2
-rw-r--r--src/xdisp.c16
-rw-r--r--test/automated/compile-tests.el2
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 @@
12011-11-07 Juanma Barranquero <lekktu@gmail.com>
2
3 * unidata/makefile.w32-in (clean): Remove bidimirror.h and biditype.h.
4
12011-10-31 David Engster <deng@randomsample.de> 52011-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 @@
514045A S-0790 # CYRILLIC SMALL LETTER NJE 514045A S-0790 # CYRILLIC SMALL LETTER NJE
515045B S-0791 # CYRILLIC SMALL LETTER TSHE (Serbocroatian) 515045B S-0791 # CYRILLIC SMALL LETTER TSHE (Serbocroatian)
516045C S-0792 # CYRILLIC SMALL LETTER KJE 516045C S-0792 # CYRILLIC SMALL LETTER KJE
517045E S-0793 # CYRILLIC SMALL LETTER SHORT U (Byalorussian) 517045E S-0793 # CYRILLIC SMALL LETTER SHORT U (Byelorussian)
518045F S-0794 # CYRILLIC SMALL LETTER DZHE 518045F S-0794 # CYRILLIC SMALL LETTER DZHE
5192010 0-0130 1-0130 2-0130 # HYPHEN 5192010 0-0130 1-0130 2-0130 # HYPHEN
5202014 0-0129 1-0129 2-0129 # EM DASH 5202014 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
54clean: 54clean:
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 @@
12011-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
62011-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
142011-11-09 Martin Rudalics <rudalics@gmx.at>
15
16 * windows.texi (Resizing Windows): Rewrite documentation of
17 window-resizable.
18
192011-11-09 Chong Yidong <cyd@gnu.org>
20
21 * windows.texi (Splitting Windows): Simplify example.
22
232011-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
342011-11-07 Glenn Morris <rgm@gnu.org>
35
36 * windows.texi (Choosing Window): Fix keybinding typo.
37
382011-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
12011-11-06 Chong Yidong <cyd@gnu.org> 442011-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
10672010-08-08 Christoph <cschol2112@googlemail.com> 11102010-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
10712010-08-08 Juanma Barranquero <lekktu@gmail.com> 11142010-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
750This command toggles whether the current buffer is read-only. It is 750This command toggles whether the current buffer is read-only. It is
751intended for interactive use; do not use it in programs. At any given 751intended for interactive use; do not use it in programs (it may have
752point in a program, you should know whether you want the read-only flag 752side-effects, such as enabling View mode, and does not affect
753on or off; so you can set @code{buffer-read-only} explicitly to the 753read-only text properties). To change the read-only state of a buffer in
754proper value, @code{t} or @code{nil}. 754a program, explicitly set @code{buffer-read-only} to the proper value.
755To temporarily ignore a read-only state, bind @code{inhibit-read-only}.
755 756
756If @var{arg} is non-@code{nil}, it should be a raw prefix argument. 757If @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
275This function returns a non-@code{nil} value if and only if 275This 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
277omitted or nil, it defaults to the selected one. 277omitted or @code{nil}, it defaults to the selected one.
278 278
279If the optional argument @var{horizontal} is non-@code{nil}, this 279If the optional argument @var{horizontal} is non-@code{nil}, this
280means to return non-@code{nil} if and only if @var{window} is part of 280means 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
343Emacs windows are rectangular. The structure of a live window can be 343 The following schematic shows the structure of a live window:
344roughly 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
366The 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},
367form, a window consists of its body alone. LS and RS stand for the left 367where the buffer text is displayed. On each side of the text area is
368and right scroll bar (@pxref{Scroll Bars}) respectively. Only one of 368a series of vertical areas; from innermost to outermost, these are the
369them can be present at any time. LF and RF denote the left and right 369left and right margins, denoted by LM and RM in the schematic
370fringe, see @ref{Fringes}. LM and RM, finally, stand for the left and 370(@pxref{Display Margins}); the left and right fringes, denoted by LF
371right display margin, see @ref{Display Margins}. The header line, if 371and RF (@pxref{Fringes}); and the left or right scroll bar, only one of
372present, is located above theses areas, the mode line below, see 372which is present at any time, denoted by LS and RS (@pxref{Scroll
373@ref{Mode Line Format}. 373Bars}). 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
375line (@pxref{Mode Line Format}).
376
377 Emacs provides several functions for finding the height and width of
378a window. Except where noted, these heights and widths are reported
379as integer numbers of lines and columns respectively. On a graphical
380display, each ``line'' and ``column'' actually corresponds to the
381height and width of a ``default'' character specified by the frame's
382default font. Thus, if a window is displaying text with a different
383font or size, the reported height and width for that window may differ
384from 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
379The @dfn{total height of a window} is specified as the total number of
380lines occupied by the window. Any mode or header line is included in a
381window's total height. For an internal window, the total height is
382calculated 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
388The @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
389the window. Any scroll bar and the column of @samp{|} characters that 393and bottom of the window, including the header line (if one exists)
390separate the window from its right sibling are included in a window's 394and the mode line. The @dfn{total width} of a window is the distance
391total width. On a window-system, fringes and display margins are 395between the left and right edges of the mode line. Note that the
392included in a window's total width too. For an internal window, the 396height of a frame is not the same as the height of its windows, since
393total width is calculated recursively from the total widths of its child 397a frame may also contain an echo area, menu bar, and tool bar
394windows. 398(@pxref{Size and Position}).
395
396@cindex total size of a window
397@cindex total window size
398The following function is the standard interface for getting the total
399size of any window:
400
401@defun window-total-size &optional window &optional horizontal
402This function returns the total number of lines of @var{window}. The
403argument @var{window} can denote any window and defaults to the selected
404one. If @var{window} is live, the return value includes any header or
405mode lines of @var{window}. If @var{window} is internal, the return
406value is the sum of the total heights of @var{window}'s child windows
407provided these are vertically combined and the height of @var{window}'s
408first child if they are horizontally combined.
409
410 If the optional argument @var{horizontal} is non-@code{nil}, this
411function returns the total number of columns of @var{window}. If
412@var{window} is live, the return value includes any vertical divider
413column or scroll bars of @var{window}. On a window-system, the return
414value includes the space occupied by any margins and fringes of
415@var{window} too. If @var{window} is internal, the return value is the
416sum of the total widths of @var{window}'s child windows provided these
417are horizontally combined and the width of @var{window}'s first child
418otherwise.
419@end defun
420
421Alternatively, the following two functions can be used to retrieve
422either 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
425This function returns the total number of lines of @var{window}. 401This 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
427return value includes @var{window}'s mode line and header line, if any. 403to the selected window. If @var{window} is an internal window, the
428If @var{window} is internal the return value is the sum of heights of 404return value is the total height occupied by its descendant windows.
429@var{window}'s child windows for a vertical combination and the height
430of @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
434This function returns the total number of columns of @var{window}. 408This 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
436return value includes any vertical dividers or scrollbars of 410to the selected window. If @var{window} is internal, the return value
437@var{window}. On a window-system the return value also includes the 411is the total width occupied by its descendant windows.
438space 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
441of @var{window}'s first child otherwise.
442@end defun
443
444The total height of any window is usually less than the height of the
445window's frame, because the latter may also include the minibuffer
446window. Depending on the toolkit in use, the frame height can also
447include the menu bar and the tool bar (@pxref{Size and Position}).
448Therefore, in general it is not straightforward to compare window and
449frame heights. The following function is useful to determine whether
450there 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 415This function returns either the total height or width of the window
454This 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
455or below @var{window} on the containing frame. More precisely, this 417equivalent to calling @code{window-total-height} for @var{window};
456function returns @code{t} if and only if the total height of 418otherwise 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}.
458and Frames}) of @var{window}'s frame. The @var{window} argument may
459denote 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
463The following function can be used to determine whether there are no 423@cindex full-height window
464other windows on the left or right of a specified window. 424 The following functions can be used to determine whether a given
425window has any adjacent windows.
426
427@defun window-full-height-p &optional window
428This function returns non-@code{nil} if @var{window} has no other
429window above or below it in its frame, i.e. its total height equals
430the total height of the root window on that frame. If @var{window} is
431omitted 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
467This function returns non-@code{nil} if there are no other windows on 435This function returns non-@code{nil} if @var{window} has no other
468the left or right of @var{window}; @code{nil} otherwise. More 436window to the left or right in its frame, i.e. its total width equals
469precisely, this function returns @code{t} if and only if the total width 437that of the root window on that frame. If @var{window} is omitted or
470of @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}
472argument 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 443window relative to the window area of its frame:
478combination 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
481This function returns the top line of @var{window}. The argument 446This 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,
448the 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
450window.
483@end defun 451@end defun
484 452
485@defun window-left-column &optional window 453@defun window-left-column &optional window
486This function returns the left column of @var{window}. The argument 454This function returns the distance, in columns, between the left edge
487@var{window} can denote any window and defaults to the selected one. 455of @var{window} and the left edge of the frame's window area. For
456instance, 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
458to the selected window.
488@end defun 459@end defun
489 460
490For a frame displaying one window only, that window's top line and left
491column are both zero. When a frame displays a window @var{WB} below a
492window @var{WA}, the top line of @var{WB} can be calculated by adding
493the total height of @var{WA} to the top line of @var{WA}. When a frame
494displays a window @var{WR} on the right of a window @var{WL}, the left
495column 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
500The @dfn{body height of a window} is specified as the total number of
501lines occupied by the window's text area. Mode or header lines are not
502included 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
506The @dfn{body width of a window} denotes the total number of columns
507occupied by the window's text area. Scroll bars or columns of @samp{|}
508characters that separate side-by-side windows are not included in a
509window'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,
514The following functions retrieve height and width of the body of a 468which does not include the mode or header line. Similarly, the
515live 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
516in @dfn{canonical units}, i.e.@: for the default frame's face. If the 470the scroll bar, fringes, or margins.
517window shows some characters with non-default face, e.g., if the font
518of some characters is larger or smaller than the default font, the
519values returned by these functions will not match the actual number of
520lines or characters per line shown in the window. To get the actual
521number 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
523window (e.g., with @code{window-end}), and use @code{posn-at-point} to
524find the line or column there.
525
526@defun window-body-size &optional window horizontal
527This 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.
529The return value does not count any mode or header line of @var{window}.
530
531Optional argument @var{horizontal} non-@code{nil} means to return the
532number of columns of @var{window}'s text area. In this case the return
533value 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
535number of columns used for @var{window}'s fringes or display margins
536either.
537@end defun
538 471
539@defun window-body-height &optional window 472@defun window-body-height &optional window
540This function returns the number of lines of @var{window}'s body. 473This 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
475to the selected window; otherwise it must be a live window.
542 476
543The return value does not include @var{window}'s mode line and header 477If there is a partially-visible line at the bottom of the text area,
544line, if any. If a line at the bottom of the window is only partially 478that counts as a whole line; to exclude such a partially-visible line,
545visible, that line is included in the return value. If you do not 479use @code{window-text-height}, below.
546want to include a partially visible bottom line in the return value,
547use @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
551This function returns the number of columns of @var{window}'s body. 483This 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 485to the selected window; otherwise it must be a live window.
554The return value does not include any vertical dividers or scroll bars
555owned by @var{window}. On a window-system the return value does not
556include the number of columns used for @var{window}'s fringes or
557display margins either.
558@end defun 486@end defun
559 487
560The following functions have been used in earlier versions of Emacs. 488@defun window-body-size &optional window horizontal
561They are still supported but due to the confusing nomenclature they 489This function returns the body height or body width of @var{window}.
562should not be used any more in future code. 490If @var{horizontal} is omitted or @code{nil}, it is equivalent to
563 491calling @code{window-body-height} for @var{window}; otherwise it is
564@defun window-height &optional window 492equivalent to calling @code{window-body-width}.
565This 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
569This function is an alias for `window-body-width', see above. 496This function is like @code{window-body-height}, except that any
497partially-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
574height 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 503aliases are considered obsolete and will be removed in the future.
576request to make a window smaller than specified here will usually result
577in an error.
578
579@defopt window-min-height
580The value of this variable specifies how short a window may be. The
581value is measured in line units and has to account for any header or
582mode line. The default value for this option is @code{4}. Values less
583than @code{1} are ignored.
584@end defopt
585
586@defopt window-min-width
587The value of this variable specifies how narrow a window may be. The
588value is measured in characters and includes any margins, fringes,
589scroll bar and vertical divider column. The default value for this
590option is @code{10}. A value less than @code{2} is ignored.
591@end defopt
592
593Applications should not rebind these variables. To shrink a specific
594window to a height or width less than the one specified here, they
595should rather invoke @code{window-resize} (@pxref{Resizing Windows})
596with a non-@code{nil} @var{ignore} argument. The function
597@code{split-window} (@pxref{Splitting Windows}) can make a window
598smaller than specified here by calling it with a non-@code{nil}
599@var{size} argument. Interactively, the values specified here cannot be
600overridden.
601
602 Earlier versions of Emacs could delete a window when its size dropped
603below @code{window-min-height} or @code{window-min-width}. As a rule,
604the current version of Emacs does no more delete windows by side-effect.
605The only exception to this rule are requests to resize a frame which may
606implicitly delete windows when they do not fit on the frame any more,
607see @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}),
507or split them (@pxref{Splitting Windows}), obey the variables
508@code{window-min-height} and @code{window-min-width}, which specify
509the smallest allowable window height and width. @xref{Change
510Window,,Deleting and Rearranging Windows, emacs, The GNU Emacs
511Manual}. They also obey the variable @code{window-size-fixed}, with
512which a window can be @dfn{fixed} in size:
513
613@defvar window-size-fixed 514@defvar window-size-fixed
614If this variable is non-@code{nil}, in a given buffer, then the size of 515If this buffer-local variable is non-@code{nil}, the size of any
615any window displaying that buffer remains fixed unless you either 516window displaying the buffer cannot normally be changed. Deleting a
616explicitly change it or Emacs has no other choice. 517window or changing the frame's size may still change its size, if
518there is no choice.
617 519
618If the value is @code{height}, then only the window's height is fixed; 520If the value is @code{height}, then only the window's height is fixed;
619if the value is @code{width}, then only the window's width is fixed. 521if the value is @code{width}, then only the window's width is fixed.
620Any other non-@code{nil} value fixes both the width and the height. 522Any other non-@code{nil} value fixes both the width and the height.
621
622This variable automatically becomes buffer-local when set.
623@end defvar 523@end defvar
624 524
625Commands 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 526This function returns a non-@code{nil} value if @var{window}'s height
627had to change a window size which is fixed. Other functions like 527is fixed. If @var{window} is omitted or @code{nil}, it defaults to
628@code{window-resize} (@pxref{Resizing Windows}) have an optional 528the selected window. If the optional argument @var{horizontal} is
629@var{ignore} argument which allows to change the size of fixed-size 529non-@code{nil}, the return value is non-@code{nil} if @var{window}'s
630windows. 530width is fixed.
531
532A @code{nil} return value does not necessarily mean that @var{window}
533can be resized in the desired direction. To determine that, use the
534function @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
633fixed-size window, if there is no other alternative. 538position in pixels. Though mostly useful on graphical displays, they
539can also be called on text-only terminals, where the screen area of
540each 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
636when the height of all these windows is fixed. Its width cannot be 543This function return a list of pixel coordinates for the edges of
637changed 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
638Similarly, the width of a horizontal combination of windows cannot be 545to the selected window.
639changed when the width of all these windows is fixed. Its height cannot
640be 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 547The return value has the form @code{(@var{left} @var{top} @var{right}
643window is fixed. 548@var{bottom})}. The list elements are, respectively, the X coordinate
549of the left window edge, the Y coordinate of the top edge, one more
550than the X coordinate of the right edge, and one more than the Y
551coordinate of the bottom edge. The origin coordinate @samp{(0,0)} is
552taken to be the top left corner of the frame's window area.
644 553
645@defun window-size-fixed-p &optional window horizontal 554These edge values include the space used by the window's scroll bar,
646This function returns non-@code{nil} if @var{window}'s height is fixed. 555margins, fringes, header line, and mode line, if any.
647The argument @var{window} can be an arbitrary window and defaults to the 556@end defun
648selected one. Optional argument @var{horizontal} non-@code{nil} means
649return non-@code{nil} if @var{window}'s width is fixed.
650 557
651If 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 559This function is like @code{window-pixel-edges}, except that it
653@code{window-resizable} (@pxref{Resizing Windows}) can tell that. 560returns the edge coordinates for the window's text area, rather than
561the edge coordinates for the window itself. @var{window} must specify
562a live window.
654@end defun 563@end defun
655 564
565@defun window-absolute-pixel-edges &optional window
566This function is like @code{window-pixel-edges}, except that it
567returns the edge coordinates relative to the top left corner of the
568display screen.
569@end defun
570
571@defun window-inside-absolute-pixel-edges &optional window
572This function is like @code{window-inside-pixel-edges}, except that it
573returns the edge coordinates relative to the top left corner of the
574display 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
664Emacs does not permit overlapping windows or gaps between windows, so 584 This section describes functions for resizing a window without
665changing the size of a window always affects at least one other window. 585changing the size of its frame. Because live windows do not overlap,
666When a frame contains just one window, that window can be resized only 586these functions are meaningful only on frames that contain two or more
667by resizing the window's frame. The functions described below are 587windows: resizing a window also changes the size of a neighboring
668therefore meaningful only in the context of a frame containing at least 588window. If there is just one window on a frame, its size cannot be
669two windows. The size of the corresponding frame never changes when 589changed except by resizing the frame (@pxref{Size and Position}).
670invoking 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 592arguments. Resizing an internal window causes its child windows to be
673a time. This means that windows can be resized only either vertically 593resized to fit the same space.
674or horizontally. If a window shall be resized in both dimensions, it 594
675must be resized in one dimension first and in the other dimension 595@defun window-resizable window delta &optional horizontal ignore
676afterwards. If the second resize operation fails, the frame might end
677up in an unsatisfactory state. To avoid such states, it might be useful
678to save the current window configuration (@pxref{Window Configurations})
679before attempting the first resize operation and restore the saved
680configuration in case the second resize operation fails.
681
682 Functions that resize windows are supposed to obey restrictions
683imposed by window minimum sizes and fixed-size windows, see @ref{Window
684Sizes}. In order to determine whether resizing a specific window is
685possible in the first place, the following function can be used:
686
687@defun window-resizable window delta &optional horizontal ignore side noup nodown
688This function returns @var{delta} if the size of @var{window} can be 596This function returns @var{delta} if the size of @var{window} can be
689changed vertically by @var{delta} lines. Optional argument 597changed 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
692return value of zero means that @var{window} is not resizable. 600does not actually change the window size.
693 601
694If @var{delta} is a positive number, this means that @var{window} shall 602If @var{window} is @code{nil}, it defaults to the selected window.
695be enlarged by @var{delta} lines or columns. If @var{window} cannot be 603
696enlarged by @var{delta} lines or columns, this function returns the 604A positive value of @var{delta} means to check whether the window can be
697maximum value in the range from 0 to @var{delta} by which @var{window} 605enlarged by that number of lines or columns; a negative value of
698can be enlarged. 606@var{delta} means to check whether the window can be shrunk by that many
699 607lines or columns. If @var{delta} is non-zero, a return value of 0 means
700If @var{delta} is a negative number, this means that @var{window} shall 608that the window cannot be resized.
701be shrunk by -@var{delta} lines or columns. If @var{window} cannot be 609
702shrunk by -@var{delta} lines or columns, this function returns the 610Normally, the variables @code{window-min-height} and
703minimum 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.
704shrinking @var{window}. 612@xref{Change Window,, Deleting and Rearranging Windows, emacs, The GNU
705 613Emacs Manual}. However, if the optional argument @var{ignore} is
706Optional argument @var{ignore} non-@code{nil} means ignore any 614non-@code{nil}, this function ignores @code{window-min-height} and
707restrictions 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 616Instead, it considers the minimum-height window to be one consisting
709minimum height of a window is specified as the minimum number of lines 617of a header (if any), a mode line, plus a text area one line tall; and
710that allow viewing any header or mode line and at least one line of the 618a minimum-width window as one consisting of fringes, margins, and
711text area of window. The minimum width of a window includes any 619scroll bar (if any), plus a text area two columns wide.
712fringes, margins and the scroll bar as well as two text columns. 620@end defun
713
714If @var{ignore} denotes a window, this means to ignore restrictions for
715that window only. If @var{ignore} equals the constant @code{safe}, this
716means a live window may get as small as one line or two columns.
717
718Optional argument @var{noup} non-@code{nil} means don't go up in the
719window tree but try to steal or distribute the space needed for the
720resize operation among the other windows within @var{window}'s
721combination. Optional argument @var{nodown} non-@code{nil} means don't
722check whether @var{window} itself and its subwindows can be resized.
723@end defun
724
725The function @code{window-resizable} does not change any window sizes.
726The following function does:
727 621
728@defun window-resize window delta &optional horizontal ignore 622@defun window-resize window delta &optional horizontal ignore
729This function resizes @var{window} vertically by @var{delta} lines. The 623This function resizes @var{window} by @var{delta} increments. If
730argument @var{window} can denote an arbitrary window and defaults to the 624@var{horizontal} is @code{nil}, it changes the height by @var{delta}
731selected one. An attempt to resize the root window of a frame will 625lines; otherwise, it changes the width by @var{delta} columns. A
732raise an error. 626positive @var{delta} means to enlarge the window, and a negative
733 627@var{delta} means to shrink it.
734Second argument @var{delta} a positive number means @var{window} shall
735be enlarged by @var{delta} lines. If @var{delta} is negative, that
736means @var{window} shall be shrunk by -@var{delta} lines.
737
738Optional argument @var{horizontal} non-@code{nil} means to resize
739@var{window} horizontally by @var{delta} columns. In this case a
740positive @var{delta} means enlarge @var{window} by @var{delta} columns.
741A negative @var{delta} means @var{window} shall be shrunk by
742-@var{delta} columns.
743
744Optional argument @var{ignore} has the same meaning as for the function
745@code{window-resizable} above.
746
747This function can simultaneously move two edges of WINDOW. Exactly
748which edges of @var{window} are moved and which other windows are
749resized along with @var{window} is determined by the splits and nest
750status of the involved windows (@pxref{Splitting Windows}). If only the
751low (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
755The next four commands are simple interfaces to @code{window-resize}.
756They always operate on the selected window, never delete any window, and
757always raise an error when resizing would violate a restriction imposed
758by @code{window-min-height}, @code{window-min-width}, or
759@code{window-size-fixed}.
760
761@deffn Command enlarge-window delta &optional horizontal
762This function makes the selected window @var{delta} lines taller.
763Interactively, if no argument is given, it makes the selected window one
764line taller. If optional argument @var{horizontal} is non-@code{nil},
765it makes the selected window wider by @var{delta} columns. If
766@var{delta} is negative, it shrinks the selected window by -@var{delta}
767lines or columns. The return value is @code{nil}.
768@end deffn
769 628
770@deffn Command enlarge-window-horizontally delta 629If @var{window} is @code{nil}, it defaults to the selected window. If
771This function makes the selected window @var{delta} columns wider. 630the window cannot be resized as demanded, an error is signaled.
772Interactively, if no argument is given, it makes the selected window one
773column wider.
774@end deffn
775 631
776@deffn Command shrink-window delta &optional horizontal 632The optional argument @var{ignore} has the same meaning as for the
777This function makes the selected window @var{delta} lines smaller. 633function @code{window-resizable} above.
778Interactively, if no argument is given, it makes the selected window one
779line smaller. If optional argument @var{horizontal} is non-@code{nil},
780it makes the selected window narrower by @var{delta} columns. If
781@var{delta} is negative, it enlarges the selected window by -@var{delta}
782lines or columns. The return value is @code{nil}.
783@end deffn
784 634
785@deffn Command shrink-window-horizontally delta 635The choice of which window edge this function alters depends on the
786This function makes the selected window @var{delta} columns narrower. 636splitting and nesting status of the involved windows; in some cases,
787Interactively, if no argument is given, it makes the selected window one 637it may alter both edges. @xref{Splitting Windows}. To resize by
788column narrower. 638moving 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
791The following function is useful for moving the line dividing two 642@c The commands enlarge-window, enlarge-window-horizontally,
792windows. 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
795This function moves @var{window}'s bottom edge by @var{delta} lines. 647This function moves @var{window}'s bottom edge by @var{delta} lines.
796Optional argument @var{horizontal} non-@code{nil} means to move 648If optional argument @var{horizontal} is non-@code{nil}, it instead
797@var{window}'s right edge by @var{delta} columns. The argument 649moves 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
800If @var{delta} is greater zero, this moves the edge downwards or to the 652A positive @var{delta} moves the edge downwards or to the right; a
801right. If @var{delta} is less than zero, this moves the edge upwards or 653negative @var{delta} moves it upwards or to the left. If the edge
802to the left. If the edge can't be moved by @var{delta} lines or columns, 654cannot be moved as far as specified by @var{delta}, this function
803it is moved as far as possible in the desired direction but no error is 655moves it as far as possible but does not signal a error.
804signalled.
805 656
806This function tries to resize windows adjacent to the edge that is 657This function tries to resize windows adjacent to the edge that is
807moved. Only if this is insufficient, it will also resize windows not 658moved. If this is not possible for some reason (e.g. if that adjacent
808adjacent to that edge. As a consequence, if you move an edge in one 659window is fixed-size), it may resize other windows.
809direction and back in the other direction by the same amount, the
810resulting window configuration will not be necessarily identical to the
811one 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
663called 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
817This command makes @var{window} the right height to display its 666This command adjusts the height of @var{window} to fit the text in it.
818contents exactly. The default for @var{window} is the selected window. 667It 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
820The optional argument @var{max-height} specifies the maximum total 669defaults to the selected window. Otherwise, it should be a live
821height the window is allowed to be; @code{nil} means use the maximum 670window.
822permissible height of a window on @var{window}'s frame. The optional 671
823argument @var{min-height} specifies the minimum toatl height for the 672The optional argument @var{max-height}, if non-@code{nil}, specifies
824window; @code{nil} means use @code{window-min-height}. All these height 673the maximum total height that this function can give @var{window}.
825values include the mode line and/or header line. 674The optional argument @var{min-height}, if no-@code{nil}, specifies
826 675the minimum total height that it can give, which overrides the
827If the optional argument @var{override} is non-@code{nil}, this means to 676variable @code{window-min-height}.
828ignore any restrictions imposed by @code{window-min-height} and 677
829@code{window-min-width} on the size of @var{window}. 678If the optional argument @var{override} is non-@code{nil}, this
830 679function ignores any size restrictions imposed by
831This function returns non-@code{nil} if it orderly resized @var{window}, 680@code{window-min-height} and @code{window-min-width}.
832and @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
836This command shrinks @var{window} vertically to be as small as possible 684This command attempts to reduce @var{window}'s height as much as
837while still showing the full contents of its buffer---but not less than 685possible 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
839a live window and defaults to the selected one. 687the window was resized, and @code{nil} otherwise. If @var{window} is
840 688omitted or @code{nil}, it defaults to the selected window. Otherwise,
841However, this command does nothing if the window is already too small to 689it should be a live window.
842display the whole text of the buffer, or if part of the contents are 690
843currently scrolled off screen, or if the window is not the full width of 691This command does nothing if the window is already too short to
844its frame, or if the window is the only window in its frame. 692display all of its buffer, or if any of the buffer is scrolled
845 693off-screen, or if the window is the only live window in its frame.
846This command returns non-@code{nil} if it actually shrank the window
847and @code{nil} otherwise.
848@end deffn 694@end deffn
849 695
850@cindex balancing window sizes 696@cindex balancing window sizes
851Emacs provides two functions to balance windows, that is, to even out
852the sizes of all windows on the same frame. The minibuffer window and
853fixed-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
856This function balances windows in a way that gives more space to 698This function balances windows in a way that gives more space to
857full-width and/or full-height windows. If @var{window-or-frame} 699full-width and/or full-height windows. If @var{window-or-frame}
858specifies a frame, it balances all windows on that frame. If 700specifies 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
860its siblings (@pxref{Windows and Frames}) only. 702and 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
864This function attempts to give all windows on the selected frame 706This function attempts to give all windows on the selected frame
865approximately the same share of the screen area. This means that 707approximately the same share of the screen area. Full-width or
866full-width or full-height windows are not given more space than other 708full-height windows are not given more space than other windows.
867windows.
868@end deffn 709@end deffn
869 710
870@cindex maximizing windows 711@cindex maximizing windows
871The following function can be used to give a window the maximum possible
872size without deleting other ones.
873
874@deffn Command maximize-window &optional window 712@deffn Command maximize-window &optional window
875This function maximizes @var{window}. More precisely, this makes 713This function attempts to make @var{window} as large as possible, in
876@var{window} as large as possible without resizing its frame or deleting 714both dimensions, without resizing its frame or deleting other windows.
877other windows. @var{window} can be any window and defaults to the 715If @var{window} is omitted or @code{nil}, it defaults to the selected
878selected one. 716window.
879@end deffn 717@end deffn
880 718
881@cindex minimizing windows 719@cindex minimizing windows
882To make a window as small as possible without deleting it the
883following function can be used.
884
885@deffn Command minimize-window &optional window 720@deffn Command minimize-window &optional window
886This function minimizes @var{window}. More precisely, this makes 721This function attempts to make @var{window} as small as possible, in
887@var{window} as small as possible without deleting it or resizing its 722both dimensions, without deleting it or resizing its frame. If
888frame. @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
724window.
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
897The functions described below are the primitives needed for creating a 733This section describes functions for creating a new window by
898new 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
900previously 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
903This function creates a new window adjacent to @var{window}. It returns 737This function creates a new live window next to the window
904the 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
905can denote any window and defaults to the selected one. This function 739to the selected window. That window is ``split'', and reduced in
906does not change the selected window. 740size. The space is taken up by the new window, which is returned.
907 741
908Optional second argument @var{size} a positive number means make 742The 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},
910negative, make the new window @minus{}@var{size} lines (or columns) 744both windows are given equal sizes; if there is an odd line, it is
911tall. If @var{size} is omitted or @code{nil}, then @var{window} is 745allocated to the new window. If @var{size} is a positive number,
912divided 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
913allocated to the new window.) 747value of @var{side}). If @var{size} is a negative number, the new
914 748window is given @minus{}@var{size} lines (or columns).
915If splitting would result in making a window smaller than 749
916@code{window-min-height} or @code{window-min-width} (@pxref{Window 750If @var{size} is @code{nil}, this function obeys the variables
917Sizes}), this function usually signals an error. However, if @var{size} 751@code{window-min-height} and @code{window-min-width}. @xref{Change
918is non-@code{nil} and valid, a new window of the requested size is 752Window,,Deleting and Rearranging Windows, emacs, The GNU Emacs
919created. (A size value would be invalid if it assigned less than one 753Manual}. Thus, it signals an error if splitting would result in
920line or less than two columns to the new window.) 754making a window smaller than those variables specify. However, a
921 755non-@code{nil} value for @var{size} causes those variables to be
922Optional third argument @var{side} @code{nil} (or @code{below}) 756ignored; in that case, the smallest allowable window is considered to
923specifies that the new window shall be located below @var{window}. The 757be one that has space for a text area one line tall and/or two columns
924value @code{above} means the new window will be located above 758wide.
925@var{window}. In both cases @var{size} specifies the new number of 759
926lines for @var{window} (or the new window if @var{size} is negative) 760The optional third argument @var{side} determines the position of the
927including space reserved for the mode and/or header line. 761new 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
929If @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
930positioned on the right side of @var{window}. The value @code{left} 764these cases, @var{size} specifies a total window height, in lines.
931means the new window will be located on the left side of @var{window}. 765
932In both cases @var{size} specifies the new number of columns for 766If @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) 767the right of @var{window}. If @var{side} is @code{left}, the new
934including space reserved for margins, fringes and the scroll bar or a 768window is placed on the left of @var{window}. In both these cases,
935divider column. 769@var{size} specifies a total window width, in columns.
936 770
937Any other non-@code{nil} value for @var{side} is currently handled like 771If @var{window} is a live window, the new window inherits various
938@code{t} (or @code{right}). Since this might change in the future, 772properties from it, including margins and scroll bars. If
939application programs should refrain from using other values. 773@var{window} is an internal window, the new window inherits the
940 774properties of the window selected within @var{window}'s frame.
941If @var{window} is live, properties of the new window like margins and 775
942scroll bars are inherited from @var{window}. If @var{window} is an 776If the variable @code{ignore-window-parameters} is non-@code{nil}
943internal window, these properties, as well as the buffer shown in the 777(@pxref{Window Parameters}), this function ignores window parameters.
944new window, are inherited from the window selected on @var{window}'s 778Otherwise, it consults the @code{split-window} parameter of
945frame. 779@var{window}; if this is @code{t}, it splits the window disregarding
946 780any other window parameters. If the @code{split-window} parameter
947If @code{ignore-window-parameters} is non-@code{nil}, this function 781specifies a function, that function is called with the arguments
948ignores window parameters (@pxref{Window Parameters}). Otherwise, if 782@var{window}, @var{size}, and @var{side} to split @var{window}, in
949the @code{split-window} parameter of @var{window} is @code{t}, it splits 783lieu of the usual action of @code{split-window}.
950the window disregarding any other window parameters. If the
951@code{split-window} parameter specifies a function, that function is
952called with the arguments @var{window}, @var{size}, and @var{side} to
953split @var{window}. If that function is @code{ignore}, nothing is done.
954@end deffn 784@end deffn
955 785
956The 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
957lines high by 80 columns wide; then it splits the window. 787that yields the window configuration discussed in @ref{Windows and
788Frames}. This example demonstrates splitting a live window as well as
789splitting an internal window. We begin with a frame containing a
790single window (a live root window), which we denote by @var{W4}.
791Calling @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
976The 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
992Next, 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
1010Now 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
1027Normally, Emacs indicates the border between two side-by-side windows
1028with a scroll bar (@pxref{Scroll Bars}), or with @samp{|} characters. The
1029display table can specify alternative border characters; see @ref{Display
1030Tables}.
1031
1032Below we describe how @code{split-window} can be used to create the
1033window configuration from our earlier example (@pxref{Windows and
1034Frames}) and how internal windows are created for this purpose. We
1035start with a frame containing one live window @code{W2} (in the
1036following scenarios window names are assigned in an arbitrary manner in
1037order to match the names of the example). Evaluating the form
1038@code{(split-window W2 8 t)} creates a new internal window @code{W1}
1039with two children---@code{W2} (the window we've split) and a new leaf
1040window @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
1061Evaluating now @code{(split-window W6 -3)} creates another internal
1062window @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}
1064embedded 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
1085Finally, evaluating @code{(split-window W6 nil t)} should get us the
1086desired 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
1106The scenario sketched above is the standard way to obtain the desired
1107configuration. In Emacs 23 it was also the only way to do that since
1108Emacs 23 did't allow splitting internal windows.
1109
1110With 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
1112following 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
1133Evaluating now @code{(split-window (window-parent W6) -8 'left)} or, 811@noindent
1134equivalently, @code{(split-window W3 -8 'left)} should now produce the 812The @code{split-window} call has created a new live window, denoted by
1135penultimate configuration from the previous scenario from where we can 813@var{W5}. It has also created a new internal window, denoted by
1136continue 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
1139evaluating @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
1160Evaluating 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
1182The 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 818internal 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
1187windows @code{W6} and @code{W7} shown above. If we now evaluate
1188@code{(split-window W4 -8 'left)} or @code{(split-window (window-parent
1189W6) -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
1209Evaluating now @code{(split-window W4 -3)} or, for example, 838@noindent
1210@code{(split-window (window-parent W6) -3)} should produce the desired 839A new live window @var{W2} is created, to the left of the internal
1211configuration. 840window @var{W3}. A new internal window @var{W1} is created, becoming
841the 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
1217If this variable is nil, the function @code{split-window} can split a 847If this variable is @code{nil}, @code{split-window} can only split a
1218window if and only if that window's screen estate is sufficiently large 848window (denoted by @var{window}) if @var{window}'s screen area is
1219to accommodate both--itself and the new window. 849large enough to accommodate both itself and the new window. This is
850the default.
1220 851
1221If this variable is non-@code{nil}, @code{split-window} tries to resize 852If this variable is non-@code{nil}, @code{split-window} tries to
1222all windows that are part of the same combination as the old window to 853resize all windows that are part of the same combination as
1223accommodate the new window. Hence, the new window can be also created if 854@var{window}, in order to accommodate the new window. In particular,
1224the old window is of fixed size or too small to split (@pxref{Window 855this may allow @code{split-window} to succeed even if @var{window} is
1225Sizes}). 856a fixed-size window or too small to ordinarily split.
1226 857
1227In any case, the value of this variable is assigned to the splits status 858In any case, the value of this variable is assigned to the splits status
1228of the new window and, provided old and new window form a new 859of 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
1354The @dfn{nest status} of a window specifies whether that window may be 985The @dfn{nest status} of a window specifies whether that window may be
1355removed and its subwindows recombined with that window's siblings when 986removed and its child windows recombined with that window's siblings
1356such a sibling's subwindow is deleted. The nest status is initially 987when such a sibling's child window is deleted. The nest status is
1357assigned by @code{split-window} from the current value of the variable 988initially assigned by @code{split-window} from the current value of the
1358@code{window-nest} (see above) and can be reset by the function 989variable @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
1361If the return value is @code{nil}, subwindows of @var{window} may be 992If the return value is @code{nil}, child windows of @var{window} may be
1362recombined with @var{window}'s siblings when a window gets deleted. A 993recombined with @var{window}'s siblings when a window gets deleted. A
1363return value of @code{nil} means that subwindows of @var{window} are 994return value of @code{nil} means that child windows of @var{window} are
1364never (re-)combined with @var{window}'s siblings in such a case. 995never (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
1604This function deletes all windows showing @var{buffer-or-name} and 1235This function deletes all windows showing @var{buffer-or-name}. If
1605returns nil. If there are no windows showing @var{buffer-or-name}, it 1236there are no windows showing @var{buffer-or-name}, it does nothing.
1606does nothing. The optional argument @var{buffer-or-name} may be a 1237The optional argument @var{buffer-or-name} may be a buffer or the name
1607buffer or the name of an existing buffer and defaults to the current 1238of an existing buffer and defaults to the current buffer. Invoking
1608buffer. Invoking this command on a minibuffer signals an error. 1239this command on a minibuffer signals an error.
1609 1240
1610The function @code{delete-windows-on} operates by calling 1241The 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
1835The following function returns a copy of the list of windows in the 1466The following function returns a copy of the list of windows in the
1836cyclic odering. 1467cyclic 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
1839This function returns a list of live windows. The optional arguments 1470This 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.
1843The optional argument @var{window} specifies the first window to list 1474The optional argument @var{window} specifies the first window to list
1844and defaults to the selected window. If @var{window} is not on the list 1475and defaults to the selected window. If @var{window} is not on the list
1845of windows returned, some other window will be listed first but no error 1476of windows returned, some other window will be listed first but no error
1846is signalled. 1477is signaled.
1847@end defun 1478@end defun
1848 1479
1849The functions described below use @code{window-list-1} for generating a 1480The 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
1956returns @code{nil}. The argument @var{window} has to denote a live 1587returns @code{nil}. The argument @var{window} has to denote a live
1957window and defaults to the selected one. The argument 1588window 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
1959buffer. An error is signalled when @var{window} is @dfn{strongly} 1590buffer. An error is signaled when @var{window} is @dfn{strongly}
1960dedicated to its buffer (@pxref{Dedicated Windows}) and does not already 1591dedicated to its buffer (@pxref{Dedicated Windows}) and does not already
1961display @var{buffer-or-name}. 1592display @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,
2044that window is deleted. If that window is the only window on its frame 1675that window is deleted. If that window is the only window on its frame
2045and there are other frames on the frame's terminal, that frame is dealt 1676and there are other frames on the frame's terminal, that frame is dealt
2046with by the function spcecified by @code{frame-auto-hide-function} 1677with 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
2048function @code{switch-to-prev-buffer} (@pxref{Window History}) is 1679function @code{switch-to-prev-buffer} (@pxref{Window History}) is
2049displayed in the window instead. 1680displayed 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
2165display, and displays a specified buffer in that window. It can be 1796display, and displays a specified buffer in that window. It can be
2166called interactively, via the key binding @kbd{C-x 4 o}. It is also 1797called interactively, via the key binding @kbd{C-x 4 C-o}. It is also
2167used as a subroutine by many functions and commands, including 1798used 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
2169Buffers}). 1800Buffers}).
@@ -2221,7 +1852,7 @@ The constant @code{display-buffer-fallback-action}.
2221@noindent 1852@noindent
2222Each action function is called in turn, passing the buffer as the 1853Each action function is called in turn, passing the buffer as the
2223first argument and the combined action alist as the second argument, 1854first argument and the combined action alist as the second argument,
2224until one of the functions returns non-nil. 1855until one of the functions returns non-@code{nil}.
2225 1856
2226The argument @var{action} can also have a non-@code{nil}, non-list 1857The argument @var{action} can also have a non-@code{nil}, non-list
2227value. This has the special meaning that the buffer should be 1858value. 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.
2272This function tries to display @var{buffer} in the selected window. 1903This function tries to display @var{buffer} in the selected window.
2273It fails if the selected window is a minibuffer window or is dedicated 1904It fails if the selected window is a minibuffer window or is dedicated
2274to another buffer (@pxref{Dedicated Windows}). It also fails if 1905to 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
3281displayed at a specified vertical position within the window. It does 2912displayed at a specified vertical position within the window. It does
3282not ``move point'' with respect to the text. 2913not ``move point'' with respect to the text.
3283 2914
3284If @var{count} is a nonnegative number, that puts the line containing 2915If @var{count} is a non-negative number, that puts the line containing
3285point @var{count} lines down from the top of the window. If 2916point @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
3287bottom of the window, so that @minus{}1 stands for the last usable 2918bottom of the window, so that @minus{}1 stands for the last usable
@@ -3740,7 +3371,7 @@ selected one.
3740 3371
3741The optional argument @var{ignore} non-@code{nil} means to ignore 3372The optional argument @var{ignore} non-@code{nil} means to ignore
3742minimum window sizes and fixed size restrictions. If @var{ignore} 3373minimum window sizes and fixed size restrictions. If @var{ignore}
3743equals @code{safe}, this means subwindows can get as small as one line 3374equals @code{safe}, this means windows can get as small as one line
3744and/or two columns. 3375and/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:
182If you don't customize @code{auth-sources}, you'll have to live with 182If you don't customize @code{auth-sources}, you'll have to live with
183the defaults: any host and any port are looked up in the netrc 183the defaults: any host and any port are looked up in the netrc
184file @code{~/.authinfo.gpg}, which is a GnuPG encrypted file 184file @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
187If that fails, the unencrypted netrc files @code{~/.authinfo} and 187If 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
342If you want your GnuPG passwords to be cached, set up @code{gpg-agent} 342If you want your GnuPG passwords to be cached, set up @code{gpg-agent}
343or EasyPG Assitant 343or EasyPG Assistant
344(@pxref{Caching Passphrases, , Caching Passphrases, epa}). 344(@pxref{Caching Passphrases, , Caching Passphrases, epa}).
345 345
346To quick start, here are some questions: 346To 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,
1001you can press @kbd{RET} on a defined server to see all the groups it 1001you can press @kbd{RET} on a defined server to see all the groups it
1002serves (subscribed or not!). You can also add or delete servers, edit 1002serves (subscribed or not!). You can also add or delete servers, edit
1003a foreign server's definition, agentize or de-agentize a server, and 1003a foreign server's definition, agentize or de-agentize a server, and
1004do many other neat things. @xref{Server Buffer}. 1004do 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
11806To use this, make sure that you have @code{w3m} and @code{curl} 11806To use this, make sure that you have @code{w3m} and @code{curl}
11807installed. If you have, then Gnus should display @acronym{HTML} 11807installed. If you have, then Gnus should display @acronym{HTML}
11808automatically. 11808automatically.
11809 11809
11810 11810
11811 11811
@@ -21078,8 +21078,8 @@ as well.
21078 21078
21079This chapter describes tools for searching groups and servers for 21079This chapter describes tools for searching groups and servers for
21080articles matching a query and then retrieving those articles. Gnus 21080articles matching a query and then retrieving those articles. Gnus
21081provides a simpler mechanism for searching through articles in a summary buffer 21081provides a simpler mechanism for searching through articles in a summary buffer
21082to find those matching a pattern. @xref{Searching for Articles}. 21082to 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
21111The @code{nnimap} and @code{gmane} search engines should work with no 21111The @code{nnimap} and @code{gmane} search engines should work with no
21112configuration. Other engines require a local index that needs to be 21112configuration. Other engines require a local index that needs to be
21113created and maintained outside of Gnus. 21113created 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
21150features. You can access these special features by giving a prefix-arg 21150features. You can access these special features by giving a prefix-arg
21151to @code{gnus-group-make-nnir-group}. If you are searching multiple 21151to @code{gnus-group-make-nnir-group}. If you are searching multiple
21152groups with different search engines you will be prompted for the 21152groups with different search engines you will be prompted for the
21153special search features for each engine separately. 21153special 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
21219The @code{imap} engine requires no configuration. 21219The @code{imap} engine requires no configuration.
21220 21220
21221Queries using the @code{imap} engine follow a simple query language. 21221Queries using the @code{imap} engine follow a simple query language.
21222The search is always case-insensitive and supports the following 21222The search is always case-insensitive and supports the following
21223features (inspired by the Google search input language): 21223features (inspired by the Google search input language):
21224 21224
@@ -21231,7 +21231,7 @@ operators must be written with all capital letters to be
21231recognised. Also preceding a term with a - sign is equivalent to NOT 21231recognised. Also preceding a term with a - sign is equivalent to NOT
21232term. 21232term.
21233 21233
21234@item Automatic AND queries 21234@item Automatic AND queries
21235If you specify multiple words then they will be treated as an AND 21235If you specify multiple words then they will be treated as an AND
21236expression intended to match all components. 21236expression 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
21267The @code{gmane} engine requires no configuration. 21267The @code{gmane} engine requires no configuration.
21268 21268
21269Gmane queries follow a simple query language: 21269Gmane 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
21282The search engine converts all text to utf-8, so searching should work 21282The search engine converts all text to utf-8, so searching should work
21283in any language. 21283in any language.
21284 21284
21285@item Stopwords 21285@item Stopwords
21286Common English words (like 'the' and 'a') are ignored by default. You 21286Common English words (like 'the' and 'a') are ignored by default. You
21287can override this by prefixing such words with a + (e.g. +the) or 21287can override this by prefixing such words with a + (e.g. +the) or
21288enclosing the word in quotes (e.g. "the"). 21288enclosing the word in quotes (e.g. "the").
@@ -21345,7 +21345,7 @@ to get a group name. By default this is @code{$HOME/Mail}.
21345Using the namazu engine requires creating and maintaining index files. 21345Using the namazu engine requires creating and maintaining index files.
21346One directory should contain all the index files, and nnir must be told 21346One directory should contain all the index files, and nnir must be told
21347where to find them by setting the @code{nnir-namazu-index-directory} 21347where to find them by setting the @code{nnir-namazu-index-directory}
21348variable. 21348variable.
21349 21349
21350To work correctly the @code{nnir-namazu-remove-prefix} variable must 21350To work correctly the @code{nnir-namazu-remove-prefix} variable must
21351also be correct. This is the prefix to remove from each file name 21351also be correct. This is the prefix to remove from each file name
@@ -21408,7 +21408,7 @@ this command periodically, say every four hours.
21408This engine is obsolete. 21408This 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
diff --git a/etc/NEWS b/etc/NEWS
index 5e7e6cbb47e..59fab6d9107 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -621,6 +621,10 @@ view-diary-entries, list-diary-entries, show-all-diary-entries
621inserted by the compilation filter function, when calling 621inserted by the compilation filter function, when calling
622compilation-filter-hook. 622compilation-filter-hook.
623 623
624*** `compilation-error-screen-columns' is obeyed in the editing buffer.
625So programming language modes can set it, whereas previously only the value
626in 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 @@
12011-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
62011-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
182011-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
342011-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
402011-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
482011-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
532011-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
592011-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
642011-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
712011-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
772011-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
872011-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
922011-11-07 Stefan Monnier <monnier@iro.umontreal.ca>
93
94 * files.el (find-file): Always use selected-window.
95
962011-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
1132011-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
12011-11-06 Chong Yidong <cyd@gnu.org> 1182011-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.
363Otherwise TYPE should be `defvar' or `defface'. 363Otherwise TYPE should be `defvar' or `defface'.
364If TYPE is nil, defaults using `function-called-at-point', 364If TYPE is nil, defaults using `function-called-at-point',
365otherwise uses `variable-at-point'." 365otherwise 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
2485G-F10: Paste Rectangle 2485G-F10: Paste Rectangle
2486 F11: ESC 2486 F11: ESC
2487 F12: Begining of Line +----------+----------+----------+----------+ 2487 F12: Beginning of Line +----------+----------+----------+----------+
2488G-F12: Delete Other Windows | GOLD | HELP | FNDNXT | DEL L | 2488G-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.
4687With prefix argument ARG, make the buffer read-only if ARG is 4687With prefix argument ARG, make the buffer read-only if ARG is
4688positive, otherwise make it writable. If buffer is read-only 4688positive, otherwise make it writable. If buffer is read-only
4689and `view-read-only' is non-nil, enter view mode." 4689and `view-read-only' is non-nil, enter view mode.
4690
4691This function is usually the wrong thing to use in a Lisp program.
4692It 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
4694are caused by text properties. To make a buffer read-only in Lisp code,
4695set `buffer-read-only'. To ignore read-only status (whether due to text
4696properties 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 @@
184912004-10-05 Jesper Harder <harder@ifa.au.dk> 184912004-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.
1391An alist with five entries, each for the different agenda types. The 1391An alist with five entries, each for the different agenda types. The
1392keys of the sublists are `agenda', `timeline', `todo', `search' and `tags'. 1392keys of the sublists are `agenda', `timeline', `todo', `search' and `tags'.
1393The values are format strings. 1393The values are format strings.
1394 1394
1395This format works similar to a printf format, with the following meaning: 1395This 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 `%'
1408and a whitespace/punctuation character just before the final letter. 1408and a whitespace/punctuation character just before the final letter.
1409 1409
1410If the first character after `%' is a question mark, the entire field 1410If the first character after `%' is a question mark, the entire field
1411will only be included if the corresponding value applies to the current 1411will only be included if the corresponding value applies to the current
1412entry. This is useful for fields which should have fixed width when 1412entry. This is useful for fields which should have fixed width when
1413present, but zero width when absent. For example, \"%?-12t\" will 1413present, but zero width when absent. For example, \"%?-12t\" will
1414result in a 12 character time field if a time of the day is specified, 1414result in a 12 character time field if a time of the day is specified,
1415but will completely disappear in entries which do not contain a time. 1415but will completely disappear in entries which do not contain a time.
1416 1416
1417If there is punctuation or whitespace character just before the final 1417If 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
1421empty, no additional colon would be inserted. 1421empty, no additional colon would be inserted.
1422 1422
1423The default value for the agenda sublist is \" %-12:c%?-12t% s\", 1423The default value for the agenda sublist is \" %-12:c%?-12t% s\",
1424which means: 1424which 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
1699With selected entries in an agenda buffer, `B R' will call 1699With selected entries in an agenda buffer, `B R' will call
1700the custom function `set-category' on the selected entries. 1700the custom function `set-category' on the selected entries.
1701Note that functions in this alist don't need to be quoted." 1701Note 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.
6481The current value of style is memorized (unless there is a memorized 6481The current value of style is memorized (unless there is a memorized
6482data already), may be restored by `cperl-set-style-back'. 6482data already), may be restored by `cperl-set-style-back'.
6483 6483
6484Chosing \"Current\" style will not change style, so this may be used for 6484Choosing \"Current\" style will not change style, so this may be used for
6485side-effect of memorizing only. Examples in `cperl-style-examples'." 6485side-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.
1964This 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.
949Accounts for continuation lines, multi-line strings, and 949Accounts for continuation lines, multi-line strings, and
950multi-line bracketed expressions." 950multi-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."
971Skip forward if FORWARD is non-nil, else backward. 961Skip forward if FORWARD is non-nil, else backward.
972If SYNTAX is non-nil it is the state returned by `syntax-ppss' at point. 962If SYNTAX is non-nil it is the state returned by `syntax-ppss' at point.
973Return non-nil if and only if skipping was done." 963Return 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://
425or svn+ssh://." 424or 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.
583The difference to vc-do-command is that this function always invokes `svn', 582The difference to vc-do-command is that this function always invokes `svn',
584and that it passes `vc-svn-global-switches' to it before FLAGS." 583and 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 584it 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.
73Return nil if WINDOW is the root window of its frame. WINDOW can 73Return nil if WINDOW is the root window of its frame. WINDOW can
74be any window." 74be 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.
79Return nil if WINDOW is the root window of its frame. WINDOW can 79Return nil if WINDOW is the root window of its frame. WINDOW can
80be any window." 80be 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.
105Otherwise, return nil; this includes the case where OBJECT is a 105Otherwise, return nil; this includes the case where OBJECT is a
106deleted window." 106deleted 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.
113BUFFER-OR-NAME must be either a buffer or a string naming a live 113BUFFER-OR-NAME must be either a buffer or a string naming a live
114buffer and defaults to the current buffer." 114buffer 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.
128FRAME must be a live frame and defaults to the selected frame." 128FRAME 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.
137If WINDOW is nil, return `selected-window'. 137If WINDOW is nil, return `selected-window'.
138If WINDOW is a live window or internal window, return WINDOW; 138If 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.
200If WINDOW is omitted or nil, it defaults to the selected window. 200If 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.
216If WINDOW is omitted or nil, it defaults to the selected window. 216If WINDOW is omitted or nil, it defaults to the selected window.
217If HORIZONTAL is non-nil, return the largest number of 217If HORIZONTAL is non-nil, return the largest number of
218horizontally arranged subwindows of WINDOW." 218windows 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.
283WINDOW defaults to the selected window. PROC must be a function 283WINDOW defaults to the selected window. PROC must be a function
284with one argument - a window. ANY, if non-nil means to run PROC 284with one argument - a window. By default, run PROC only on live
285on all live and internal subwindows of WINDOW. 285windows of the subtree. If the optional argument ANY is non-nil,
286run PROC on all live and internal windows of the subtree. If
287WINDOW is live, run PROC on WINDOW only.
286 288
287This function performs a pre-order, depth-first traversal of the 289This function performs a pre-order, depth-first traversal of the
288window tree rooted at WINDOW. If PROC changes that window tree, 290subtree rooted at WINDOW. If PROC changes that tree, the result
289the result is unpredictable." 291is 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.
383FRAME defaults to the selected frame. If an atomic window is 385FRAME defaults to the selected frame. If an atomic window is
384wrongly configured, reset the atomicity of all its subwindows to 386wrongly configured, reset the atomicity of all its windows on
385nil. An atomic window is wrongly configured if it has no 387FRAME to nil. An atomic window is wrongly configured if it has
386subwindows or one of its subwindows is not atomic." 388no 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
528window).") 530window).")
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
619columns can be added to WINDOW. A return value of zero means 621columns can be added to WINDOW. A return value of zero means
620that no lines (or columns) can be added to WINDOW. 622that no lines (or columns) can be added to WINDOW.
621 623
622This function looks only at WINDOW and its subwindows. The 624This function looks only at WINDOW and, recursively, its child
623function `window-resizable' looks at other windows as well. 625windows. The function `window-resizable' looks at other windows
626as well.
624 627
625DELTA positive means WINDOW shall be enlarged by DELTA lines or 628DELTA positive means WINDOW shall be enlarged by DELTA lines or
626columns. If WINDOW cannot be enlarged by DELTA lines or columns 629columns. 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.
657For the meaning of the arguments of this function see the 660For the meaning of the arguments of this function see the
658doc-string of `window-sizable'." 661doc-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
701non-nil if WINDOW's width is fixed. 704non-nil if WINDOW's width is fixed.
702 705
703If this function returns nil, this does not necessarily mean that 706If this function returns nil, this does not necessarily mean that
704WINDOW can be resized in the desired direction. The functions 707WINDOW 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
768tree but try to enlarge windows within WINDOW's combination only. 771tree but try to enlarge windows within WINDOW's combination only.
769 772
770Optional argument NODOWN non-nil means don't check whether WINDOW 773Optional argument NODOWN non-nil means don't check whether WINDOW
771itself \(and its subwindows) can be shrunk; check only whether at 774itself \(and its child windows) can be shrunk; check only whether
772least one other windows can be enlarged appropriately." 775at 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
850WINDOW's combination. 853WINDOW's combination.
851 854
852Optional argument NODOWN non-nil means do not check whether 855Optional argument NODOWN non-nil means do not check whether
853WINDOW itself \(and its subwindows) can be enlarged; check only 856WINDOW itself \(and its child windows) can be enlarged; check
854whether other windows can be shrunk appropriately." 857only 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.
867Optional argument HORIZONTAL non-nil means return DELTA if WINDOW 870Optional argument HORIZONTAL non-nil means return DELTA if WINDOW
868can be resized horizontally by DELTA columns. A return value of 871can be resized horizontally by DELTA columns. A return value of
869zero means that WINDOW is not resizable. 872zero means that WINDOW is not resizable.
870 873
871DELTA positive means WINDOW shall be enlarged by DELTA lines or 874DELTA positive means WINDOW shall be enlarged by DELTA lines or
872columns. If WINDOW cannot be enlarged by DELTA lines or columns 875columns. If WINDOW cannot be enlarged by DELTA lines or columns,
873return the maximum value in the range 0..DELTA by which WINDOW 876return the maximum value in the range 0..DELTA by which WINDOW
874can be enlarged. 877can be enlarged.
875 878
@@ -891,11 +894,12 @@ of or below WINDOW can be shrunk. Optional argument TRAIL
891shrunk. 894shrunk.
892 895
893Optional argument NOUP non-nil means don't go up in the window 896Optional argument NOUP non-nil means don't go up in the window
894tree but try to distribute the space among the other windows 897tree but check only whether space can be obtained from (or given
895within WINDOW's combination. 898to) WINDOW's siblings.
896 899
897Optional argument NODOWN non-nil means don't check whether WINDOW 900Optional argument NODOWN non-nil means don't go down in the
898and its subwindows can be resized." 901window tree. This means do not check whether resizing would
902violate 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.
911For the meaning of the arguments of this function see the 915For the meaning of the arguments of this function see the
912doc-string of `window-resizable'." 916doc-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.
922WINDOW can be any window and defaults to the selected one. The 926Optional argument HORIZONTAL non-nil means return DELTA if WINDOW
923return value includes WINDOW's mode line and header line, if any. 927can be resized horizontally by DELTA columns. A return value of
924If WINDOW is internal the return value is the sum of the total 928zero means that WINDOW is not resizable.
925number of lines of WINDOW's child windows if these are vertically 929
926combined and the height of WINDOW's first child otherwise. 930DELTA positive means WINDOW shall be enlarged by DELTA lines or
931columns. If WINDOW cannot be enlarged by DELTA lines or columns
932return the maximum value in the range 0..DELTA by which WINDOW
933can be enlarged.
934
935DELTA negative means WINDOW shall be shrunk by -DELTA lines or
936columns. If WINDOW cannot be shrunk by -DELTA lines or columns,
937return the minimum value in the range DELTA..0 that can be used
938for shrinking WINDOW.
939
940Optional argument IGNORE non-nil means ignore any restrictions
941imposed by fixed size windows, `window-min-height' or
942`window-min-width' settings. IGNORE a window means ignore
943restrictions for that window only. IGNORE equal `safe' means
944live windows may get as small as `window-safe-min-height' lines
945and `window-safe-min-width' columns."
946 (setq window (window-normalize-window window))
947 (window--resizable window delta horizontal ignore))
927 948
928Note: 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)) 951If WINDOW is omitted or nil, it defaults to the selected window.
952
953If HORIZONTAL is omitted or nil, return the total height of
954WINDOW, in lines, like `window-total-height'. Otherwise return
955the 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.
938More precisely, return t if and only if the total height of 966More precisely, return t if and only if the total height of
939WINDOW equals the total height of the root window of WINDOW's 967WINDOW 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.
948WINDOW can be any window and defaults to the selected one. The
949return value includes any vertical dividers or scrollbars of
950WINDOW. If WINDOW is internal, the return value is the sum of
951the total number of columns of WINDOW's child windows if these
952are horizontally combined and the width of WINDOW's first child
953otherwise."
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.
958More precisely, return t if and only if the total width of WINDOW 976More precisely, return t if and only if the total width of WINDOW
959equals the total width of the root window of WINDOW's frame. 977equals 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.
967WINDOW must be a live window and defaults to the selected one. 985If WINDOW is omitted or nil, it defaults to the selected window.
968 986Signal an error if the window is not live.
969The return value does not include WINDOW's mode line and header
970line, if any. If a line at the bottom of the window is only
971partially visible, that line is included in the return value. If
972you do not want to include a partially visible bottom line in the
973return value, use `window-text-height' instead.
974
975Note that the return value is measured in canonical units, i.e. for
976the default frame's face. If the window shows some characters with
977non-default face, e.g., if the font of some characters is larger or
978smaller than the default font, the value returned by this function
979will not match the actual number of lines shown in the window. To
980get 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.
985WINDOW must be a live window and defaults to the selected one.
986
987The return value does not include any vertical dividers or scroll
988bars owned by WINDOW. On a window-system the return value does
989not include the number of columns used for WINDOW's fringes or
990display margins either.
991 987
992Note that the return value is measured in canonical units, i.e. for 988If HORIZONTAL is omitted or nil, return the height of the text
993the default frame's face. If the window shows some characters with 989area, like `window-body-height'. Otherwise, return the width of
994non-default face, e.g., if the font of some characters is larger or 990the text area, like `window-body-width'."
995smaller than the default font, the value returned by this function 991 (if horizontal
996will not match the actual number of characters per line shown in the 992 (window-body-width window)
997window. 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.
1541HORIZONTAL non-nil means set the new normal width of these 1536HORIZONTAL non-nil means set the new normal width of these
1542windows. WINDOW specifies a subwindow of PARENT that has been 1537windows. WINDOW specifies a child window of PARENT that has been
1543resized by THIS-DELTA lines \(columns). 1538resized by THIS-DELTA lines \(columns).
1544 1539
1545Optional argument TRAIL either 'before or 'after means set values 1540Optional 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.
1638PARENT must be a vertically combined internal window. 1633PARENT must be a vertically combined internal window.
1639 1634
1640Optional argument HORIZONTAL non-nil means resize subwindows of 1635Optional argument HORIZONTAL non-nil means resize child windows of
1641PARENT horizontally by DELTA columns. In this case PARENT must 1636PARENT horizontally by DELTA columns. In this case PARENT must
1642be a horizontally combined internal window. 1637be 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,
1935preferably only resize windows adjacent to EDGE. 1930preferably only resize windows adjacent to EDGE.
1936 1931
1937This function recursively resizes WINDOW's subwindows to fit the 1932This function recursively resizes WINDOW's child windows to fit the
1938new size. Make sure that WINDOW is `window-resizable' before 1933new size. Make sure that WINDOW is `window--resizable' before
1939calling this function. Note that this function does not resize 1934calling this function. Note that this function does not resize
1940siblings of WINDOW or WINDOW's parent window. You have to 1935siblings of WINDOW or WINDOW's parent window. You have to
1941eventually call `window-resize-apply' in order to make resizing 1936eventually 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.
1979If DELTA is less than zero and we can't shrink WINDOW by DELTA 1974If DELTA is less than zero and we can't shrink WINDOW by DELTA
1980lines, shrink it as much as possible. If DELTA is greater than 1975lines, shrink it as much as possible. If DELTA is greater than
1981zero, this function can resize fixed-size subwindows in order to 1976zero, this function can resize fixed-size windows in order to
1982recover the necessary lines. 1977recover the necessary lines.
1983 1978
1984Return the number of lines that were recovered. 1979Return 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.
2214If the root window is not split, ROOT is the root window itself. 2209If the root window is not split, ROOT is the root window itself.
2215Otherwise, ROOT is a list (DIR EDGES W1 W2 ...) where DIR is nil 2210Otherwise, ROOT is a list (DIR EDGES W1 W2 ...) where DIR is nil
2216for a horizontal split, and t for a vertical split. EDGES gives 2211for a horizontal split, and t for a vertical split. EDGES gives
2217the combined size and position of the subwindows in the split, 2212the combined size and position of the child windows in the split,
2218and the rest of the elements are the subwindows in the split. 2213and the rest of the elements are the child windows in the split.
2219Each of the subwindows may again be a window or a list 2214Each of the child windows may again be a window or a list
2220representing a window split, and so on. EDGES is a list \(LEFT 2215representing a window split, and so on. EDGES is a list \(LEFT
2221TOP RIGHT BOTTOM) as returned by `window-edges'." 2216TOP 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.
3055Optional argument HORIZONTAL non-nil means return minimum width." 3050Optional 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.
3460WINDOW-OR-FRAME is optional and defaults to the selected frame. 3455WINDOW-OR-FRAME is optional and defaults to the selected frame.
3461If WINDOW-OR-FRAME denotes a frame, balance the sizes of all 3456If WINDOW-OR-FRAME denotes a frame, balance the sizes of all
3462subwindows of that frame's root window. If WINDOW-OR-FRAME 3457windows of that frame. If WINDOW-OR-FRAME denots a window,
3463denots a window, balance the sizes of all subwindows of that 3458recursively balance the sizes of all child windows of that
3464window." 3459window."
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
3844Optional argument IGNORE non-nil means ignore minimum window 3835Optional argument IGNORE non-nil means ignore minimum window
3845sizes and fixed size restrictions. IGNORE equal `safe' means 3836sizes and fixed size restrictions. IGNORE equal `safe' means
3846subwindows can get as small as `window-safe-min-height' and 3837windows 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
3948should choose or create a window, display the specified buffer in 3939should choose or create a window, display the specified buffer in
3949it, and return the window. 3940it, and return the window.
3950 3941
3951The function specified here is responsible for setting the 3942The specified function should call `display-buffer-record-window'
3952quit-restore and help-setup parameters of the window used." 3943with corresponding arguments to set up the quit-restore parameter
3944of 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
4224The function specified here is responsible for setting the 4217The specified function should call `display-buffer-record-window'
4225quit-restore and help-setup parameters of the window used." 4218with corresponding arguments to set up the quit-restore parameter
4219of 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'.
4817Call `special-display-p' on BUFFER's name, and if that returns 4810Call `special-display-p' on BUFFER's name, and if that returns
4818non-nil, call `special-display-function' on BUFFER." 4811non-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.
4970NORECORD, if non-nil means do not put this buffer at the front of 4965NORECORD, if non-nil means do not put this buffer at the front of
4971the list of recently selected ones." 4966the 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
62011-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
112011-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
152011-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
352011-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
432011-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
482011-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
542011-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
672011-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
62011-11-07 Kenichi Handa <handa@m17n.org> 742011-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
317static Lisp_Object Vdead; 317static 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
416struct gcpro *gcprolist; 421struct 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 {
diff --git a/src/ccl.c b/src/ccl.c
index cb96eece5ee..01943eddf58 100644
--- a/src/ccl.c
+++ b/src/ccl.c
@@ -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);
3006void set_vertical_scroll_bar (struct window *); 3006void set_vertical_scroll_bar (struct window *);
3007#endif 3007#endif
3008int try_window (Lisp_Object, struct text_pos, int); 3008int try_window (Lisp_Object, struct text_pos, int);
3009extern void window_box (struct window *, int, int *, int *, int *, int *); 3009void window_box (struct window *, int, int *, int *, int *, int *);
3010extern int window_box_height (struct window *); 3010int window_box_height (struct window *);
3011extern int window_text_bottom_y (struct window *); 3011int window_text_bottom_y (struct window *);
3012extern int window_box_width (struct window *, int); 3012int window_box_width (struct window *, int);
3013extern int window_box_left (struct window *, int); 3013int window_box_left (struct window *, int);
3014extern int window_box_left_offset (struct window *, int); 3014int window_box_left_offset (struct window *, int);
3015extern int window_box_right (struct window *, int); 3015int window_box_right (struct window *, int);
3016extern int window_box_right_offset (struct window *, int); 3016int window_box_right_offset (struct window *, int);
3017int estimate_mode_line_height (struct frame *, enum face_id); 3017int estimate_mode_line_height (struct frame *, enum face_id);
3018void pixel_to_glyph_coords (struct frame *, int, int, int *, int *, 3018void 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
167static Lisp_Object 167static Lisp_Object
168font_make_spec (void) 168font_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
55extern INTERVAL adjust_intervals_for_insertion (INTERVAL,
56 EMACS_INT, EMACS_INT);
57extern void adjust_intervals_for_deletion (struct buffer *,
58 EMACS_INT, EMACS_INT);
59
60static Lisp_Object merge_properties_sticky (Lisp_Object, Lisp_Object); 55static Lisp_Object merge_properties_sticky (Lisp_Object, Lisp_Object);
61static INTERVAL merge_interval_right (INTERVAL); 56static INTERVAL merge_interval_right (INTERVAL);
62static INTERVAL reproduce_tree (INTERVAL, INTERVAL); 57static 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
806INTERVAL 801static INTERVAL
807adjust_intervals_for_insertion (INTERVAL tree, EMACS_INT position, 802adjust_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
867INTERVAL 862static INTERVAL
868adjust_intervals_for_insertion (INTERVAL tree, 863adjust_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
1377void 1372static void
1378adjust_intervals_for_deletion (struct buffer *buffer, 1373adjust_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
1433inline void 1428void
1434offset_intervals (struct buffer *buffer, EMACS_INT start, EMACS_INT length) 1429offset_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
1885inline void 1880void
1886temp_set_point_both (struct buffer *buffer, 1881temp_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
1905inline void 1900void
1906temp_set_point (struct buffer *buffer, EMACS_INT charpos) 1901temp_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
2394inline void 2389void
2395copy_intervals_to_string (Lisp_Object string, struct buffer *buffer, 2390copy_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);
3155extern Lisp_Object make_temp_name (Lisp_Object, int); 3155extern Lisp_Object make_temp_name (Lisp_Object, int);
3156extern Lisp_Object Qdelete_file; 3156extern Lisp_Object Qdelete_file;
3157 3157
3158/* Defined in abbrev.c */
3159
3160extern void syms_of_abbrev (void);
3161
3162/* Defined in search.c */ 3158/* Defined in search.c */
3163extern void shrink_regexp_cache (void); 3159extern void shrink_regexp_cache (void);
3164EXFUN (Fstring_match, 3); 3160EXFUN (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
diff --git a/src/w32.c b/src/w32.c
index f17e987f437..c752333c68d 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -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.
505If WINDOW is omitted or nil, it defaults to the selected window. 505If WINDOW is omitted or nil, it defaults to the selected window.
506 506
507If the return value is nil, subwindows of WINDOW can be recombined with 507If the return value is nil, child windows of WINDOW can be recombined with
508WINDOW's siblings. A return value of non-nil means that subwindows of 508WINDOW's siblings. A return value of non-nil means that child windows of
509WINDOW are never \(re-)combined with WINDOW's siblings. */) 509WINDOW 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.
517If WINDOW is omitted or nil, it defaults to the selected window. 517If WINDOW is omitted or nil, it defaults to the selected window.
518 518
519If STATUS is nil, subwindows of WINDOW can be recombined with WINDOW's 519If STATUS is nil, child windows of WINDOW can be recombined with WINDOW's
520siblings. STATUS non-nil means that subwindows of WINDOW are never 520siblings. 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
542DEFUN ("window-total-size", Fwindow_total_size, Swindow_total_size, 0, 2, 0, 542DEFUN ("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.
544If WINDOW is omitted or nil, it defaults to the selected window. 544If WINDOW is omitted or nil, it defaults to the selected window.
545 545
546The return value includes WINDOW's mode line and header line, if any. 546The return value includes the mode line and header line, if any.
547If WINDOW is internal, the return value is the sum of the total number 547If WINDOW is an internal window, the total height is the height
548of lines of WINDOW's child windows if these are vertically combined 548of the screen areas spanned by its children.
549and the height of WINDOW's first child otherwise. 549
550 550On a graphical display, this total height is reported as an
551Optional argument HORIZONTAL non-nil means return the total number of 551integer multiple of the default character height. */)
552columns of WINDOW. In this case the return value includes any vertical 552 (Lisp_Object window)
553dividers or scrollbars of WINDOW. If WINDOW is internal, the return
554value is the sum of the total number of columns of WINDOW's child
555windows if they are horizontally combined and the width of WINDOW's
556first 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; 557DEFUN ("window-total-width", Fwindow_total_width, Swindow_total_width, 0, 1, 0,
558 doc: /* Return the total width, in columns, of window WINDOW.
559If WINDOW is omitted or nil, it defaults to the selected window.
560
561The return value includes any vertical dividers or scroll bars
562belonging to WINDOW. If WINDOW is an internal window, the total width
563is the width of the screen areas spanned by its children.
564
565On a graphical display, this total width is reported as an
566integer multiple of the default character width. */)
567 (Lisp_Object window)
568{
569 return decode_any_window (window)->total_cols;
563} 570}
564 571
565DEFUN ("window-new-total", Fwindow_new_total, Swindow_new_total, 0, 1, 0, 572DEFUN ("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
593DEFUN ("window-left-column", Fwindow_left_column, Swindow_left_column, 0, 1, 0, 600DEFUN ("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.
602This is the distance, in columns, between the left edge of WINDOW and
603the left edge of the frame's window area. For instance, the return
604value is 0 if there is no window to the left of WINDOW.
605
595If WINDOW is omitted or nil, it defaults to the selected window. */) 606If 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
601DEFUN ("window-top-line", Fwindow_top_line, Swindow_top_line, 0, 1, 0, 612DEFUN ("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.
614This is the distance, in lines, between the top of WINDOW and the top
615of the frame's window area. For instance, the return value is 0 if
616there is no window above WINDOW.
617
603If WINDOW is omitted or nil, it defaults to the selected window. */) 618If 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
658DEFUN ("window-body-size", Fwindow_body_size, Swindow_body_size, 0, 2, 0, 673DEFUN ("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.
660WINDOW must be a live window and defaults to the selected one. 675If WINDOW is omitted or nil, it defaults to the selected window.
676Signal an error if the window is not live.
661 677
662If the optional argument HORIZONTAL is omitted or nil, the function 678The returned height does not include the mode line or header line.
663returns the number of WINDOW's lines, excluding the mode line and 679On a graphical display, the height is expressed as an integer multiple
664header line, if any. 680of the default character height. If a line at the bottom of the text
665 681area is only partially visible, that counts as a whole line; to
666If HORIZONTAL is non-nil, the function returns the number of columns 682exclude partially-visible lines, use `window-text-height'. */)
667excluding any vertical dividers or scroll bars owned by WINDOW. On a 683 (Lisp_Object window)
668window-system the return value also excludes the number of columns
669used for WINDOW's fringes or display margins.
670
671Note that the return value is measured in canonical units, i.e. for
672the default frame's face. If the window shows some characters with
673non-default face, e.g., if the font of some characters is larger or
674smaller than the default font, the value returned by this function
675will not match the actual number of lines or characters per line
676shown in the window. To get the actual number of columns and lines,
677use `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)) 689DEFUN ("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 691If WINDOW is omitted or nil, it defaults to the selected window.
685 return make_number (window_body_cols (w)); 692Signal an error if the window is not live.
693
694The return value does not include any vertical dividers, fringe or
695marginal areas, or scroll bars. On a graphical display, the width is
696expressed 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
688DEFUN ("window-hscroll", Fwindow_hscroll, Swindow_hscroll, 0, 1, 0, 703DEFUN ("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
844bar, display margins, fringes, header line, and/or mode line. */) 859bar, 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
861DEFUN ("window-inside-pixel-edges", Fwindow_inside_pixel_edges, Swindow_inside_pixel_edges, 0, 1, 0, 876DEFUN ("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.
863The list has the form (LEFT TOP RIGHT BOTTOM), all relative to 0, 0 at 878The list has the form (LEFT TOP RIGHT BOTTOM), all relative to (0,0)
864the top left corner of the frame. 879at the top left corner of the frame's window area.
865 880
866RIGHT is one more than the rightmost x position of WINDOW's text area. 881RIGHT is one more than the rightmost x position of WINDOW's text area.
867BOTTOM is one more than the bottommost y position of WINDOW's text area. 882BOTTOM 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,
869display margins, fringes, header line, and/or mode line. */) 884display 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. */)
886DEFUN ("window-inside-absolute-pixel-edges", 901DEFUN ("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.
890The list has the form (LEFT TOP RIGHT BOTTOM), all relative to 0, 0 at 905The list has the form (LEFT TOP RIGHT BOTTOM), all relative to (0,0)
891the top left corner of the display. 906at the top left corner of the frame's window area.
892 907
893RIGHT is one more than the rightmost x position of WINDOW's text area. 908RIGHT is one more than the rightmost x position of WINDOW's text area.
894BOTTOM is one more than the bottommost y position of WINDOW's text area. 909BOTTOM 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,
896display margins, fringes, header line, and/or mode line. */) 911display 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,
2571Only the frame WINDOW is on is affected. WINDOW may be any window and 2586Only the frame WINDOW is on is affected. WINDOW may be any window and
2572defaults to the selected one. 2587defaults to the selected one.
2573 2588
2574Optional argument ROOT, if non-nil, must specify an internal window 2589Optional argument ROOT, if non-nil, must specify an internal window such
2575containing WINDOW as a subwindow. If this is the case, replace ROOT by 2590that WINDOW is in its window subtree. If this is the case, replace ROOT
2576WINDOW and leave alone any windows not contained in ROOT. 2591by WINDOW and leave alone any windows not part of ROOT's subtree.
2577 2592
2578When WINDOW is live try to reduce display jumps by keeping the text 2593When WINDOW is live try to reduce display jumps by keeping the text
2579previously visible in WINDOW in the same place on the frame. Doing this 2594previously 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.
3349Optional argument ADD non-nil means add SIZE to the new total size of 3364Optional argument ADD non-nil means add SIZE to the new total size of
3350WINDOW and return the sum. 3365WINDOW and return the sum.
3351 3366
3352Note: This function does not operate on any subwindows of WINDOW. */) 3367Note: 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.
3368Return SIZE. 3383Return SIZE.
3369 3384
3370Note: This function does not operate on any subwindows of WINDOW. */) 3385Note: 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
3534values. HORIZONTAL non-nil means apply requested width values. 3549values. HORIZONTAL non-nil means apply requested width values.
3535 3550
3536This function checks whether the requested values sum up to a valid 3551This function checks whether the requested values sum up to a valid
3537window layout, recursively assigns the new sizes of all subwindows and 3552window layout, recursively assigns the new sizes of all child windows
3538calculates and assigns the new start positions of these windows. 3553and calculates and assigns the new start positions of these windows.
3539 3554
3540Note: This function does not check any of `window-fixed-size-p', 3555Note: 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. */)
5218DEFUN ("window-text-height", Fwindow_text_height, Swindow_text_height, 5233DEFUN ("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.
5221WINDOW defaults to the selected window. 5236If WINDOW is omitted or nil, it defaults to the selected window.
5222 5237
5223The return value does not include the mode line, any header line, nor 5238The returned height does not include the mode line, any header line,
5224any partial-height lines in the text display area. */) 5239nor 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. */
5734void 5749void
5735delete_all_subwindows (Lisp_Object window) 5750delete_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);
825EXFUN (Fwindow_dedicated_p, 1); 825EXFUN (Fwindow_dedicated_p, 1);
826extern void resize_frame_windows (struct frame *, int, int); 826extern void resize_frame_windows (struct frame *, int, int);
827extern void delete_all_subwindows (Lisp_Object); 827extern void delete_all_child_windows (Lisp_Object);
828extern void freeze_window_starts (struct frame *, int); 828extern void freeze_window_starts (struct frame *, int);
829extern void grow_mini_window (struct window *, int); 829extern void grow_mini_window (struct window *, int);
830extern void shrink_mini_window (struct window *); 830extern 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
957inline int 957int
958window_text_bottom_y (struct window *w) 958window_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
971inline int 971int
972window_box_width (struct window *w, int area) 972window_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
1010inline int 1010int
1011window_box_height (struct window *w) 1011window_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
1057inline int 1057int
1058window_box_left_offset (struct window *w, int area) 1058window_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
1089inline int 1089int
1090window_box_right_offset (struct window *w, int area) 1090window_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
1099inline int 1099int
1100window_box_left (struct window *w, int area) 1100window_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
1119inline int 1119int
1120window_box_right (struct window *w, int area) 1120window_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
1132inline void 1132void
1133window_box (struct window *w, int area, int *box_x, int *box_y, 1133window_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")