aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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/ChangeLog24
-rw-r--r--doc/lispref/windows.texi944
-rw-r--r--doc/misc/auth.texi18
-rw-r--r--doc/misc/gnus.texi30
-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/ChangeLog53
-rw-r--r--lisp/calendar/cal-menu.el12
-rw-r--r--lisp/delim-col.el2
-rw-r--r--lisp/emacs-lisp/find-func.el40
-rw-r--r--lisp/emulation/edt.el2
-rw-r--r--lisp/generic-x.el2
-rw-r--r--lisp/gnus/smime.el2
-rw-r--r--lisp/international/robin.el2
-rw-r--r--lisp/net/secrets.el2
-rw-r--r--lisp/org/org-agenda.el24
-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/vhdl-mode.el2
-rw-r--r--lisp/rot13.el2
-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/window.el317
-rw-r--r--lisp/woman.el2
-rw-r--r--src/ChangeLog43
-rw-r--r--src/ccl.c2
-rw-r--r--src/dispextern.h16
-rw-r--r--src/font.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.c113
-rw-r--r--src/xdisp.c16
40 files changed, 730 insertions, 998 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 d714d1b26e5..cbe016ac96d 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,27 @@
12011-11-09 Martin Rudalics <rudalics@gmx.at>
2
3 * windows.texi (Resizing Windows): Rewrite documentation of
4 window-resizable.
5
62011-11-09 Chong Yidong <cyd@gnu.org>
7
8 * windows.texi (Splitting Windows): Simplify example.
9
102011-11-08 Chong Yidong <cyd@gnu.org>
11
12 * windows.texi (Window Sizes): Copyedits. Document
13 window-text-height. Remove window-min-height and window-min-width
14 discussion, referring instead to Emacs manual.
15 (Splitting Windows, Resizing Windows): Add xref to Emacs manual.
16 (Resizing Windows): Simplify introduction. Don't document
17 enlarge-window, shrink-window, enlarge-window-horizontally, and
18 shrink-window-horizontally; they are no longer preferred for
19 calling from Lisp, and are already documented in the Emacs manual.
20
212011-11-07 Glenn Morris <rgm@gnu.org>
22
23 * windows.texi (Choosing Window): Fix keybinding typo.
24
12011-11-07 Martin Rudalics <rudalics@gmx.at> 252011-11-07 Martin Rudalics <rudalics@gmx.at>
2 26
3 * windows.texi (Resizing Windows, Splitting Windows) 27 * windows.texi (Resizing Windows, Splitting Windows)
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index eb3c1849523..52ac5a53900 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,295 +361,177 @@ 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. Most of these functions report the values as integer
379multiples of the default character height and width. On a graphical
380display, the actual screen size of this default height and width are
381those specified by the frame's default font. Hence, if the buffer
382contains text that is displayed in a different size, the reported
383height and width of the window may differ from the actual number of
384text lines or columns displayed in 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
626@code{enlarge-window} (@pxref{Resizing Windows}) get an error if they
627had to change a window size which is fixed. Other functions like
628@code{window-resize} (@pxref{Resizing Windows}) have an optional
629@var{ignore} argument which allows to change the size of fixed-size
630windows.
631
632 Deleting a window or changing a frame's size may change the size of a
633fixed-size window, if there is no other alternative.
634
635 The height of a vertical combination of windows cannot be changed
636when the height of all these windows is fixed. Its width cannot be
637changed if the width of at least one of these windows is fixed.
638Similarly, the width of a horizontal combination of windows cannot be
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
642 The next function allows to check whether the size of an arbitrary
643window is fixed.
644
645@defun window-size-fixed-p &optional window horizontal 525@defun window-size-fixed-p &optional window horizontal
646This function returns non-@code{nil} if @var{window}'s height is fixed. 526This function returns a non-@code{nil} value if @var{window}'s height
647The argument @var{window} can be an arbitrary window and defaults to the 527is fixed. If @var{window} is omitted or @code{nil}, it defaults to
648selected one. Optional argument @var{horizontal} non-@code{nil} means 528the selected window. If the optional argument @var{horizontal} is
649return non-@code{nil} if @var{window}'s width is fixed. 529non-@code{nil}, the return value is non-@code{nil} if @var{window}'s
530width is fixed.
650 531
651If this function returns @code{nil}, this does not necessarily mean that 532A @code{nil} return value does not necessarily mean that @var{window}
652@var{window} can be resized in the desired direction. The function 533can be resized in the desired direction. To determine that, use the
653@code{window-resizable} (@pxref{Resizing Windows}) can tell that. 534function @code{window-resizable}. @xref{Resizing Windows}.
654@end defun 535@end defun
655 536
656 537
@@ -661,134 +542,69 @@ If this function returns @code{nil}, this does not necessarily mean that
661@cindex changing window size 542@cindex changing window size
662@cindex window size, changing 543@cindex window size, changing
663 544
664Emacs does not permit overlapping windows or gaps between windows, so 545 This section describes functions for resizing a window without
665changing the size of a window always affects at least one other window. 546changing the size of its frame. Because live windows do not overlap,
666When a frame contains just one window, that window can be resized only 547these functions are meaningful only on frames that contain two or more
667by resizing the window's frame. The functions described below are 548windows: resizing a window also changes the size of a neighboring
668therefore meaningful only in the context of a frame containing at least 549window. If there is just one window on a frame, its size cannot be
669two windows. The size of the corresponding frame never changes when 550changed except by resizing the frame (@pxref{Size and Position}).
670invoking a function described in this section. 551
671 552 Except where noted, these functions also accept internal windows as
672 The routines changing window sizes always operate in one dimension at 553arguments. Resizing an internal window causes its child windows to be
673a time. This means that windows can be resized only either vertically 554resized to fit the same space.
674or horizontally. If a window shall be resized in both dimensions, it 555
675must be resized in one dimension first and in the other dimension 556@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 557This function returns @var{delta} if the size of @var{window} can be
689changed vertically by @var{delta} lines. Optional argument 558changed vertically by @var{delta} lines. If the optional argument
690@var{horizontal} non-@code{nil} means to return @var{delta} if 559@var{horizontal} is non-@code{nil}, it instead returns @var{delta} if
691@var{window} can be resized horizontally by @var{delta} columns. A 560@var{window} can be resized horizontally by @var{delta} columns. It
692return value of zero means that @var{window} is not resizable. 561does not actually change the window size.
693 562
694If @var{delta} is a positive number, this means that @var{window} shall 563If @var{window} is @code{nil}, it defaults to the selected window.
695be enlarged by @var{delta} lines or columns. If @var{window} cannot be 564
696enlarged by @var{delta} lines or columns, this function returns the 565A 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} 566enlarged by that number of lines or columns; a negative value of
698can be enlarged. 567@var{delta} means to check whether the window can be shrunk by that many
699 568lines 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 569that the window cannot be resized.
701be shrunk by -@var{delta} lines or columns. If @var{window} cannot be 570
702shrunk by -@var{delta} lines or columns, this function returns the 571Normally, the variables @code{window-min-height} and
703minimum value in the range from @var{delta} to 0 that can be used for 572@code{window-min-width} specify the smallest allowable window size.
704shrinking @var{window}. 573@xref{Change Window,, Deleting and Rearranging Windows, emacs, The GNU
705 574Emacs Manual}. However, if the optional argument @var{ignore} is
706Optional argument @var{ignore} non-@code{nil} means ignore any 575non-@code{nil}, this function ignores @code{window-min-height} and
707restrictions imposed by the variables @code{window-min-height} or 576@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 577Instead, it considers the minimum-height window to be one consisting
709minimum height of a window is specified as the minimum number of lines 578of 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 579a minimum-width window as one consisting of fringes, margins, and
711text area of window. The minimum width of a window includes any 580scroll bar (if any), plus a text area two columns wide.
712fringes, margins and the scroll bar as well as two text columns. 581@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 child windows can be resized.
723@end defun
724
725The function @code{window-resizable} does not change any window sizes.
726The following function does:
727 582
728@defun window-resize window delta &optional horizontal ignore 583@defun window-resize window delta &optional horizontal ignore
729This function resizes @var{window} vertically by @var{delta} lines. The 584This function resizes @var{window} by @var{delta} increments. If
730argument @var{window} can denote an arbitrary window and defaults to the 585@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 586lines; otherwise, it changes the width by @var{delta} columns. A
732raise an error. 587positive @var{delta} means to enlarge the window, and a negative
733 588@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 589
770@deffn Command enlarge-window-horizontally delta 590If @var{window} is @code{nil}, it defaults to the selected window. If
771This function makes the selected window @var{delta} columns wider. 591the 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 592
776@deffn Command shrink-window delta &optional horizontal 593The optional argument @var{ignore} has the same meaning as for the
777This function makes the selected window @var{delta} lines smaller. 594function @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 595
785@deffn Command shrink-window-horizontally delta 596The choice of which window edge this function alters depends on the
786This function makes the selected window @var{delta} columns narrower. 597splitting and nesting status of the involved windows; in some cases,
787Interactively, if no argument is given, it makes the selected window one 598it may alter both edges. @xref{Splitting Windows}. To resize by
788column narrower. 599moving only the bottom or right edge of a window, use the function
789@end deffn 600@code{adjust-window-trailing-edge}, below.
601@end defun
602
603@c The commands enlarge-window, enlarge-window-horizontally,
604@c shrink-window, and shrink-window-horizontally are documented in the
605@c Emacs manual. They are not preferred for calling from Lisp.
790 606
791The following function is useful for moving the line dividing two 607 The following function is useful for moving the line dividing two
792windows. 608windows.
793 609
794@defun adjust-window-trailing-edge window delta &optional horizontal 610@defun adjust-window-trailing-edge window delta &optional horizontal
@@ -801,7 +617,7 @@ If @var{delta} is greater zero, this moves the edge downwards or to the
801right. If @var{delta} is less than zero, this moves the edge upwards or 617right. If @var{delta} is less than zero, this moves the edge upwards or
802to the left. If the edge can't be moved by @var{delta} lines or columns, 618to the left. If the edge can't be moved by @var{delta} lines or columns,
803it is moved as far as possible in the desired direction but no error is 619it is moved as far as possible in the desired direction but no error is
804signalled. 620signaled.
805 621
806This function tries to resize windows adjacent to the edge that is 622This function tries to resize windows adjacent to the edge that is
807moved. Only if this is insufficient, it will also resize windows not 623moved. Only if this is insufficient, it will also resize windows not
@@ -820,7 +636,7 @@ contents exactly. The default for @var{window} is the selected window.
820The optional argument @var{max-height} specifies the maximum total 636The optional argument @var{max-height} specifies the maximum total
821height the window is allowed to be; @code{nil} means use the maximum 637height the window is allowed to be; @code{nil} means use the maximum
822permissible height of a window on @var{window}'s frame. The optional 638permissible height of a window on @var{window}'s frame. The optional
823argument @var{min-height} specifies the minimum toatl height for the 639argument @var{min-height} specifies the minimum total height for the
824window; @code{nil} means use @code{window-min-height}. All these height 640window; @code{nil} means use @code{window-min-height}. All these height
825values include the mode line and/or header line. 641values include the mode line and/or header line.
826 642
@@ -894,222 +710,66 @@ frame. @var{window} can be any window and defaults to the selected one.
894@cindex splitting windows 710@cindex splitting windows
895@cindex window splitting 711@cindex window splitting
896 712
897The functions described below are the primitives needed for creating a 713This section describes functions for creating a new window by
898new window. They do not accept a buffer as an argument. Rather, they 714@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 715
902@deffn Command split-window &optional window size side 716@deffn Command split-window &optional window size side
903This function creates a new window adjacent to @var{window}. It returns 717This function creates a new live window next to the window
904the new window which is always a live window. The argument @var{window} 718@var{window}. If @var{window} is omitted or @code{nil}, it defaults
905can denote any window and defaults to the selected one. This function 719to the selected window. That window is ``split'', and reduced in
906does not change the selected window. 720size. The space is taken up by the new window, which is returned.
907 721
908Optional second argument @var{size} a positive number means make 722The optional second argument @var{size} determines the sizes of the
909@var{window} @var{size} lines (or columns) tall. If @var{size} is 723@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) 724both 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 725allocated to the new window. If @var{size} is a positive number,
912divided evenly into two parts. (If there is an odd line, it is 726@var{window} is given @var{size} lines (or columns, depending on the
913allocated to the new window.) 727value of @var{side}). If @var{size} is a negative number, the new
914 728window is given @minus{}@var{size} lines (or columns).
915If splitting would result in making a window smaller than 729
916@code{window-min-height} or @code{window-min-width} (@pxref{Window 730If @var{size} is @code{nil}, this function obeys the variables
917Sizes}), this function usually signals an error. However, if @var{size} 731@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 732Window,,Deleting and Rearranging Windows, emacs, The GNU Emacs
919created. (A size value would be invalid if it assigned less than one 733Manual}. Thus, it signals an error if splitting would result in
920line or less than two columns to the new window.) 734making a window smaller than those variables specify. However, a
921 735non-@code{nil} value for @var{size} causes those variables to be
922Optional third argument @var{side} @code{nil} (or @code{below}) 736ignored; in that case, the smallest allowable window is considered to
923specifies that the new window shall be located below @var{window}. The 737be 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 738wide.
925@var{window}. In both cases @var{size} specifies the new number of 739
926lines for @var{window} (or the new window if @var{size} is negative) 740The optional third argument @var{side} determines the position of the
927including space reserved for the mode and/or header line. 741new window relative to @var{window}. If it is @code{nil} or
928 742@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 743@code{above}, the new window is placed above @var{window}. In both
930positioned on the right side of @var{window}. The value @code{left} 744these cases, @var{size} specifies a total window height, in lines.
931means the new window will be located on the left side of @var{window}. 745
932In both cases @var{size} specifies the new number of columns for 746If @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) 747the right of @var{window}. If @var{side} is @code{left}, the new
934including space reserved for margins, fringes and the scroll bar or a 748window is placed on the left of @var{window}. In both these cases,
935divider column. 749@var{size} specifies a total window width, in columns.
936 750
937Any other non-@code{nil} value for @var{side} is currently handled like 751If @var{window} is a live window, the new window inherits various
938@code{t} (or @code{right}). Since this might change in the future, 752properties from it, including margins and scroll bars. If
939application programs should refrain from using other values. 753@var{window} is an internal window, the new window inherits the
940 754properties of the window selected within @var{window}'s frame.
941If @var{window} is live, properties of the new window like margins and 755
942scroll bars are inherited from @var{window}. If @var{window} is an 756If the variable @code{ignore-window-parameters} is non-@code{nil}
943internal window, these properties, as well as the buffer shown in the 757(@pxref{Window Parameters}), this function ignores window parameters.
944new window, are inherited from the window selected on @var{window}'s 758Otherwise, it consults the @code{split-window} parameter of
945frame. 759@var{window}; if this is @code{t}, it splits the window disregarding
946 760any other window parameters. If the @code{split-window} parameter
947If @code{ignore-window-parameters} is non-@code{nil}, this function 761specifies a function, that function is called with the arguments
948ignores window parameters (@pxref{Window Parameters}). Otherwise, if 762@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 763lieu 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 764@end deffn
955 765
956The following example starts with one window on a screen that is 50 766 As an example, we show a combination of @code{split-window} calls
957lines high by 80 columns wide; then it splits the window. 767that yields the window configuration discussed in @ref{Windows and
958 768Frames}. This example demonstrates splitting live windows as well as
959@smallexample 769splitting internal windows. We begin with a frame containing a single
960@group 770window (a live root window), which we denote by @var{W4}. Calling
961(setq W1 (selected-window)) 771@code{(split-window W3)} yields this window configuration:
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 772
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 773@smallexample
1114@group 774@group
1115 ______________________________________ 775 ______________________________________
@@ -1117,112 +777,64 @@ following vertical combination:
1117 || || 777 || ||
1118 || || 778 || ||
1119 || || 779 || ||
780 ||_________________W4_________________||
781 | ____________________________________ |
1120 || || 782 || ||
1121 || || 783 || ||
1122 || || 784 || ||
1123 || ||
1124 ||_________________W6_________________||
1125 | ____________________________________ |
1126 || ||
1127 ||_________________W5_________________|| 785 ||_________________W5_________________||
1128 |__________________W3__________________| 786 |__________________W3__________________|
1129 787
1130@end group 788@end group
1131@end smallexample 789@end smallexample
1132 790
1133Evaluating now @code{(split-window (window-parent W6) -8 'left)} or, 791@noindent
1134equivalently, @code{(split-window W3 -8 'left)} should now produce the 792The @code{split-window} call has created a new live window, denoted by
1135penultimate configuration from the previous scenario from where we can 793@var{W5}. It has also created a new internal window, denoted by
1136continue as described before. 794@var{W3}, which becomes the root window and the parent of both
1137 795@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 796
1182The desired configuration can be now obtained by evaluating 797 Next, we call @code{(split-window W3 nil 'left)}, passing the
1183@code{(split-window W3 -8 'left)} or, equivalently, @code{(split-window 798internal window @var{W3} as the argument. The result:
1184(window-parent W5) -8 'left)}.
1185 799
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 800@smallexample
1191@group 801@group
1192 ______________________________________ 802 ______________________________________
1193 | ______ ____________________________ | 803 | ______ ____________________________ |
1194 || || ____________ ____________ || 804 || || __________________________ ||
1195 || ||| || ||| 805 || ||| |||
1196 || ||| || ||| 806 || ||| |||
1197 || ||| || ||| 807 || ||| |||
1198 || ||| || ||| 808 || |||____________W4____________|||
1199 || ||| || ||| 809 || || __________________________ ||
1200 || ||| || ||| 810 || ||| |||
1201 || ||| || ||| 811 || ||| |||
1202 || |||______W6____||______W7____||| 812 || |||____________W5____________|||
1203 ||__W2__||_____________W4_____________|| 813 ||__W2__||_____________W3_____________ |
1204 |__________________W1__________________| 814 |__________________W1__________________|
1205
1206@end group 815@end group
1207@end smallexample 816@end smallexample
1208 817
1209Evaluating now @code{(split-window W4 -3)} or, for example, 818@noindent
1210@code{(split-window (window-parent W6) -3)} should produce the desired 819A new live window, @var{W2}, is created to the left of @var{W3} (which
1211configuration. 820encompasses the vertical window combination of @var{W4} and @var{W5}).
821A new internal window @var{W1} is also created, and becomes the new
822root window.
1212 823
1213 The two options described next can be used to tune the operation of 824 The following two options can be used to modify the operation of
1214@code{split-window}. 825@code{split-window}.
1215 826
1216@defopt window-splits 827@defopt window-splits
1217If this variable is nil, the function @code{split-window} can split a 828If 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 829window (denoted by @var{window}) if @var{window}'s screen area is
1219to accommodate both--itself and the new window. 830large enough to accommodate both itself and the new window. This is
831the default.
1220 832
1221If this variable is non-@code{nil}, @code{split-window} tries to resize 833If 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 834resize all windows that are part of the same combination as
1223accommodate the new window. Hence, the new window can be also created if 835@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 836this may allow @code{split-window} to succeed even if @var{window} is
1225Sizes}). 837a fixed-size window or too small to ordinarily split.
1226 838
1227In any case, the value of this variable is assigned to the splits status 839In 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 840of the new window and, provided old and new window form a new
@@ -1601,11 +1213,11 @@ function, it calls that function with @var{window} as its sole argument.
1601@end deffn 1213@end deffn
1602 1214
1603@deffn Command delete-windows-on &optional buffer-or-name frame 1215@deffn Command delete-windows-on &optional buffer-or-name frame
1604This function deletes all windows showing @var{buffer-or-name} and 1216This function deletes all windows showing @var{buffer-or-name}. If
1605returns nil. If there are no windows showing @var{buffer-or-name}, it 1217there are no windows showing @var{buffer-or-name}, it does nothing.
1606does nothing. The optional argument @var{buffer-or-name} may be a 1218The 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 1219of an existing buffer and defaults to the current buffer. Invoking
1608buffer. Invoking this command on a minibuffer signals an error. 1220this command on a minibuffer signals an error.
1609 1221
1610The function @code{delete-windows-on} operates by calling 1222The function @code{delete-windows-on} operates by calling
1611@code{delete-window} for each window showing @var{buffer-or-name}. If a 1223@code{delete-window} for each window showing @var{buffer-or-name}. If a
@@ -1833,7 +1445,7 @@ This function does not select a window that has a non-@code{nil}
1833@end deffn 1445@end deffn
1834 1446
1835The following function returns a copy of the list of windows in the 1447The following function returns a copy of the list of windows in the
1836cyclic odering. 1448cyclic ordering.
1837 1449
1838@defun window-list-1 &optional window &optional minibuf &optional all_frames 1450@defun window-list-1 &optional window &optional minibuf &optional all_frames
1839This function returns a list of live windows. The optional arguments 1451This function returns a list of live windows. The optional arguments
@@ -1843,7 +1455,7 @@ in the list. See the description of @code{next-window} for details.
1843The optional argument @var{window} specifies the first window to list 1455The optional argument @var{window} specifies the first window to list
1844and defaults to the selected window. If @var{window} is not on the list 1456and 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 1457of windows returned, some other window will be listed first but no error
1846is signalled. 1458is signaled.
1847@end defun 1459@end defun
1848 1460
1849The functions described below use @code{window-list-1} for generating a 1461The functions described below use @code{window-list-1} for generating a
@@ -1956,7 +1568,7 @@ This function makes @var{window} display @var{buffer-or-name} and
1956returns @code{nil}. The argument @var{window} has to denote a live 1568returns @code{nil}. The argument @var{window} has to denote a live
1957window and defaults to the selected one. The argument 1569window and defaults to the selected one. The argument
1958@var{buffer-or-name} must specify a buffer or the name of an existing 1570@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} 1571buffer. An error is signaled when @var{window} is @dfn{strongly}
1960dedicated to its buffer (@pxref{Dedicated Windows}) and does not already 1572dedicated to its buffer (@pxref{Dedicated Windows}) and does not already
1961display @var{buffer-or-name}. 1573display @var{buffer-or-name}.
1962 1574
@@ -2043,7 +1655,7 @@ If a window displaying @var{buffer-or-name} is dedicated
2043(@pxref{Dedicated Windows}) and is not the only window on its frame, 1655(@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 1656that 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 1657and there are other frames on the frame's terminal, that frame is dealt
2046with by the function spcecified by @code{frame-auto-hide-function} 1658with by the function specified by @code{frame-auto-hide-function}
2047(@pxref{Quitting Windows}). Otherwise, the buffer provided by the 1659(@pxref{Quitting Windows}). Otherwise, the buffer provided by the
2048function @code{switch-to-prev-buffer} (@pxref{Window History}) is 1660function @code{switch-to-prev-buffer} (@pxref{Window History}) is
2049displayed in the window instead. 1661displayed in the window instead.
@@ -2163,7 +1775,7 @@ unless @var{norecord} is non-@code{nil}.
2163 1775
2164 The command @code{display-buffer} flexibly chooses a window for 1776 The command @code{display-buffer} flexibly chooses a window for
2165display, and displays a specified buffer in that window. It can be 1777display, 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 1778called interactively, via the key binding @kbd{C-x 4 C-o}. It is also
2167used as a subroutine by many functions and commands, including 1779used as a subroutine by many functions and commands, including
2168@code{switch-to-buffer} and @code{pop-to-buffer} (@pxref{Switching 1780@code{switch-to-buffer} and @code{pop-to-buffer} (@pxref{Switching
2169Buffers}). 1781Buffers}).
@@ -2221,7 +1833,7 @@ The constant @code{display-buffer-fallback-action}.
2221@noindent 1833@noindent
2222Each action function is called in turn, passing the buffer as the 1834Each action function is called in turn, passing the buffer as the
2223first argument and the combined action alist as the second argument, 1835first argument and the combined action alist as the second argument,
2224until one of the functions returns non-nil. 1836until one of the functions returns non-@code{nil}.
2225 1837
2226The argument @var{action} can also have a non-@code{nil}, non-list 1838The argument @var{action} can also have a non-@code{nil}, non-list
2227value. This has the special meaning that the buffer should be 1839value. This has the special meaning that the buffer should be
@@ -2272,7 +1884,7 @@ returns the window if it succeeds, and @code{nil} if it fails.
2272This function tries to display @var{buffer} in the selected window. 1884This function tries to display @var{buffer} in the selected window.
2273It fails if the selected window is a minibuffer window or is dedicated 1885It fails if the selected window is a minibuffer window or is dedicated
2274to another buffer (@pxref{Dedicated Windows}). It also fails if 1886to another buffer (@pxref{Dedicated Windows}). It also fails if
2275@var{alist} has a non-nil @code{inhibit-same-window} entry. 1887@var{alist} has a non-@code{nil} @code{inhibit-same-window} entry.
2276@end defun 1888@end defun
2277 1889
2278@defun display-buffer-reuse-window buffer alist 1890@defun display-buffer-reuse-window buffer alist
@@ -3281,7 +2893,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 2893displayed at a specified vertical position within the window. It does
3282not ``move point'' with respect to the text. 2894not ``move point'' with respect to the text.
3283 2895
3284If @var{count} is a nonnegative number, that puts the line containing 2896If @var{count} is a non-negative number, that puts the line containing
3285point @var{count} lines down from the top of the window. If 2897point @var{count} lines down from the top of the window. If
3286@var{count} is a negative number, then it counts upward from the 2898@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 2899bottom of the window, so that @minus{}1 stands for the last usable
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/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 ff61568a8f2..d0a50366eff 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,56 @@
12011-11-09 Martin Rudalics <rudalics@gmx.at>
2
3 * window.el (window-size-fixed-p): Rewrite doc-string.
4 (window-resizable-p): Rename to window--resizable-p. Update
5 callers.
6 (window--resizable): New function. Make all callers of
7 window-resizable call window--resizable instead.
8 (window-resizable): Rewrite in terms of window--resizable.
9
102011-11-08 Glenn Morris <rgm@gnu.org>
11
12 * progmodes/delphi.el (delphi-mode-syntax-table):
13 Let define-derived-mode define a proper syntax table. (Bug#9994)
14
152011-11-08 Stefan Monnier <monnier@iro.umontreal.ca>
16
17 * window.el: Stay away from defsubst.
18 (window-list-no-nils): Remove.
19 (window-state-get-1, window-state-get): Use backquote instead.
20
212011-11-08 thierry <thierry.volpiatto@gmail.com>
22
23 * emacs-lisp/find-func.el (find-function-read):
24 Fix incorrect use of default argument in `completing-read'.
25
262011-11-08 Martin Rudalics <rudalics@gmx.at>
27
28 * window.el (display-buffer-function, special-display-function):
29 Mention display-buffer-record-window but do not mention
30 help-setup parameter in doc-strings.
31 (window-min-delta): Fix doc-string typo.
32
332011-11-08 Chong Yidong <cyd@gnu.org>
34
35 * window.el (window-total-height, window-total-width): Doc fix.
36 (window-body-size): Move from C.
37 (window-body-height, window-body-width): Move to C.
38
392011-11-08 Stefan Monnier <monnier@iro.umontreal.ca>
40
41 * window.el: Make special-display like display-buffer-alist (bug#9532).
42 (display-buffer--special-action): New function, morphed
43 from display-buffer--special.
44 (display-buffer): Use it to handle special-display-buffers at higher
45 priority (just after display-buffer-alist).
46 (display-buffer-fallback-action, display-buffer--other-frame-action)
47 (pop-to-buffer-same-window): Remove display-buffer--special.
48
492011-11-07 Glenn Morris <rgm@gnu.org>
50
51 * calendar/cal-menu.el (cal-menu-set-date-title):
52 Do nothing if not in a calendar. (Bug#9976)
53
12011-11-07 Stefan Monnier <monnier@iro.umontreal.ca> 542011-11-07 Stefan Monnier <monnier@iro.umontreal.ca>
2 55
3 * files.el (find-file): Always use selected-window. 56 * files.el (find-file): Always use selected-window.
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/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/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/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/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/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/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/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/window.el b/lisp/window.el
index 2f4988b8b39..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
@@ -530,7 +530,7 @@ unless it has no other choice \(like when deleting a neighboring
530window).") 530window).")
531(make-variable-buffer-local 'window-size-fixed) 531(make-variable-buffer-local 'window-size-fixed)
532 532
533(defsubst window-size-ignore (window ignore) 533(defun window-size-ignore (window ignore)
534 "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."
535 (if (window-valid-p ignore) (eq window ignore) ignore)) 535 (if (window-valid-p ignore) (eq window ignore) ignore))
536 536
@@ -655,7 +655,7 @@ restrictions for that window only."
655 delta)) 655 delta))
656 (t 0))) 656 (t 0)))
657 657
658(defsubst window-sizable-p (window delta &optional horizontal ignore) 658(defun window-sizable-p (window delta &optional horizontal ignore)
659 "Return t if WINDOW can be resized by DELTA lines. 659 "Return t if WINDOW can be resized by DELTA lines.
660For the meaning of the arguments of this function see the 660For the meaning of the arguments of this function see the
661doc-string of `window-sizable'." 661doc-string of `window-sizable'."
@@ -704,8 +704,8 @@ window. Optional argument HORIZONTAL non-nil means return
704non-nil if WINDOW's width is fixed. 704non-nil if WINDOW's width is fixed.
705 705
706If this function returns nil, this does not necessarily mean that 706If this function returns nil, this does not necessarily mean that
707WINDOW can be resized in the desired direction. The functions 707WINDOW can be resized in the desired direction. The function
708`window-resizable' and `window-resizable-p' will tell that." 708`window-resizable' can tell that."
709 (window-size-fixed-1 709 (window-size-fixed-1
710 (window-normalize-window window) horizontal)) 710 (window-normalize-window window) horizontal))
711 711
@@ -772,7 +772,7 @@ tree but try to enlarge windows within WINDOW's combination only.
772 772
773Optional argument NODOWN non-nil means don't check whether WINDOW 773Optional argument NODOWN non-nil means don't check whether WINDOW
774itself \(and its child windows) can be shrunk; check only whether 774itself \(and its child windows) can be shrunk; check only whether
775at least one other windows can be enlarged appropriately." 775at least one other window can be enlarged appropriately."
776 (setq window (window-normalize-window window)) 776 (setq window (window-normalize-window window))
777 (let ((size (window-total-size window horizontal)) 777 (let ((size (window-total-size window horizontal))
778 (minimum (window-min-size window horizontal ignore))) 778 (minimum (window-min-size window horizontal ignore)))
@@ -865,14 +865,14 @@ only whether other windows can be shrunk appropriately."
865 (window-max-delta-1 window 0 horizontal ignore trail noup))) 865 (window-max-delta-1 window 0 horizontal ignore trail noup)))
866 866
867;; Make NOUP also inhibit the min-size check. 867;; Make NOUP also inhibit the min-size check.
868(defun window-resizable (window delta &optional horizontal ignore trail noup nodown) 868(defun window--resizable (window delta &optional horizontal ignore trail noup nodown)
869 "Return DELTA if WINDOW can be resized vertically by DELTA lines. 869 "Return DELTA if WINDOW can be resized vertically by DELTA lines.
870Optional argument HORIZONTAL non-nil means return DELTA if WINDOW 870Optional argument HORIZONTAL non-nil means return DELTA if WINDOW
871can be resized horizontally by DELTA columns. A return value of 871can be resized horizontally by DELTA columns. A return value of
872zero means that WINDOW is not resizable. 872zero means that WINDOW is not resizable.
873 873
874DELTA positive means WINDOW shall be enlarged by DELTA lines or 874DELTA positive means WINDOW shall be enlarged by DELTA lines or
875columns. If WINDOW cannot be enlarged by DELTA lines or columns 875columns. If WINDOW cannot be enlarged by DELTA lines or columns,
876return the maximum value in the range 0..DELTA by which WINDOW 876return the maximum value in the range 0..DELTA by which WINDOW
877can be enlarged. 877can be enlarged.
878 878
@@ -894,11 +894,12 @@ of or below WINDOW can be shrunk. Optional argument TRAIL
894shrunk. 894shrunk.
895 895
896Optional 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
897tree but try to distribute the space among the other windows 897tree but check only whether space can be obtained from (or given
898within WINDOW's combination. 898to) WINDOW's siblings.
899 899
900Optional argument NODOWN non-nil means don't check whether WINDOW 900Optional argument NODOWN non-nil means don't go down in the
901and its child windows can be resized." 901window tree. This means do not check whether resizing would
902violate size restrictions of WINDOW or its child windows."
902 (setq window (window-normalize-window window)) 903 (setq window (window-normalize-window window))
903 (cond 904 (cond
904 ((< delta 0) 905 ((< delta 0)
@@ -909,34 +910,58 @@ and its child windows can be resized."
909 delta)) 910 delta))
910 (t 0))) 911 (t 0)))
911 912
912(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)
913 "Return t if WINDOW can be resized vertically by DELTA lines. 914 "Return t if WINDOW can be resized vertically by DELTA lines.
914For the meaning of the arguments of this function see the 915For the meaning of the arguments of this function see the
915doc-string of `window-resizable'." 916doc-string of `window--resizable'."
916 (setq window (window-normalize-window window)) 917 (setq window (window-normalize-window window))
917 (if (> delta 0) 918 (if (> delta 0)
918 (>= (window-resizable window delta horizontal ignore trail noup nodown) 919 (>= (window--resizable window delta horizontal ignore trail noup nodown)
919 delta) 920 delta)
920 (<= (window-resizable window delta horizontal ignore trail noup nodown) 921 (<= (window--resizable window delta horizontal ignore trail noup nodown)
921 delta))) 922 delta)))
922 923
923(defsubst window-total-height (&optional window) 924(defun window-resizable (window delta &optional horizontal ignore)
924 "Return the total number of lines of WINDOW. 925 "Return DELTA if WINDOW can be resized vertically by DELTA lines.
925WINDOW can be any window and defaults to the selected one. The 926Optional argument HORIZONTAL non-nil means return DELTA if WINDOW
926return value includes WINDOW's mode line and header line, if any. 927can be resized horizontally by DELTA columns. A return value of
927If WINDOW is internal the return value is the sum of the total 928zero means that WINDOW is not resizable.
928number of lines of WINDOW's child windows if these are vertically
929combined and the height of WINDOW's first child otherwise.
930 929
931Note: This function does not take into account the value of 930DELTA positive means WINDOW shall be enlarged by DELTA lines or
932`line-spacing' when calculating the number of lines in WINDOW." 931columns. If WINDOW cannot be enlarged by DELTA lines or columns
933 (window-total-size window)) 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))
948
949(defun window-total-size (&optional window horizontal)
950 "Return the total height or width of window 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)))
934 959
935;; Eventually we should make `window-height' obsolete. 960;; Eventually we should make `window-height' obsolete.
936(defalias 'window-height 'window-total-height) 961(defalias 'window-height 'window-total-height)
937 962
938;; See discussion in bug#4543. 963;; See discussion in bug#4543.
939(defsubst window-full-height-p (&optional window) 964(defun window-full-height-p (&optional window)
940 "Return t if WINDOW is as high as the containing frame. 965 "Return t if WINDOW is as high as the containing frame.
941More precisely, return t if and only if the total height of 966More precisely, return t if and only if the total height of
942WINDOW equals the total height of the root window of WINDOW's 967WINDOW equals the total height of the root window of WINDOW's
@@ -946,17 +971,7 @@ one."
946 (= (window-total-size window) 971 (= (window-total-size window)
947 (window-total-size (frame-root-window window)))) 972 (window-total-size (frame-root-window window))))
948 973
949(defsubst window-total-width (&optional window) 974(defun window-full-width-p (&optional window)
950 "Return the total number of columns of WINDOW.
951WINDOW can be any window and defaults to the selected one. The
952return value includes any vertical dividers or scrollbars of
953WINDOW. If WINDOW is internal, the return value is the sum of
954the total number of columns of WINDOW's child windows if these
955are horizontally combined and the width of WINDOW's first child
956otherwise."
957 (window-total-size window t))
958
959(defsubst window-full-width-p (&optional window)
960 "Return t if WINDOW is as wide as the containing frame. 975 "Return t if WINDOW is as wide as the containing frame.
961More 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
962equals the total width of the root window of WINDOW's frame. 977equals the total width of the root window of WINDOW's frame.
@@ -965,40 +980,17 @@ WINDOW can be any window and defaults to the selected one."
965 (= (window-total-size window t) 980 (= (window-total-size window t)
966 (window-total-size (frame-root-window window) t))) 981 (window-total-size (frame-root-window window) t)))
967 982
968(defsubst window-body-height (&optional window) 983(defun window-body-size (&optional window horizontal)
969 "Return the number of lines of WINDOW's body. 984 "Return the height or width of WINDOW's text area.
970WINDOW must be a live window and defaults to the selected one. 985If WINDOW is omitted or nil, it defaults to the selected window.
971 986Signal an error if the window is not live.
972The return value does not include WINDOW's mode line and header
973line, if any. If a line at the bottom of the window is only
974partially visible, that line is included in the return value. If
975you do not want to include a partially visible bottom line in the
976return value, use `window-text-height' instead.
977
978Note that the return value is measured in canonical units, i.e. for
979the default frame's face. If the window shows some characters with
980non-default face, e.g., if the font of some characters is larger or
981smaller than the default font, the value returned by this function
982will not match the actual number of lines shown in the window. To
983get the actual number of lines, use `posn-at-point'."
984 (window-body-size window))
985
986(defsubst window-body-width (&optional window)
987 "Return the number of columns of WINDOW's body.
988WINDOW must be a live window and defaults to the selected one.
989
990The return value does not include any vertical dividers or scroll
991bars owned by WINDOW. On a window-system the return value does
992not include the number of columns used for WINDOW's fringes or
993display margins either.
994 987
995Note that the return value is measured in canonical units, i.e. for 988If HORIZONTAL is omitted or nil, return the height of the text
996the default frame's face. If the window shows some characters with 989area, like `window-body-height'. Otherwise, return the width of
997non-default face, e.g., if the font of some characters is larger or 990the text area, like `window-body-width'."
998smaller than the default font, the value returned by this function 991 (if horizontal
999will not match the actual number of characters per line shown in the 992 (window-body-width window)
1000window. To get the actual number of columns, use `posn-at-point'." 993 (window-body-height window)))
1001 (window-body-size window t))
1002 994
1003;; Eventually we should make `window-height' obsolete. 995;; Eventually we should make `window-height' obsolete.
1004(defalias 'window-width 'window-body-width) 996(defalias 'window-width 'window-body-width)
@@ -1509,7 +1501,7 @@ instead."
1509 (error "Cannot resize the root window of a frame")) 1501 (error "Cannot resize the root window of a frame"))
1510 ((window-minibuffer-p window) 1502 ((window-minibuffer-p window)
1511 (window--resize-mini-window window delta)) 1503 (window--resize-mini-window window delta))
1512 ((window-resizable-p window delta horizontal ignore) 1504 ((window--resizable-p window delta horizontal ignore)
1513 (window--resize-reset frame horizontal) 1505 (window--resize-reset frame horizontal)
1514 (window--resize-this-window window delta horizontal ignore t) 1506 (window--resize-this-window window delta horizontal ignore t)
1515 (if (and (not (window-splits window)) 1507 (if (and (not (window-splits window))
@@ -1535,7 +1527,7 @@ instead."
1535 (t 1527 (t
1536 (error "Cannot resize window %s" window))))) 1528 (error "Cannot resize window %s" window)))))
1537 1529
1538(defsubst window--resize-child-windows-skip-p (window) 1530(defun window--resize-child-windows-skip-p (window)
1539 "Return non-nil if WINDOW shall be skipped by resizing routines." 1531 "Return non-nil if WINDOW shall be skipped by resizing routines."
1540 (memq (window-new-normal window) '(ignore stuck skip))) 1532 (memq (window-new-normal window) '(ignore stuck skip)))
1541 1533
@@ -1863,7 +1855,7 @@ preferably only resize windows adjacent to EDGE."
1863 ;; 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.
1864 (if (= (- delta) (window-total-size window horizontal)) 1856 (if (= (- delta) (window-total-size window horizontal))
1865 ;; A deletion, presumably. We must handle this case 1857 ;; A deletion, presumably. We must handle this case
1866 ;; specially since `window-resizable' can't be used. 1858 ;; specially since `window--resizable' can't be used.
1867 (if this-delta 1859 (if this-delta
1868 ;; There's at least one resizable sibling we can 1860 ;; There's at least one resizable sibling we can
1869 ;; give WINDOW's size to. 1861 ;; give WINDOW's size to.
@@ -1872,7 +1864,7 @@ preferably only resize windows adjacent to EDGE."
1872 (setq this-delta 0)) 1864 (setq this-delta 0))
1873 ;; Any other form of resizing. 1865 ;; Any other form of resizing.
1874 (setq this-delta 1866 (setq this-delta
1875 (window-resizable window delta horizontal ignore trail t))) 1867 (window--resizable window delta horizontal ignore trail t)))
1876 1868
1877 ;; Set other-delta to what we still have to get from 1869 ;; Set other-delta to what we still have to get from
1878 ;; ancestor windows of parent. 1870 ;; ancestor windows of parent.
@@ -1938,7 +1930,7 @@ resize only windows on the left or above EDGE. If TRAIL equals
1938preferably only resize windows adjacent to EDGE. 1930preferably only resize windows adjacent to EDGE.
1939 1931
1940This function recursively resizes WINDOW's child windows to fit the 1932This function recursively resizes WINDOW's child windows to fit the
1941new size. Make sure that WINDOW is `window-resizable' before 1933new size. Make sure that WINDOW is `window--resizable' before
1942calling this function. Note that this function does not resize 1934calling this function. Note that this function does not resize
1943siblings of WINDOW or WINDOW's parent window. You have to 1935siblings of WINDOW or WINDOW's parent window. You have to
1944eventually call `window-resize-apply' in order to make resizing 1936eventually call `window-resize-apply' in order to make resizing
@@ -2078,7 +2070,7 @@ move it as far as possible in the desired direction."
2078 ;; Start resizing. 2070 ;; Start resizing.
2079 (window--resize-reset frame horizontal) 2071 (window--resize-reset frame horizontal)
2080 ;; Try to enlarge LEFT first. 2072 ;; Try to enlarge LEFT first.
2081 (setq this-delta (window-resizable left delta horizontal)) 2073 (setq this-delta (window--resizable left delta horizontal))
2082 (unless (zerop this-delta) 2074 (unless (zerop this-delta)
2083 (window--resize-this-window 2075 (window--resize-this-window
2084 left this-delta horizontal nil t 'before 2076 left this-delta horizontal nil t 'before
@@ -2101,7 +2093,7 @@ move it as far as possible in the desired direction."
2101 ;; Start resizing. 2093 ;; Start resizing.
2102 (window--resize-reset frame horizontal) 2094 (window--resize-reset frame horizontal)
2103 ;; Try to enlarge RIGHT. 2095 ;; Try to enlarge RIGHT.
2104 (setq this-delta (window-resizable right (- delta) horizontal)) 2096 (setq this-delta (window--resizable right (- delta) horizontal))
2105 (unless (zerop this-delta) 2097 (unless (zerop this-delta)
2106 (window--resize-this-window 2098 (window--resize-this-window
2107 right this-delta horizontal nil t 'after 2099 right this-delta horizontal nil t 'after
@@ -2132,7 +2124,7 @@ Return nil."
2132 ((zerop delta)) 2124 ((zerop delta))
2133 ((window-size-fixed-p nil horizontal) 2125 ((window-size-fixed-p nil horizontal)
2134 (error "Selected window has fixed size")) 2126 (error "Selected window has fixed size"))
2135 ((window-resizable-p nil delta horizontal) 2127 ((window--resizable-p nil delta horizontal)
2136 (window-resize nil delta horizontal)) 2128 (window-resize nil delta horizontal))
2137 (t 2129 (t
2138 (window-resize 2130 (window-resize
@@ -2153,7 +2145,7 @@ Return nil."
2153 ((zerop delta)) 2145 ((zerop delta))
2154 ((window-size-fixed-p nil horizontal) 2146 ((window-size-fixed-p nil horizontal)
2155 (error "Selected window has fixed size")) 2147 (error "Selected window has fixed size"))
2156 ((window-resizable-p nil (- delta) horizontal) 2148 ((window--resizable-p nil (- delta) horizontal)
2157 (window-resize nil (- delta) horizontal)) 2149 (window-resize nil (- delta) horizontal))
2158 (t 2150 (t
2159 (window-resize 2151 (window-resize
@@ -2180,7 +2172,7 @@ WINDOW can be any window and defaults to the selected window."
2180 (window-resize window (- (window-min-delta window))) 2172 (window-resize window (- (window-min-delta window)))
2181 (window-resize window (- (window-min-delta window t)) t)) 2173 (window-resize window (- (window-min-delta window t)) t))
2182 2174
2183(defsubst frame-root-window-p (window) 2175(defun frame-root-window-p (window)
2184 "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."
2185 (eq window (frame-root-window window))) 2177 (eq window (frame-root-window window)))
2186 2178
@@ -2426,7 +2418,7 @@ non-side window, signal an error."
2426 (set-window-new-normal 2418 (set-window-new-normal
2427 sibling (+ (window-normal-size sibling horizontal) 2419 sibling (+ (window-normal-size sibling horizontal)
2428 (window-normal-size window horizontal)))) 2420 (window-normal-size window horizontal))))
2429 ((window-resizable-p window (- size) horizontal nil nil nil t) 2421 ((window--resizable-p window (- size) horizontal nil nil nil t)
2430 ;; Can do without resizing fixed-size windows. 2422 ;; Can do without resizing fixed-size windows.
2431 (window--resize-siblings window (- size) horizontal)) 2423 (window--resize-siblings window (- size) horizontal))
2432 (t 2424 (t
@@ -3053,7 +3045,7 @@ showing BUFFER-OR-NAME."
3053 (unrecord-window-buffer window buffer))))) 3045 (unrecord-window-buffer window buffer)))))
3054 3046
3055;;; Splitting windows. 3047;;; Splitting windows.
3056(defsubst window-split-min-size (&optional horizontal) 3048(defun window-split-min-size (&optional horizontal)
3057 "Return minimum height of any window when splitting windows. 3049 "Return minimum height of any window when splitting windows.
3058Optional argument HORIZONTAL non-nil means return minimum width." 3050Optional argument HORIZONTAL non-nil means return minimum width."
3059 (if horizontal 3051 (if horizontal
@@ -3596,10 +3588,6 @@ specific buffers."
3596 )) 3588 ))
3597 3589
3598;;; 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.
3599(defsubst window-list-no-nils (&rest args)
3600 "Like LIST but do not add nil elements of ARGS."
3601 (delq nil (apply 'list args)))
3602
3603(defvar window-state-ignored-parameters '(quit-restore) 3591(defvar window-state-ignored-parameters '(quit-restore)
3604 "List of window parameters ignored by `window-state-get'.") 3592 "List of window parameters ignored by `window-state-get'.")
3605 3593
@@ -3613,46 +3601,47 @@ specific buffers."
3613 (buffer (window-buffer window)) 3601 (buffer (window-buffer window))
3614 (selected (eq window (selected-window))) 3602 (selected (eq window (selected-window)))
3615 (head 3603 (head
3616 (window-list-no-nils 3604 `(,type
3617 type 3605 ,@(unless (window-next-sibling window) `((last . t)))
3618 (unless (window-next-sibling window) (cons 'last t)) 3606 (total-height . ,(window-total-size window))
3619 (cons 'total-height (window-total-size window)) 3607 (total-width . ,(window-total-size window t))
3620 (cons 'total-width (window-total-size window t)) 3608 (normal-height . ,(window-normal-size window))
3621 (cons 'normal-height (window-normal-size window)) 3609 (normal-width . ,(window-normal-size window t))
3622 (cons 'normal-width (window-normal-size window t)) 3610 (splits . ,(window-splits window))
3623 (cons 'splits (window-splits window)) 3611 (nest . ,(window-nest window))
3624 (cons 'nest (window-nest window)) 3612 ,@(let (list)
3625 (let (list) 3613 (dolist (parameter (window-parameters window))
3626 (dolist (parameter (window-parameters window)) 3614 (unless (memq (car parameter)
3627 (unless (memq (car parameter) 3615 window-state-ignored-parameters)
3628 window-state-ignored-parameters) 3616 (setq list (cons parameter list))))
3629 (setq list (cons parameter list)))) 3617 (unless (window-parameter window 'clone-of)
3630 (unless (window-parameter window 'clone-of) 3618 ;; Make a clone-of parameter.
3631 ;; Make a clone-of parameter. 3619 (setq list (cons (cons 'clone-of window) list)))
3632 (setq list (cons (cons 'clone-of window) list))) 3620 (when list
3633 (when list 3621 `((parameters . ,list))))
3634 (cons 'parameters list))) 3622 ,@(when buffer
3635 (when buffer 3623 ;; All buffer related things go in here - make the buffer
3636 ;; All buffer related things go in here - make the buffer 3624 ;; current when retrieving `point' and `mark'.
3637 ;; current when retrieving `point' and `mark'. 3625 (with-current-buffer (window-buffer window)
3638 (with-current-buffer (window-buffer window) 3626 (let ((point (window-point-1 window))
3639 (let ((point (window-point-1 window)) 3627 (start (window-start window))
3640 (start (window-start window)) 3628 (mark (mark)))
3641 (mark (mark))) 3629 `((buffer
3642 (window-list-no-nils 3630 ,(buffer-name buffer)
3643 'buffer (buffer-name buffer) 3631 (selected . ,selected)
3644 (cons 'selected selected) 3632 ,@(when window-size-fixed
3645 (when window-size-fixed (cons 'size-fixed window-size-fixed)) 3633 `((size-fixed . ,window-size-fixed)))
3646 (cons 'hscroll (window-hscroll window)) 3634 (hscroll . ,(window-hscroll window))
3647 (cons 'fringes (window-fringes window)) 3635 (fringes . ,(window-fringes window))
3648 (cons 'margins (window-margins window)) 3636 (margins . ,(window-margins window))
3649 (cons 'scroll-bars (window-scroll-bars window)) 3637 (scroll-bars . ,(window-scroll-bars window))
3650 (cons 'vscroll (window-vscroll window)) 3638 (vscroll . ,(window-vscroll window))
3651 (cons 'dedicated (window-dedicated-p window)) 3639 (dedicated . ,(window-dedicated-p window))
3652 (cons 'point (if markers (copy-marker point) point)) 3640 (point . ,(if markers (copy-marker point) point))
3653 (cons 'start (if markers (copy-marker start) start)) 3641 (start . ,(if markers (copy-marker start) start))
3654 (when mark 3642 ,@(when mark
3655 (cons 'mark (if markers (copy-marker mark) mark))))))))) 3643 `((mark . ,(if markers
3644 (copy-marker mark) mark)))))))))))
3656 (tail 3645 (tail
3657 (when (memq type '(vc hc)) 3646 (when (memq type '(vc hc))
3658 (let (list) 3647 (let (list)
@@ -3688,16 +3677,15 @@ value can be also stored on disk and read back in a new session."
3688 (cons 3677 (cons
3689 ;; Frame related things would go into a function, say `frame-state', 3678 ;; Frame related things would go into a function, say `frame-state',
3690 ;; calling `window-state-get' to insert the frame's root window. 3679 ;; calling `window-state-get' to insert the frame's root window.
3691 (window-list-no-nils 3680 `((min-height . ,(window-min-size window))
3692 (cons 'min-height (window-min-size window)) 3681 (min-width . ,(window-min-size window t))
3693 (cons 'min-width (window-min-size window t)) 3682 (min-height-ignore . ,(window-min-size window nil t))
3694 (cons 'min-height-ignore (window-min-size window nil t)) 3683 (min-width-ignore . ,(window-min-size window t t))
3695 (cons 'min-width-ignore (window-min-size window t t)) 3684 (min-height-safe . ,(window-min-size window nil 'safe))
3696 (cons 'min-height-safe (window-min-size window nil 'safe)) 3685 (min-width-safe . ,(window-min-size window t 'safe))
3697 (cons 'min-width-safe (window-min-size window t 'safe)) 3686 ;; These are probably not needed.
3698 ;; These are probably not needed. 3687 ,@(when (window-size-fixed-p window) `((fixed-height . t)))
3699 (when (window-size-fixed-p window) (cons 'fixed-height t)) 3688 ,@(when (window-size-fixed-p window t) `((fixed-width . t))))
3700 (when (window-size-fixed-p window t) (cons 'fixed-width t)))
3701 (window-state-get-1 window markers))) 3689 (window-state-get-1 window markers)))
3702 3690
3703(defvar window-state-put-list nil 3691(defvar window-state-put-list nil
@@ -3801,13 +3789,13 @@ value can be also stored on disk and read back in a new session."
3801 (let ((delta (- (cdr (assq 'total-height item)) 3789 (let ((delta (- (cdr (assq 'total-height item))
3802 (window-total-height window))) 3790 (window-total-height window)))
3803 window-size-fixed) 3791 window-size-fixed)
3804 (when (window-resizable-p window delta) 3792 (when (window--resizable-p window delta)
3805 (window-resize window delta))) 3793 (window-resize window delta)))
3806 ;; Else check whether the window is not high enough. 3794 ;; Else check whether the window is not high enough.
3807 (let* ((min-size (window-min-size window nil ignore)) 3795 (let* ((min-size (window-min-size window nil ignore))
3808 (delta (- min-size (window-total-size window)))) 3796 (delta (- min-size (window-total-size window))))
3809 (when (and (> delta 0) 3797 (when (and (> delta 0)
3810 (window-resizable-p window delta nil ignore)) 3798 (window--resizable-p window delta nil ignore))
3811 (window-resize window delta nil ignore)))) 3799 (window-resize window delta nil ignore))))
3812 ;; Adjust horizontally. 3800 ;; Adjust horizontally.
3813 (if (memq window-size-fixed '(t width)) 3801 (if (memq window-size-fixed '(t width))
@@ -3815,13 +3803,13 @@ value can be also stored on disk and read back in a new session."
3815 (let ((delta (- (cdr (assq 'total-width item)) 3803 (let ((delta (- (cdr (assq 'total-width item))
3816 (window-total-width window))) 3804 (window-total-width window)))
3817 window-size-fixed) 3805 window-size-fixed)
3818 (when (window-resizable-p window delta) 3806 (when (window--resizable-p window delta)
3819 (window-resize window delta))) 3807 (window-resize window delta)))
3820 ;; Else check whether the window is not wide enough. 3808 ;; Else check whether the window is not wide enough.
3821 (let* ((min-size (window-min-size window t ignore)) 3809 (let* ((min-size (window-min-size window t ignore))
3822 (delta (- min-size (window-total-size window t)))) 3810 (delta (- min-size (window-total-size window t))))
3823 (when (and (> delta 0) 3811 (when (and (> delta 0)
3824 (window-resizable-p window delta t ignore)) 3812 (window--resizable-p window delta t ignore))
3825 (window-resize window delta t ignore)))) 3813 (window-resize window delta t ignore))))
3826 ;; Set dedicated status. 3814 ;; Set dedicated status.
3827 (set-window-dedicated-p window (cdr (assq 'dedicated state))) 3815 (set-window-dedicated-p window (cdr (assq 'dedicated state)))
@@ -3951,8 +3939,9 @@ means that the currently selected window is not acceptable. It
3951should choose or create a window, display the specified buffer in 3939should choose or create a window, display the specified buffer in
3952it, and return the window. 3940it, and return the window.
3953 3941
3954The function specified here is responsible for setting the 3942The specified function should call `display-buffer-record-window'
3955quit-restore and help-setup parameters of the window used." 3943with corresponding arguments to set up the quit-restore parameter
3944of the window used."
3956 :type '(choice 3945 :type '(choice
3957 (const nil) 3946 (const nil)
3958 (function :tag "function")) 3947 (function :tag "function"))
@@ -4205,6 +4194,7 @@ and (cdr ARGS) as second."
4205 (make-frame (append args special-display-frame-alist)))) 4194 (make-frame (append args special-display-frame-alist))))
4206 (window (frame-selected-window frame))) 4195 (window (frame-selected-window frame)))
4207 (display-buffer-record-window 'frame window buffer) 4196 (display-buffer-record-window 'frame window buffer)
4197 ;; FIXME: Use window--display-buffer-2?
4208 (set-window-buffer window buffer) 4198 (set-window-buffer window buffer)
4209 ;; Reset list of WINDOW's previous buffers to nil. 4199 ;; Reset list of WINDOW's previous buffers to nil.
4210 (set-window-prev-buffers window nil) 4200 (set-window-prev-buffers window nil)
@@ -4224,8 +4214,9 @@ A buffer is special when its name is either listed in
4224`special-display-buffer-names' or matches a regexp in 4214`special-display-buffer-names' or matches a regexp in
4225`special-display-regexps'. 4215`special-display-regexps'.
4226 4216
4227The function specified here is responsible for setting the 4217The specified function should call `display-buffer-record-window'
4228quit-restore and help-setup parameters of the window used." 4218with corresponding arguments to set up the quit-restore parameter
4219of the window used."
4229 :type 'function 4220 :type 'function
4230 :group 'frames) 4221 :group 'frames)
4231 4222
@@ -4625,9 +4616,8 @@ See `display-buffer' for details."
4625 :group 'windows) 4616 :group 'windows)
4626 4617
4627(defconst display-buffer-fallback-action 4618(defconst display-buffer-fallback-action
4628 '((display-buffer--maybe-same-window 4619 '((display-buffer--maybe-same-window ;FIXME: why isn't this redundant?
4629 display-buffer-reuse-window 4620 display-buffer-reuse-window
4630 display-buffer--special
4631 display-buffer--maybe-pop-up-frame-or-window 4621 display-buffer--maybe-pop-up-frame-or-window
4632 display-buffer-use-some-window 4622 display-buffer-use-some-window
4633 ;; If all else fails, pop up a new frame. 4623 ;; If all else fails, pop up a new frame.
@@ -4658,7 +4648,6 @@ specified, e.g. by the user options `display-buffer-alist' or
4658 4648
4659(defvar display-buffer--other-frame-action 4649(defvar display-buffer--other-frame-action
4660 '((display-buffer-reuse-window 4650 '((display-buffer-reuse-window
4661 display-buffer--special
4662 display-buffer-pop-up-frame) 4651 display-buffer-pop-up-frame)
4663 (reusable-frames . 0) 4652 (reusable-frames . 0)
4664 (inhibit-same-window . t)) 4653 (inhibit-same-window . t))
@@ -4724,6 +4713,7 @@ search for a window that is already displaying the buffer. See
4724 (let* ((user-action 4713 (let* ((user-action
4725 (display-buffer-assq-regexp (buffer-name buffer) 4714 (display-buffer-assq-regexp (buffer-name buffer)
4726 display-buffer-alist)) 4715 display-buffer-alist))
4716 (special-action (display-buffer--special-action buffer))
4727 ;; Extra actions from the arguments to this function: 4717 ;; Extra actions from the arguments to this function:
4728 (extra-action 4718 (extra-action
4729 (cons nil (append (if inhibit-same-window 4719 (cons nil (append (if inhibit-same-window
@@ -4732,7 +4722,7 @@ search for a window that is already displaying the buffer. See
4732 `((reusable-frames . ,frame)))))) 4722 `((reusable-frames . ,frame))))))
4733 ;; Construct action function list and action alist. 4723 ;; Construct action function list and action alist.
4734 (actions (list display-buffer-overriding-action 4724 (actions (list display-buffer-overriding-action
4735 user-action action extra-action 4725 user-action special-action action extra-action
4736 display-buffer-base-action 4726 display-buffer-base-action
4737 display-buffer-fallback-action)) 4727 display-buffer-fallback-action))
4738 (functions (apply 'append 4728 (functions (apply 'append
@@ -4815,7 +4805,7 @@ terminal if either of those variables is non-nil."
4815 (display-buffer-record-window 'reuse window buffer) 4805 (display-buffer-record-window 'reuse window buffer)
4816 (window--display-buffer-1 window)))) 4806 (window--display-buffer-1 window))))
4817 4807
4818(defun display-buffer--special (buffer alist) 4808(defun display-buffer--special-action (buffer)
4819 "Try to display BUFFER using `special-display-function'. 4809 "Try to display BUFFER using `special-display-function'.
4820Call `special-display-p' on BUFFER's name, and if that returns 4810Call `special-display-p' on BUFFER's name, and if that returns
4821non-nil, call `special-display-function' on BUFFER." 4811non-nil, call `special-display-function' on BUFFER."
@@ -4824,8 +4814,10 @@ non-nil, call `special-display-function' on BUFFER."
4824 ;; parameters to pass to `special-display-function'. 4814 ;; parameters to pass to `special-display-function'.
4825 (let ((pars (special-display-p (buffer-name buffer)))) 4815 (let ((pars (special-display-p (buffer-name buffer))))
4826 (when pars 4816 (when pars
4827 (funcall special-display-function 4817 (list (list #'display-buffer-reuse-window
4828 buffer (if (listp pars) pars)))))) 4818 `(lambda (buffer _alist)
4819 (funcall special-display-function
4820 buffer ',(if (listp pars) pars)))))))))
4829 4821
4830(defun display-buffer-pop-up-frame (buffer alist) 4822(defun display-buffer-pop-up-frame (buffer alist)
4831 "Display BUFFER in a new frame. 4823 "Display BUFFER in a new frame.
@@ -4973,8 +4965,7 @@ the buffer.
4973NORECORD, 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
4974the list of recently selected ones." 4966the list of recently selected ones."
4975 (pop-to-buffer buffer 4967 (pop-to-buffer buffer
4976 '((display-buffer--special 4968 '(display-buffer-same-window
4977 display-buffer-same-window)
4978 (inhibit-same-window . nil)) 4969 (inhibit-same-window . nil))
4979 norecord)) 4970 norecord))
4980 4971
@@ -5438,8 +5429,8 @@ by `recenter-positions'."
5438 5429
5439;;; Scrolling commands. 5430;;; Scrolling commands.
5440 5431
5441;;; Scrolling commands which does not signal errors at top/bottom 5432;;; Scrolling commands which do not signal errors at top/bottom
5442;;; of buffer at first key-press (instead moves to top/bottom 5433;;; of buffer at first key-press (instead move to top/bottom
5443;;; of buffer). 5434;;; of buffer).
5444 5435
5445(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 5b406a7bc46..04e58e4742f 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,46 @@
12011-11-08 Paul Eggert <eggert@cs.ucla.edu>
2
3 * s/gnu.h (GC_MARK_STACK): Define to GC_MAKE_GCPROS_NOOPS (Bug#9926).
4
52011-11-08 Paul Eggert <eggert@cs.ucla.edu>
6
7 Avoid some portability problems by eschewing 'extern inline' functions.
8 The trivial performance wins aren't worth the portability hassles; see
9 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>
10 et seq.
11 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
12 (window_box_width, window_box_left, window_box_left_offset)
13 (window_box_right, window_box_right_offset): Undo previous change,
14 by removing the "extern"s.
15 * intervals.c (adjust_intervals_for_insertion)
16 (adjust_intervals_for_deletion): Undo previous change,
17 making these static again.
18 (offset_intervals, temp_set_point_both, temp_set_point)
19 (copy_intervals_to_string): No longer inline.
20 * xdisp.c (window_text_bottom_y, window_box_width)
21 (window_box_height, window_box_left_offset)
22 (window_box_right_offset, window_box_left, window_box_right)
23 (window_box): No longer inline.
24
252011-11-08 Chong Yidong <cyd@gnu.org>
26
27 * window.c (Fwindow_left_column, Fwindow_top_line): Doc fix.
28 (Fwindow_body_height, Fwindow_body_width): Move from Lisp. Signal
29 an error if not a live window.
30 (Fwindow_total_width, Fwindow_total_height): Move from Lisp.
31 (Fwindow_total_size, Fwindow_body_size): Move to Lisp.
32
332011-11-07 Juanma Barranquero <lekktu@gmail.com>
34
35 * lisp.h (syms_of_abbrev): Remove declaration.
36 Reported by CHENG Gao <chenggao@royau.me>.
37
382011-11-07 Eli Zaretskii <eliz@gnu.org>
39
40 * w32.c (check_windows_init_file): Don't look for term/w32-win.el
41 if Vpurify_flag is non-nil. Fixes a crash when running w32 build
42 of temacs in GUI mode.
43
12011-11-07 Martin Rudalics <rudalics@gmx.at> 442011-11-07 Martin Rudalics <rudalics@gmx.at>
2 45
3 * window.h: Declare delete_all_child_windows instead of 46 * window.h: Declare delete_all_child_windows instead of
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 d36cdd167ff..006ceb31a5a 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -3034,14 +3034,14 @@ int resize_mini_window (struct window *, int);
3034void set_vertical_scroll_bar (struct window *); 3034void set_vertical_scroll_bar (struct window *);
3035#endif 3035#endif
3036int try_window (Lisp_Object, struct text_pos, int); 3036int try_window (Lisp_Object, struct text_pos, int);
3037extern void window_box (struct window *, int, int *, int *, int *, int *); 3037void window_box (struct window *, int, int *, int *, int *, int *);
3038extern int window_box_height (struct window *); 3038int window_box_height (struct window *);
3039extern int window_text_bottom_y (struct window *); 3039int window_text_bottom_y (struct window *);
3040extern int window_box_width (struct window *, int); 3040int window_box_width (struct window *, int);
3041extern int window_box_left (struct window *, int); 3041int window_box_left (struct window *, int);
3042extern int window_box_left_offset (struct window *, int); 3042int window_box_left_offset (struct window *, int);
3043extern int window_box_right (struct window *, int); 3043int window_box_right (struct window *, int);
3044extern int window_box_right_offset (struct window *, int); 3044int window_box_right_offset (struct window *, int);
3045int estimate_mode_line_height (struct frame *, enum face_id); 3045int estimate_mode_line_height (struct frame *, enum face_id);
3046void pixel_to_glyph_coords (struct frame *, int, int, int *, int *, 3046void pixel_to_glyph_coords (struct frame *, int, int, int *, int *,
3047 NativeRectangle *, int); 3047 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/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 fd53bf13731..5407956c202 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -3159,10 +3159,6 @@ extern void syms_of_fileio (void);
3159extern Lisp_Object make_temp_name (Lisp_Object, int); 3159extern Lisp_Object make_temp_name (Lisp_Object, int);
3160extern Lisp_Object Qdelete_file; 3160extern Lisp_Object Qdelete_file;
3161 3161
3162/* Defined in abbrev.c */
3163
3164extern void syms_of_abbrev (void);
3165
3166/* Defined in search.c */ 3162/* Defined in search.c */
3167extern void shrink_regexp_cache (void); 3163extern void shrink_regexp_cache (void);
3168EXFUN (Fstring_match, 3); 3164EXFUN (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 078b39cc2f1..b21671b4153 100644
--- a/src/window.c
+++ b/src/window.c
@@ -541,27 +541,34 @@ selected one. */)
541 return decode_window (window)->use_time; 541 return decode_window (window)->use_time;
542} 542}
543 543
544DEFUN ("window-total-size", Fwindow_total_size, Swindow_total_size, 0, 2, 0, 544DEFUN ("window-total-height", Fwindow_total_height, Swindow_total_height, 0, 1, 0,
545 doc: /* Return the total number of lines of window WINDOW. 545 doc: /* Return the total height, in lines, of window WINDOW.
546If WINDOW is omitted or nil, it defaults to the selected window. 546If WINDOW is omitted or nil, it defaults to the selected window.
547 547
548The return value includes WINDOW's mode line and header line, if any. 548The return value includes the mode line and header line, if any.
549If WINDOW is internal, the return value is the sum of the total number 549If WINDOW is an internal window, the total height is the height
550of lines of WINDOW's child windows if these are vertically combined 550of the screen areas spanned by its children.
551and the height of WINDOW's first child otherwise. 551
552 552On a graphical display, this total height is reported as an
553Optional argument HORIZONTAL non-nil means return the total number of 553integer multiple of the default character height. */)
554columns of WINDOW. In this case the return value includes any vertical 554 (Lisp_Object window)
555dividers or scrollbars of WINDOW. If WINDOW is internal, the return
556value is the sum of the total number of columns of WINDOW's child
557windows if they are horizontally combined and the width of WINDOW's
558first child otherwise. */)
559 (Lisp_Object window, Lisp_Object horizontal)
560{ 555{
561 if (NILP (horizontal)) 556 return decode_any_window (window)->total_lines;
562 return decode_any_window (window)->total_lines; 557}
563 else 558
564 return decode_any_window (window)->total_cols; 559DEFUN ("window-total-width", Fwindow_total_width, Swindow_total_width, 0, 1, 0,
560 doc: /* Return the total width, in columns, of window WINDOW.
561If WINDOW is omitted or nil, it defaults to the selected window.
562
563The return value includes any vertical dividers or scroll bars
564belonging to WINDOW. If WINDOW is an internal window, the total width
565is the width of the screen areas spanned by its children.
566
567On a graphical display, this total width is reported as an
568integer multiple of the default character width. */)
569 (Lisp_Object window)
570{
571 return decode_any_window (window)->total_cols;
565} 572}
566 573
567DEFUN ("window-new-total", Fwindow_new_total, Swindow_new_total, 0, 1, 0, 574DEFUN ("window-new-total", Fwindow_new_total, Swindow_new_total, 0, 1, 0,
@@ -594,6 +601,10 @@ If WINDOW is omitted or nil, it defaults to the selected window. */)
594 601
595DEFUN ("window-left-column", Fwindow_left_column, Swindow_left_column, 0, 1, 0, 602DEFUN ("window-left-column", Fwindow_left_column, Swindow_left_column, 0, 1, 0,
596 doc: /* Return left column of window WINDOW. 603 doc: /* Return left column of window WINDOW.
604This is the distance, in columns, between the left edge of WINDOW and
605the left edge of the frame's window area. For instance, the return
606value is 0 if there is no window to the left of WINDOW.
607
597If WINDOW is omitted or nil, it defaults to the selected window. */) 608If WINDOW is omitted or nil, it defaults to the selected window. */)
598 (Lisp_Object window) 609 (Lisp_Object window)
599{ 610{
@@ -602,6 +613,10 @@ If WINDOW is omitted or nil, it defaults to the selected window. */)
602 613
603DEFUN ("window-top-line", Fwindow_top_line, Swindow_top_line, 0, 1, 0, 614DEFUN ("window-top-line", Fwindow_top_line, Swindow_top_line, 0, 1, 0,
604 doc: /* Return top line of window WINDOW. 615 doc: /* Return top line of window WINDOW.
616This is the distance, in lines, between the top of WINDOW and the top
617of the frame's window area. For instance, the return value is 0 if
618there is no window above WINDOW.
619
605If WINDOW is omitted or nil, it defaults to the selected window. */) 620If WINDOW is omitted or nil, it defaults to the selected window. */)
606 (Lisp_Object window) 621 (Lisp_Object window)
607{ 622{
@@ -657,34 +672,34 @@ window_body_cols (struct window *w)
657 return width; 672 return width;
658} 673}
659 674
660DEFUN ("window-body-size", Fwindow_body_size, Swindow_body_size, 0, 2, 0, 675DEFUN ("window-body-height", Fwindow_body_height, Swindow_body_height, 0, 1, 0,
661 doc: /* Return the number of lines or columns of WINDOW's body. 676 doc: /* Return the height, in lines, of WINDOW's text area.
662WINDOW must be a live window and defaults to the selected one. 677If WINDOW is omitted or nil, it defaults to the selected window.
678Signal an error if the window is not live.
663 679
664If the optional argument HORIZONTAL is omitted or nil, the function 680The returned height does not include the mode line or header line.
665returns the number of WINDOW's lines, excluding the mode line and 681On a graphical display, the height is expressed as an integer multiple
666header line, if any. 682of the default character height. If a line at the bottom of the text
667 683area is only partially visible, that counts as a whole line; to
668If HORIZONTAL is non-nil, the function returns the number of columns 684exclude partially-visible lines, use `window-text-height'. */)
669excluding any vertical dividers or scroll bars owned by WINDOW. On a 685 (Lisp_Object window)
670window-system the return value also excludes the number of columns
671used for WINDOW's fringes or display margins.
672
673Note that the return value is measured in canonical units, i.e. for
674the default frame's face. If the window shows some characters with
675non-default face, e.g., if the font of some characters is larger or
676smaller than the default font, the value returned by this function
677will not match the actual number of lines or characters per line
678shown in the window. To get the actual number of columns and lines,
679use `posn-at-point'. */)
680 (Lisp_Object window, Lisp_Object horizontal)
681{ 686{
682 struct window *w = decode_any_window (window); 687 struct window *w = decode_window (window);
688 return make_number (window_body_lines (w));
689}
683 690
684 if (NILP (horizontal)) 691DEFUN ("window-body-width", Fwindow_body_width, Swindow_body_width, 0, 1, 0,
685 return make_number (window_body_lines (w)); 692 doc: /* Return the width, in columns, of WINDOW's text area.
686 else 693If WINDOW is omitted or nil, it defaults to the selected window.
687 return make_number (window_body_cols (w)); 694Signal an error if the window is not live.
695
696The return value does not include any vertical dividers, fringe or
697marginal areas, or scroll bars. On a graphical display, the width is
698expressed as an integer multiple of the default character width. */)
699 (Lisp_Object window)
700{
701 struct window *w = decode_window (window);
702 return make_number (window_body_cols (w));
688} 703}
689 704
690DEFUN ("window-hscroll", Fwindow_hscroll, Swindow_hscroll, 0, 1, 0, 705DEFUN ("window-hscroll", Fwindow_hscroll, Swindow_hscroll, 0, 1, 0,
@@ -5223,10 +5238,10 @@ and redisplay normally--don't erase and redraw the frame. */)
5223DEFUN ("window-text-height", Fwindow_text_height, Swindow_text_height, 5238DEFUN ("window-text-height", Fwindow_text_height, Swindow_text_height,
5224 0, 1, 0, 5239 0, 1, 0,
5225 doc: /* Return the height in lines of the text display area of WINDOW. 5240 doc: /* Return the height in lines of the text display area of WINDOW.
5226WINDOW defaults to the selected window. 5241If WINDOW is omitted or nil, it defaults to the selected window.
5227 5242
5228The return value does not include the mode line, any header line, nor 5243The returned height does not include the mode line, any header line,
5229any partial-height lines in the text display area. */) 5244nor any partial-height lines at the bottom of the text area. */)
5230 (Lisp_Object window) 5245 (Lisp_Object window)
5231{ 5246{
5232 struct window *w = decode_window (window); 5247 struct window *w = decode_window (window);
@@ -6588,14 +6603,16 @@ function `window-nest' and altered by the function `set-window-nest'. */);
6588 defsubr (&Swindow_use_time); 6603 defsubr (&Swindow_use_time);
6589 defsubr (&Swindow_top_line); 6604 defsubr (&Swindow_top_line);
6590 defsubr (&Swindow_left_column); 6605 defsubr (&Swindow_left_column);
6591 defsubr (&Swindow_total_size); 6606 defsubr (&Swindow_total_height);
6607 defsubr (&Swindow_total_width);
6592 defsubr (&Swindow_normal_size); 6608 defsubr (&Swindow_normal_size);
6593 defsubr (&Swindow_new_total); 6609 defsubr (&Swindow_new_total);
6594 defsubr (&Swindow_new_normal); 6610 defsubr (&Swindow_new_normal);
6595 defsubr (&Sset_window_new_total); 6611 defsubr (&Sset_window_new_total);
6596 defsubr (&Sset_window_new_normal); 6612 defsubr (&Sset_window_new_normal);
6597 defsubr (&Swindow_resize_apply); 6613 defsubr (&Swindow_resize_apply);
6598 defsubr (&Swindow_body_size); 6614 defsubr (&Swindow_body_height);
6615 defsubr (&Swindow_body_width);
6599 defsubr (&Swindow_hscroll); 6616 defsubr (&Swindow_hscroll);
6600 defsubr (&Sset_window_hscroll); 6617 defsubr (&Sset_window_hscroll);
6601 defsubr (&Swindow_redisplay_end_trigger); 6618 defsubr (&Swindow_redisplay_end_trigger);
diff --git a/src/xdisp.c b/src/xdisp.c
index 5d6d919af67..f5a39306c35 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -959,7 +959,7 @@ static int coords_in_mouse_face_p (struct window *, int, int);
959 959
960 This is the height of W minus the height of a mode line, if any. */ 960 This is the height of W minus the height of a mode line, if any. */
961 961
962inline int 962int
963window_text_bottom_y (struct window *w) 963window_text_bottom_y (struct window *w)
964{ 964{
965 int height = WINDOW_TOTAL_HEIGHT (w); 965 int height = WINDOW_TOTAL_HEIGHT (w);
@@ -973,7 +973,7 @@ window_text_bottom_y (struct window *w)
973 means return the total width of W, not including fringes to 973 means return the total width of W, not including fringes to
974 the left and right of the window. */ 974 the left and right of the window. */
975 975
976inline int 976int
977window_box_width (struct window *w, int area) 977window_box_width (struct window *w, int area)
978{ 978{
979 int cols = XFASTINT (w->total_cols); 979 int cols = XFASTINT (w->total_cols);
@@ -1012,7 +1012,7 @@ window_box_width (struct window *w, int area)
1012/* Return the pixel height of the display area of window W, not 1012/* Return the pixel height of the display area of window W, not
1013 including mode lines of W, if any. */ 1013 including mode lines of W, if any. */
1014 1014
1015inline int 1015int
1016window_box_height (struct window *w) 1016window_box_height (struct window *w)
1017{ 1017{
1018 struct frame *f = XFRAME (w->frame); 1018 struct frame *f = XFRAME (w->frame);
@@ -1059,7 +1059,7 @@ window_box_height (struct window *w)
1059 area AREA of window W. AREA < 0 means return the left edge of the 1059 area AREA of window W. AREA < 0 means return the left edge of the
1060 whole window, to the right of the left fringe of W. */ 1060 whole window, to the right of the left fringe of W. */
1061 1061
1062inline int 1062int
1063window_box_left_offset (struct window *w, int area) 1063window_box_left_offset (struct window *w, int area)
1064{ 1064{
1065 int x; 1065 int x;
@@ -1091,7 +1091,7 @@ window_box_left_offset (struct window *w, int area)
1091 area AREA of window W. AREA < 0 means return the right edge of the 1091 area AREA of window W. AREA < 0 means return the right edge of the
1092 whole window, to the left of the right fringe of W. */ 1092 whole window, to the left of the right fringe of W. */
1093 1093
1094inline int 1094int
1095window_box_right_offset (struct window *w, int area) 1095window_box_right_offset (struct window *w, int area)
1096{ 1096{
1097 return window_box_left_offset (w, area) + window_box_width (w, area); 1097 return window_box_left_offset (w, area) + window_box_width (w, area);
@@ -1101,7 +1101,7 @@ window_box_right_offset (struct window *w, int area)
1101 area AREA of window W. AREA < 0 means return the left edge of the 1101 area AREA of window W. AREA < 0 means return the left edge of the
1102 whole window, to the right of the left fringe of W. */ 1102 whole window, to the right of the left fringe of W. */
1103 1103
1104inline int 1104int
1105window_box_left (struct window *w, int area) 1105window_box_left (struct window *w, int area)
1106{ 1106{
1107 struct frame *f = XFRAME (w->frame); 1107 struct frame *f = XFRAME (w->frame);
@@ -1121,7 +1121,7 @@ window_box_left (struct window *w, int area)
1121 area AREA of window W. AREA < 0 means return the right edge of the 1121 area AREA of window W. AREA < 0 means return the right edge of the
1122 whole window, to the left of the right fringe of W. */ 1122 whole window, to the left of the right fringe of W. */
1123 1123
1124inline int 1124int
1125window_box_right (struct window *w, int area) 1125window_box_right (struct window *w, int area)
1126{ 1126{
1127 return window_box_left (w, area) + window_box_width (w, area); 1127 return window_box_left (w, area) + window_box_width (w, area);
@@ -1134,7 +1134,7 @@ window_box_right (struct window *w, int area)
1134 coordinates of the upper-left corner of the box. Return in 1134 coordinates of the upper-left corner of the box. Return in
1135 *BOX_WIDTH, and *BOX_HEIGHT the pixel width and height of the box. */ 1135 *BOX_WIDTH, and *BOX_HEIGHT the pixel width and height of the box. */
1136 1136
1137inline void 1137void
1138window_box (struct window *w, int area, int *box_x, int *box_y, 1138window_box (struct window *w, int area, int *box_x, int *box_y,
1139 int *box_width, int *box_height) 1139 int *box_width, int *box_height)
1140{ 1140{