Now on revision 106333. ------------------------------------------------------------ revno: 106333 committer: Chong Yidong branch nick: trunk timestamp: Wed 2011-11-09 15:56:50 +0800 message: * doc/lispref/windows.texi (Splitting Windows): Simplify example. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2011-11-08 15:34:21 +0000 +++ doc/lispref/ChangeLog 2011-11-09 07:56:50 +0000 @@ -1,3 +1,7 @@ +2011-11-09 Chong Yidong + + * windows.texi (Splitting Windows): Simplify example. + 2011-11-08 Chong Yidong * windows.texi (Window Sizes): Copyedits. Document === modified file 'doc/lispref/windows.texi' --- doc/lispref/windows.texi 2011-11-08 15:34:21 +0000 +++ doc/lispref/windows.texi 2011-11-09 07:56:50 +0000 @@ -715,337 +715,131 @@ @cindex splitting windows @cindex window splitting -The functions described below are the primitives needed for creating a -new window. They do not accept a buffer as an argument. Rather, they -``split'' an existing window into two halves, both displaying the buffer -previously visible in the window that was split. +This section describes functions for creating a new window by +@dfn{splitting} an existing one. @deffn Command split-window &optional window size side -This function creates a new window adjacent to @var{window}. It returns -the new window which is always a live window. The argument @var{window} -can denote any window and defaults to the selected one. This function -does not change the selected window. - -Optional second argument @var{size} a positive number means make -@var{window} @var{size} lines (or columns) tall. If @var{size} is -negative, make the new window @minus{}@var{size} lines (or columns) -tall. If @var{size} is omitted or @code{nil}, then @var{window} is -divided evenly into two parts. (If there is an odd line, it is -allocated to the new window.) - -Normally, the customizable variables @code{window-min-height} and -@code{window-min-width} specify the smallest allowable size of a -window. @xref{Change Window,,Deleting and Rearranging Windows, emacs, -The GNU Emacs Manual}. If splitting would result in making a window -smaller than this, this function usually signals an error. However, -if @var{size} is non-@code{nil} and valid, a new window of the -requested size is created, provided it has enough space for a text -area one line tall and/or two columns wide. - -Optional third argument @var{side} @code{nil} (or @code{below}) -specifies that the new window shall be located below @var{window}. The -value @code{above} means the new window will be located above -@var{window}. In both cases @var{size} specifies the new number of -lines for @var{window} (or the new window if @var{size} is negative) -including space reserved for the mode and/or header line. - -If @var{side} is @code{t} or @code{right} the new window will be -positioned on the right side of @var{window}. The value @code{left} -means the new window will be located on the left side of @var{window}. -In both cases @var{size} specifies the new number of columns for -@var{window} (or the new window provided @var{size} is negative) -including space reserved for margins, fringes and the scroll bar or a -divider column. - -Any other non-@code{nil} value for @var{side} is currently handled like -@code{t} (or @code{right}). Since this might change in the future, -application programs should refrain from using other values. - -If @var{window} is live, properties of the new window like margins and -scroll bars are inherited from @var{window}. If @var{window} is an -internal window, these properties, as well as the buffer shown in the -new window, are inherited from the window selected on @var{window}'s -frame. - -If @code{ignore-window-parameters} is non-@code{nil}, this function -ignores window parameters (@pxref{Window Parameters}). Otherwise, if -the @code{split-window} parameter of @var{window} is @code{t}, it splits -the window disregarding any other window parameters. If the -@code{split-window} parameter specifies a function, that function is -called with the arguments @var{window}, @var{size}, and @var{side} to -split @var{window}. If that function is @code{ignore}, nothing is done. +This function creates a new live window next to the window +@var{window}. If @var{window} is omitted or @code{nil}, it defaults +to the selected window. That window is ``split'', and reduced in +size. The space is taken up by the new window, which is returned. + +The optional second argument @var{size} determines the sizes of the +@var{window} and/or the new window. If it is omitted or @code{nil}, +both windows are given equal sizes; if there is an odd line, it is +allocated to the new window. If @var{size} is a positive number, +@var{window} is given @var{size} lines (or columns, depending on the +value of @var{side}). If @var{size} is a negative number, the new +window is given @minus{}@var{size} lines (or columns). + +If @var{size} is @code{nil}, this function obeys the variables +@code{window-min-height} and @code{window-min-width}. @xref{Change +Window,,Deleting and Rearranging Windows, emacs, The GNU Emacs +Manual}. Thus, it signals an error if splitting would result in +making a window smaller than those variables specify. However, a +non-@code{nil} value for @var{size} causes those variables to be +ignored; in that case, the smallest allowable window is considered to +be one that has space for a text area one line tall and/or two columns +wide. + +The optional third argument @var{side} determines the position of the +new window relative to @var{window}. If it is @code{nil} or +@code{below}, the new window is placed below @var{window}. If it is +@code{above}, the new window is placed above @var{window}. In both +these cases, @var{size} specifies a total window height, in lines. + +If @var{side} is @code{t} or @code{right}, the new window is placed on +the right of @var{window}. If @var{side} is @code{left}, the new +window is placed on the left of @var{window}. In both these cases, +@var{size} specifies a total window width, in columns. + +If @var{window} is a live window, the new window inherits various +properties from it, including margins and scroll bars. If +@var{window} is an internal window, the new window inherits the +properties of the window selected within @var{window}'s frame. + +If the variable @code{ignore-window-parameters} is non-@code{nil} +(@pxref{Window Parameters}), this function ignores window parameters. +Otherwise, it consults the @code{split-window} parameter of +@var{window}; if this is @code{t}, it splits the window disregarding +any other window parameters. If the @code{split-window} parameter +specifies a function, that function is called with the arguments +@var{window}, @var{size}, and @var{side} to split @var{window}, in +lieu of the usual action of @code{split-window}. @end deffn -The following example starts with one window on a screen that is 50 -lines high by 80 columns wide; then it splits the window. - -@smallexample -@group -(setq W1 (selected-window)) - @result{} # -(setq W2 (split-window W1 15)) - @result{} # -@end group -@group -(window-top-line W1) - @result{} 0 -(window-total-size W1) - @result{} 15 -(window-top-line W2) - @result{} 15 -@end group -@end smallexample - -The screen looks like this: - -@smallexample -@group - __________ - | | line 0 - | W1 | - |__________| - | | line 15 - | W2 | - |__________| - line 50 - column 0 column 80 -@end group -@end smallexample - -Next, split the top window into two side-by-side windows: - -@smallexample -@group -(setq W3 (split-window W1 35 t)) - @result{} # -@end group -@group -(window-left-column W1) - @result{} 0 -(window-total-size W1 t) - @result{} 35 -(window-left-column W3) - @result{} 35 -@end group -@end smallexample - -@need 3000 -Now the screen looks like this: - -@smallexample -@group - column 35 - __________ - | | | line 0 - | W1 | W3 | - |____|_____| - | | line 15 - | W2 | - |__________| - line 50 - column 0 column 80 -@end group -@end smallexample - -Normally, Emacs indicates the border between two side-by-side windows -with a scroll bar (@pxref{Scroll Bars}), or with @samp{|} characters. The -display table can specify alternative border characters; see @ref{Display -Tables}. - -Below we describe how @code{split-window} can be used to create the -window configuration from our earlier example (@pxref{Windows and -Frames}) and how internal windows are created for this purpose. We -start with a frame containing one live window @code{W2} (in the -following scenarios window names are assigned in an arbitrary manner in -order to match the names of the example). Evaluating the form -@code{(split-window W2 8 t)} creates a new internal window @code{W1} -with two children---@code{W2} (the window we've split) and a new leaf -window @code{W6}: -@smallexample -@group - ______________________________________ - | ______ ____________________________ | - || || || - || || || - || || || - || || || - || || || - || || || - || || || - || || || - || || || - || || || - ||__W2__||_____________W6_____________ | - |__________________W1__________________| - -@end group -@end smallexample - -Evaluating now @code{(split-window W6 -3)} creates another internal -window @code{W3} with two children---@code{W6} and a new live window -@code{W5}. This leaves us with a vertically combined window @code{W3} -embedded in the horizontally combined window @code{W1}: -@smallexample -@group - ______________________________________ - | ______ ____________________________ | - || || __________________________ || - || ||| ||| - || ||| ||| - || ||| ||| - || ||| ||| - || ||| ||| - || |||____________W6____________||| - || || __________________________ || - || ||| ||| - || |||____________W5____________||| - ||__W2__||_____________W3_____________ | - |__________________W1__________________| - -@end group -@end smallexample - -Finally, evaluating @code{(split-window W6 nil t)} should get us the -desired configuration as depicted below. -@smallexample -@group - ______________________________________ - | ______ ____________________________ | - || || __________________________ || - || ||| ___________ ___________ ||| - || |||| || |||| - || |||| || |||| - || ||||_____W6____||_____W7____|||| + As an example, we show a combination of @code{split-window} calls +that yields the window configuration discussed in @ref{Windows and +Frames}. This example demonstrates splitting live windows as well as +splitting internal windows. We begin with a frame containing a single +window (a live root window), which we denote by @var{W4}. Calling +@code{(split-window W3)} yields this window configuration: + +@smallexample +@group + ______________________________________ + | ____________________________________ | + || || + || || + || || + ||_________________W4_________________|| + | ____________________________________ | + || || + || || + || || + ||_________________W5_________________|| + |__________________W3__________________| + +@end group +@end smallexample + +@noindent +The @code{split-window} call has created a new live window, denoted by +@var{W5}. It has also created a new internal window, denoted by +@var{W3}, which becomes the root window and the parent of both +@var{W4} and @var{W5}. + + Next, we call @code{(split-window W3 nil 'left)}, passing the +internal window @var{W3} as the argument. The result: + +@smallexample +@group + ______________________________________ + | ______ ____________________________ | + || || __________________________ || + || ||| ||| + || ||| ||| + || ||| ||| || |||____________W4____________||| || || __________________________ || || ||| ||| + || ||| ||| || |||____________W5____________||| ||__W2__||_____________W3_____________ | |__________________W1__________________| - -@end group -@end smallexample - -The scenario sketched above is the standard way to obtain the desired -configuration. In Emacs 23 it was also the only way to do that since -Emacs 23 didn't allow splitting internal windows. - -With Emacs 24 you can also proceed as follows: Split an initial window -@code{W6} by evaluating @code{(split-window W6 -3)} to produce the -following vertical combination: -@smallexample -@group - ______________________________________ - | ____________________________________ | - || || - || || - || || - || || - || || - || || - || || - ||_________________W6_________________|| - | ____________________________________ | - || || - ||_________________W5_________________|| - |__________________W3__________________| - -@end group -@end smallexample - -Evaluating now @code{(split-window (window-parent W6) -8 'left)} or, -equivalently, @code{(split-window W3 -8 'left)} should now produce the -penultimate configuration from the previous scenario from where we can -continue as described before. - - Another strategy starts with splitting an initial window @code{W6} by -evaluating @code{(split-window W6 nil nil t)} with the following result: -@smallexample -@group - ______________________________________ - | _________________ _________________ | - || || || - || || || - || || || - || || || - || || || - || || || - || || || - || || || - || || || - || || || - ||________W6_______||________W7_______|| - |__________________W4__________________| - -@end group -@end smallexample - -Evaluating now @code{(split-window W4 -3)} or @code{(split-window -(window-parent W6) -3)} should get us a configuration as shown next. -@smallexample -@group - ______________________________________ - | ____________________________________ | - || ________________ ________________ || - ||| || ||| - ||| || ||| - ||| || ||| - ||| || ||| - ||| || ||| - |||_______W6_______||________W7______||| - ||_________________W4_________________|| - | ____________________________________ | - || || - ||_________________W5_________________|| - |__________________W3__________________| - -@end group -@end smallexample - -The desired configuration can be now obtained by evaluating -@code{(split-window W3 -8 'left)} or, equivalently, @code{(split-window -(window-parent W5) -8 'left)}. - - For a final approach let's start with the configuration of two live -windows @code{W6} and @code{W7} shown above. If we now evaluate -@code{(split-window W4 -8 'left)} or @code{(split-window (window-parent -W6) -8 'left)} we get the following configuration. -@smallexample -@group - ______________________________________ - | ______ ____________________________ | - || || ____________ ____________ || - || ||| || ||| - || ||| || ||| - || ||| || ||| - || ||| || ||| - || ||| || ||| - || ||| || ||| - || ||| || ||| - || |||______W6____||______W7____||| - ||__W2__||_____________W4_____________|| - |__________________W1__________________| - -@end group -@end smallexample - -Evaluating now @code{(split-window W4 -3)} or, for example, -@code{(split-window (window-parent W6) -3)} should produce the desired -configuration. - - The two options described next can be used to tune the operation of +@end group +@end smallexample + +@noindent +A new live window, @var{W2}, is created to the left of @var{W3} (which +encompasses the vertical window combination of @var{W4} and @var{W5}). +A new internal window @var{W1} is also created, and becomes the new +root window. + + The following two options can be used to modify the operation of @code{split-window}. @defopt window-splits -If this variable is @code{nil}, the function @code{split-window} can -split a window if and only if that window's screen estate is -sufficiently large to accommodate both--itself and the new window. +If this variable is @code{nil}, @code{split-window} can only split a +window (denoted by @var{window}) if @var{window}'s screen area is +large enough to accommodate both itself and the new window. This is +the default. -If this variable is non-@code{nil}, @code{split-window} tries to resize -all windows that are part of the same combination as the old window to -accommodate the new window. Hence, the new window can be also created if -the old window is of fixed size or too small to split (@pxref{Window -Sizes}). +If this variable is non-@code{nil}, @code{split-window} tries to +resize all windows that are part of the same combination as +@var{window}, in order to accommodate the new window. In particular, +this may allow @code{split-window} to succeed even if @var{window} is +a fixed-size window or too small to ordinarily split. In any case, the value of this variable is assigned to the splits status of the new window and, provided old and new window form a new ------------------------------------------------------------ revno: 106332 committer: Paul Eggert branch nick: trunk timestamp: Tue 2011-11-08 22:10:51 -0800 message: Spelling fixes. diff: === modified file 'admin/charsets/mapfiles/Uni2JIS' --- admin/charsets/mapfiles/Uni2JIS 2011-08-12 16:24:44 +0000 +++ admin/charsets/mapfiles/Uni2JIS 2011-11-09 06:10:51 +0000 @@ -514,7 +514,7 @@ 045A S-0790 # CYRILLIC SMALL LETTER NJE 045B S-0791 # CYRILLIC SMALL LETTER TSHE (Serbocroatian) 045C S-0792 # CYRILLIC SMALL LETTER KJE -045E S-0793 # CYRILLIC SMALL LETTER SHORT U (Byalorussian) +045E S-0793 # CYRILLIC SMALL LETTER SHORT U (Byelorussian) 045F S-0794 # CYRILLIC SMALL LETTER DZHE 2010 0-0130 1-0130 2-0130 # HYPHEN 2014 0-0129 1-0129 2-0129 # EM DASH === modified file 'doc/misc/auth.texi' --- doc/misc/auth.texi 2011-03-13 04:07:38 +0000 +++ doc/misc/auth.texi 2011-11-09 06:10:51 +0000 @@ -64,13 +64,13 @@ @menu * Overview:: Overview of the auth-source library. -* Help for users:: -* Secret Service API:: -* Help for developers:: -* GnuPG and EasyPG Assistant Configuration:: -* Index:: -* Function Index:: -* Variable Index:: +* Help for users:: +* Secret Service API:: +* Help for developers:: +* GnuPG and EasyPG Assistant Configuration:: +* Index:: +* Function Index:: +* Variable Index:: @end menu @end ifnottex @@ -182,7 +182,7 @@ If you don't customize @code{auth-sources}, you'll have to live with the defaults: any host and any port are looked up in the netrc file @code{~/.authinfo.gpg}, which is a GnuPG encrypted file -(@pxref{GnuPG and EasyPG Assistant Configuration}). +(@pxref{GnuPG and EasyPG Assistant Configuration}). If that fails, the unencrypted netrc files @code{~/.authinfo} and @code{~/.netrc} will be used. @@ -340,7 +340,7 @@ @end lisp If you want your GnuPG passwords to be cached, set up @code{gpg-agent} -or EasyPG Assitant +or EasyPG Assistant (@pxref{Caching Passphrases, , Caching Passphrases, epa}). To quick start, here are some questions: === modified file 'doc/misc/gnus.texi' --- doc/misc/gnus.texi 2011-10-31 22:26:45 +0000 +++ doc/misc/gnus.texi 2011-11-09 06:10:51 +0000 @@ -1001,7 +1001,7 @@ you can press @kbd{RET} on a defined server to see all the groups it serves (subscribed or not!). You can also add or delete servers, edit a foreign server's definition, agentize or de-agentize a server, and -do many other neat things. @xref{Server Buffer}. +do many other neat things. @xref{Server Buffer}. @xref{Foreign Groups}. @xref{Agent Basics}. @vindex gnus-select-method @@ -11805,7 +11805,7 @@ To use this, make sure that you have @code{w3m} and @code{curl} installed. If you have, then Gnus should display @acronym{HTML} -automatically. +automatically. @@ -21078,8 +21078,8 @@ This chapter describes tools for searching groups and servers for articles matching a query and then retrieving those articles. Gnus -provides a simpler mechanism for searching through articles in a summary buffer -to find those matching a pattern. @xref{Searching for Articles}. +provides a simpler mechanism for searching through articles in a summary buffer +to find those matching a pattern. @xref{Searching for Articles}. @menu * nnir:: Searching with various engines. @@ -21110,7 +21110,7 @@ The @code{nnimap} and @code{gmane} search engines should work with no configuration. Other engines require a local index that needs to be -created and maintained outside of Gnus. +created and maintained outside of Gnus. @node Basic Usage @@ -21150,7 +21150,7 @@ features. You can access these special features by giving a prefix-arg to @code{gnus-group-make-nnir-group}. If you are searching multiple groups with different search engines you will be prompted for the -special search features for each engine separately. +special search features for each engine separately. @node Setting up nnir @@ -21191,7 +21191,7 @@ @lisp (setq gnus-secondary-select-methods - '((nnml "home" + '((nnml "home" (nnimap-address "localhost") (nnir-search-engine namazu)))) @end lisp @@ -21216,9 +21216,9 @@ @node The imap Engine @subsubsection The imap Engine -The @code{imap} engine requires no configuration. +The @code{imap} engine requires no configuration. -Queries using the @code{imap} engine follow a simple query language. +Queries using the @code{imap} engine follow a simple query language. The search is always case-insensitive and supports the following features (inspired by the Google search input language): @@ -21231,7 +21231,7 @@ recognised. Also preceding a term with a - sign is equivalent to NOT term. -@item Automatic AND queries +@item Automatic AND queries If you specify multiple words then they will be treated as an AND expression intended to match all components. @@ -21264,7 +21264,7 @@ @node The gmane Engine @subsubsection The gmane Engine -The @code{gmane} engine requires no configuration. +The @code{gmane} engine requires no configuration. Gmane queries follow a simple query language: @@ -21278,11 +21278,11 @@ @item Required and excluded terms + and - can be used to require or exclude terms, e.g. football -american -@item Unicode handling +@item Unicode handling The search engine converts all text to utf-8, so searching should work in any language. -@item Stopwords +@item Stopwords Common English words (like 'the' and 'a') are ignored by default. You can override this by prefixing such words with a + (e.g. +the) or enclosing the word in quotes (e.g. "the"). @@ -21345,7 +21345,7 @@ Using the namazu engine requires creating and maintaining index files. One directory should contain all the index files, and nnir must be told where to find them by setting the @code{nnir-namazu-index-directory} -variable. +variable. To work correctly the @code{nnir-namazu-remove-prefix} variable must also be correct. This is the prefix to remove from each file name @@ -21408,7 +21408,7 @@ This engine is obsolete. @node Customizations -@subsubsection Custimozations +@subsubsection Customizations @table @code === modified file 'leim/quail/ipa.el' --- leim/quail/ipa.el 2011-01-25 04:08:28 +0000 +++ leim/quail/ipa.el 2011-11-09 06:10:51 +0000 @@ -451,7 +451,7 @@ ;; them, and the recipient's client is capable, they will get through, ;; though. - ("_\"" "̈") ;; Centralised U+0308 + ("_\"" "̈") ;; Centralized U+0308 ("_+" "̟") ;; Advanced U+031F ("_-" "̠") ;; Retracted U+0320 ("_/" "ˇ") ;; Rising tone U+02C7 === modified file 'lisp/delim-col.el' --- lisp/delim-col.el 2011-04-19 13:44:55 +0000 +++ lisp/delim-col.el 2011-11-09 06:10:51 +0000 @@ -194,7 +194,7 @@ :tag "Column Formating" (const :tag "No Formating" nil) (const :tag "Column Alignment" t) - (const :tag "Separator Aligment" separator) + (const :tag "Separator Alignment" separator) (const :tag "Column Padding" padding)) :group 'columns) === modified file 'lisp/emulation/edt.el' --- lisp/emulation/edt.el 2011-10-30 01:56:03 +0000 +++ lisp/emulation/edt.el 2011-11-09 06:10:51 +0000 @@ -2484,7 +2484,7 @@ F10: Cut Rectangle G-F10: Paste Rectangle F11: ESC - F12: Begining of Line +----------+----------+----------+----------+ + F12: Beginning of Line +----------+----------+----------+----------+ G-F12: Delete Other Windows | GOLD | HELP | FNDNXT | DEL L | F13: Delete to Begin of Word | (PF1) | (PF2) | (PF3) | (PF4) | HELP: Keypad Help |Mark Wisel|Desc Funct| FIND | UND L | === modified file 'lisp/generic-x.el' --- lisp/generic-x.el 2011-04-19 13:44:55 +0000 +++ lisp/generic-x.el 2011-11-09 06:10:51 +0000 @@ -1436,7 +1436,7 @@ "REGDB_APPPATH" "REGDB_BINARY" "REGDB_ERR_CONNECTIONEXISTS" - "REGDB_ERR_CORRUPTEDREGSITRY" + "REGDB_ERR_CORRUPTEDREGISTRY" "REGDB_ERR_INITIALIZATION" "REGDB_ERR_INVALIDHANDLE" "REGDB_ERR_INVALIDNAME" === modified file 'lisp/gnus/smime.el' --- lisp/gnus/smime.el 2011-01-25 04:08:28 +0000 +++ lisp/gnus/smime.el 2011-11-09 06:10:51 +0000 @@ -689,7 +689,7 @@ (dolist (key smime-keys) (insert (format "\t\t%s: %s\n" (car key) (cadr key)))) - (insert "\nTrusted Certificate Authoritys:\n") + (insert "\nTrusted Certificate Authorities:\n") (insert "\nKnown Certificates:\n")))) (defun smime () === modified file 'lisp/international/robin.el' --- lisp/international/robin.el 2011-01-15 23:16:57 +0000 +++ lisp/international/robin.el 2011-11-09 06:10:51 +0000 @@ -22,7 +22,7 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . -;;; Comentary: +;;; Commentary: ;; Functionalities ;; --------------- === modified file 'lisp/net/secrets.el' --- lisp/net/secrets.el 2011-01-25 04:08:28 +0000 +++ lisp/net/secrets.el 2011-11-09 06:10:51 +0000 @@ -774,7 +774,7 @@ (cons (1+ (length "password")) (mapcar - ;; Atribute names have a leading ":", which will be suppressed. + ;; Attribute names have a leading ":", which will be suppressed. (lambda (attribute) (length (symbol-name (car attribute)))) attributes))))) (cons === modified file 'lisp/org/org-agenda.el' --- lisp/org/org-agenda.el 2011-09-02 16:38:40 +0000 +++ lisp/org/org-agenda.el 2011-11-09 06:10:51 +0000 @@ -764,7 +764,7 @@ :group 'org-agenda-skip :group 'org-agenda-daily/weekly :type '(choice - (const :tag "Alwas show prewarning" nil) + (const :tag "Always show prewarning" nil) (const :tag "Remove prewarning if entry is scheduled" t) (integer :tag "Restart prewarning N days before deadline"))) @@ -1388,13 +1388,13 @@ (tags . " %i %-12:c") (search . " %i %-12:c")) "Format specifications for the prefix of items in the agenda views. -An alist with five entries, each for the different agenda types. The -keys of the sublists are `agenda', `timeline', `todo', `search' and `tags'. +An alist with five entries, each for the different agenda types. The +keys of the sublists are `agenda', `timeline', `todo', `search' and `tags'. The values are format strings. This format works similar to a printf format, with the following meaning: - %c the category of the item, \"Diary\" for entries from the diary, + %c the category of the item, \"Diary\" for entries from the diary, or as given by the CATEGORY keyword or derived from the file name %i the icon category of the item, see `org-agenda-category-icon-alist' %T the last tag of the item (ignore inherited tags, which come first) @@ -1408,10 +1408,10 @@ and a whitespace/punctuation character just before the final letter. If the first character after `%' is a question mark, the entire field -will only be included if the corresponding value applies to the current -entry. This is useful for fields which should have fixed width when -present, but zero width when absent. For example, \"%?-12t\" will -result in a 12 character time field if a time of the day is specified, +will only be included if the corresponding value applies to the current +entry. This is useful for fields which should have fixed width when +present, but zero width when absent. For example, \"%?-12t\" will +result in a 12 character time field if a time of the day is specified, but will completely disappear in entries which do not contain a time. If there is punctuation or whitespace character just before the final @@ -1420,7 +1420,7 @@ \"Diary: \" if the category is \"Diary\". If the category were be empty, no additional colon would be inserted. -The default value for the agenda sublist is \" %-12:c%?-12t% s\", +The default value for the agenda sublist is \" %-12:c%?-12t% s\", which means: - Indent the line with two space characters @@ -1697,7 +1697,7 @@ (?C bulk-cut)) With selected entries in an agenda buffer, `B R' will call -the custom function `set-category' on the selected entries. +the custom function `set-category' on the selected entries. Note that functions in this alist don't need to be quoted." :type 'alist :group 'org-agenda) @@ -5003,9 +5003,9 @@ "\\(-\\{1,3\\}\\(\\[.*?\\]\\)\\)?")) ; group 3 is second (tlstart 0.) (tlend 0.) - (maxtime (org-hh:mm-string-to-minutes + (maxtime (org-hh:mm-string-to-minutes (or (plist-get pl :max-duration) "24:00"))) - (mintime (org-hh:mm-string-to-minutes + (mintime (org-hh:mm-string-to-minutes (or (plist-get pl :min-duration) 0))) (maxgap (org-hh:mm-string-to-minutes ;; default 30:00 means never complain === modified file 'lisp/progmodes/cperl-mode.el' --- lisp/progmodes/cperl-mode.el 2011-07-13 17:47:17 +0000 +++ lisp/progmodes/cperl-mode.el 2011-11-09 06:10:51 +0000 @@ -6481,7 +6481,7 @@ The current value of style is memorized (unless there is a memorized data already), may be restored by `cperl-set-style-back'. -Chosing \"Current\" style will not change style, so this may be used for +Choosing \"Current\" style will not change style, so this may be used for side-effect of memorizing only. Examples in `cperl-style-examples'." (interactive (let ((list (mapcar (function (lambda (elt) (list (car elt)))) === modified file 'lisp/progmodes/gdb-mi.el' --- lisp/progmodes/gdb-mi.el 2011-10-30 01:56:03 +0000 +++ lisp/progmodes/gdb-mi.el 2011-11-09 06:10:51 +0000 @@ -1965,7 +1965,7 @@ (setq gud-running t) ;; GDB doesn't seem to respond to -thread-info before first stop or ;; thread exit (even in non-stop mode), so this is useless. - ;; Behaviour may change in the future. + ;; Behavior may change in the future. (gdb-emit-signal gdb-buf-publisher 'update-threads)) ;; -break-insert -t didn't give a reason before gdb 6.9 === modified file 'lisp/progmodes/vhdl-mode.el' --- lisp/progmodes/vhdl-mode.el 2011-10-20 00:26:14 +0000 +++ lisp/progmodes/vhdl-mode.el 2011-11-09 06:10:51 +0000 @@ -3510,7 +3510,7 @@ menu-list)) (setq comp-alist (cdr comp-alist))) (setq menu-list (nreverse menu-list)) - (vhdl-menu-split menu-list "Compler"))) + (vhdl-menu-split menu-list "Compiler"))) ["Use Local Error Regexp" (customize-set-variable 'vhdl-compile-use-local-error-regexp (not vhdl-compile-use-local-error-regexp)) === modified file 'lisp/rot13.el' --- lisp/rot13.el 2011-01-25 04:08:28 +0000 +++ lisp/rot13.el 2011-11-09 06:10:51 +0000 @@ -32,7 +32,7 @@ ;; This hack is mainly to show off the char table stuff. ;; ;; New entry points, `rot13', `rot13-string', and `rot13-region' that -;; performs Ceasar cipher encrypt/decrypt on buffers and strings, was +;; performs Caesar cipher encrypt/decrypt on buffers and strings, was ;; added by Simon Josefsson. ;;; Code: === modified file 'lisp/textmodes/reftex-parse.el' --- lisp/textmodes/reftex-parse.el 2011-06-30 02:50:20 +0000 +++ lisp/textmodes/reftex-parse.el 2011-11-09 06:10:51 +0000 @@ -443,7 +443,7 @@ (defvar test-dummy) (defun reftex-index-info (file) ;; Return an index entry for the current match. - ;; Carefull: This function expects the match-data to be still in place! + ;; Careful: This function expects the match-data to be still in place! (catch 'exit (let* ((macro (reftex-match-string 10)) (bom (match-beginning 10)) === modified file 'lisp/textmodes/rst.el' --- lisp/textmodes/rst.el 2011-10-20 00:26:14 +0000 +++ lisp/textmodes/rst.el 2011-11-09 06:10:51 +0000 @@ -476,8 +476,8 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Section Decoration Adjusment -;; ============================ +;; Section Decoration Adjustment +;; ============================= ;; ;; The following functions implement a smart automatic title sectioning feature. ;; The idea is that with the cursor sitting on a section title, we try to get as === modified file 'lisp/url/url-http.el' --- lisp/url/url-http.el 2011-09-24 22:58:40 +0000 +++ lisp/url/url-http.el 2011-11-09 06:10:51 +0000 @@ -257,7 +257,7 @@ (if (not (equal extra-headers "")) (setq extra-headers (concat extra-headers "\r\n"))) - ;; This was done with a call to `format'. Concatting parts has + ;; This was done with a call to `format'. Concatenating parts has ;; the advantage of keeping the parts of each header together and ;; allows us to elide null lines directly, at the cost of making ;; the layout less clear. === modified file 'lisp/woman.el' --- lisp/woman.el 2011-09-18 16:03:48 +0000 +++ lisp/woman.el 2011-11-09 06:10:51 +0000 @@ -1440,7 +1440,7 @@ files)) (setq path-index (1+ path-index))) ;; Uniquefy topics: - ;; Concate all lists with a single nconc call to + ;; Concatenate all lists with a single nconc call to ;; avoid retraversing the first lists repeatedly -- dak (woman-topic-all-completions-merge (apply #'nconc files)))) === modified file 'src/ccl.c' --- src/ccl.c 2011-09-09 01:06:52 +0000 +++ src/ccl.c 2011-11-09 06:10:51 +0000 @@ -429,7 +429,7 @@ #define CCL_Extension 0x1F /* Extended CCL code 1:ExtendedCOMMNDRrrRRRrrrXXXXX - 2:ARGUEMENT + 2:ARGUMENT 3:... ------------------------------ extended_command (rrr,RRR,Rrr,ARGS) === modified file 'src/font.c' --- src/font.c 2011-09-09 01:06:52 +0000 +++ src/font.c 2011-11-09 06:10:51 +0000 @@ -162,7 +162,7 @@ -/* Creaters of font-related Lisp object. */ +/* Creators of font-related Lisp object. */ static Lisp_Object font_make_spec (void) ------------------------------------------------------------ revno: 106331 fixes bug(s): http://debbugs.gnu.org/9926 committer: Paul Eggert branch nick: trunk timestamp: Tue 2011-11-08 12:15:17 -0800 message: * s/gnu.h (GC_MARK_STACK): Define to GC_MAKE_GCPROS_NOOPS (Bug#9926). diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-11-08 20:05:27 +0000 +++ src/ChangeLog 2011-11-08 20:15:17 +0000 @@ -1,5 +1,9 @@ 2011-11-08 Paul Eggert + * s/gnu.h (GC_MARK_STACK): Define to GC_MAKE_GCPROS_NOOPS (Bug#9926). + +2011-11-08 Paul Eggert + Avoid some portability problems by eschewing 'extern inline' functions. The trivial performance wins aren't worth the portability hassles; see === modified file 'src/s/gnu.h' --- src/s/gnu.h 2011-09-09 01:06:52 +0000 +++ src/s/gnu.h 2011-11-08 20:15:17 +0000 @@ -44,3 +44,5 @@ #endif /* !_IO_STDIO_H */ #endif /* emacs */ +/* Use the GC_MAKE_GCPROS_NOOPS (see lisp.h) method for marking the stack. */ +#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS ------------------------------------------------------------ revno: 106330 committer: Paul Eggert branch nick: trunk timestamp: Tue 2011-11-08 12:05:27 -0800 message: Avoid some portability problems by eschewing 'extern inline' functions. The trivial performance wins aren't worth the portability hassles; see et seq. * dispextern.h (window_box, window_box_height, window_text_bottom_y) (window_box_width, window_box_left, window_box_left_offset) (window_box_right, window_box_right_offset): Undo previous change, by removing the "extern"s. * intervals.c (adjust_intervals_for_insertion) (adjust_intervals_for_deletion): Undo previous change, making these static again. (offset_intervals, temp_set_point_both, temp_set_point) (copy_intervals_to_string): No longer inline. * xdisp.c (window_text_bottom_y, window_box_width) (window_box_height, window_box_left_offset) (window_box_right_offset, window_box_left, window_box_right) (window_box): No longer inline. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-11-08 07:25:56 +0000 +++ src/ChangeLog 2011-11-08 20:05:27 +0000 @@ -1,3 +1,23 @@ +2011-11-08 Paul Eggert + + Avoid some portability problems by eschewing 'extern inline' functions. + The trivial performance wins aren't worth the portability hassles; see + + et seq. + * dispextern.h (window_box, window_box_height, window_text_bottom_y) + (window_box_width, window_box_left, window_box_left_offset) + (window_box_right, window_box_right_offset): Undo previous change, + by removing the "extern"s. + * intervals.c (adjust_intervals_for_insertion) + (adjust_intervals_for_deletion): Undo previous change, + making these static again. + (offset_intervals, temp_set_point_both, temp_set_point) + (copy_intervals_to_string): No longer inline. + * xdisp.c (window_text_bottom_y, window_box_width) + (window_box_height, window_box_left_offset) + (window_box_right_offset, window_box_left, window_box_right) + (window_box): No longer inline. + 2011-11-08 Chong Yidong * window.c (Fwindow_left_column, Fwindow_top_line): Doc fix. === modified file 'src/dispextern.h' --- src/dispextern.h 2011-11-06 21:12:10 +0000 +++ src/dispextern.h 2011-11-08 20:05:27 +0000 @@ -3006,14 +3006,14 @@ void set_vertical_scroll_bar (struct window *); #endif int try_window (Lisp_Object, struct text_pos, int); -extern void window_box (struct window *, int, int *, int *, int *, int *); -extern int window_box_height (struct window *); -extern int window_text_bottom_y (struct window *); -extern int window_box_width (struct window *, int); -extern int window_box_left (struct window *, int); -extern int window_box_left_offset (struct window *, int); -extern int window_box_right (struct window *, int); -extern int window_box_right_offset (struct window *, int); +void window_box (struct window *, int, int *, int *, int *, int *); +int window_box_height (struct window *); +int window_text_bottom_y (struct window *); +int window_box_width (struct window *, int); +int window_box_left (struct window *, int); +int window_box_left_offset (struct window *, int); +int window_box_right (struct window *, int); +int window_box_right_offset (struct window *, int); int estimate_mode_line_height (struct frame *, enum face_id); void pixel_to_glyph_coords (struct frame *, int, int, int *, int *, NativeRectangle *, int); === modified file 'src/intervals.c' --- src/intervals.c 2011-11-06 21:12:10 +0000 +++ src/intervals.c 2011-11-08 20:05:27 +0000 @@ -52,11 +52,6 @@ #define TMEM(sym, set) (CONSP (set) ? ! NILP (Fmemq (sym, set)) : ! NILP (set)) -extern INTERVAL adjust_intervals_for_insertion (INTERVAL, - EMACS_INT, EMACS_INT); -extern void adjust_intervals_for_deletion (struct buffer *, - EMACS_INT, EMACS_INT); - static Lisp_Object merge_properties_sticky (Lisp_Object, Lisp_Object); static INTERVAL merge_interval_right (INTERVAL); static INTERVAL reproduce_tree (INTERVAL, INTERVAL); @@ -803,7 +798,7 @@ and check the hungry bits of both. Then add the length going back up to the root. */ -INTERVAL +static INTERVAL adjust_intervals_for_insertion (INTERVAL tree, EMACS_INT position, EMACS_INT length) { @@ -864,7 +859,7 @@ interval. Another possibility would be to create a new interval for this text, and make it have the merged properties of both ends. */ -INTERVAL +static INTERVAL adjust_intervals_for_insertion (INTERVAL tree, EMACS_INT position, EMACS_INT length) { @@ -1374,7 +1369,7 @@ text. The deletion is effected at position START (which is a buffer position, i.e. origin 1). */ -void +static void adjust_intervals_for_deletion (struct buffer *buffer, EMACS_INT start, EMACS_INT length) { @@ -1430,7 +1425,7 @@ compiler that does not allow calling a static function (here, adjust_intervals_for_deletion) from a non-static inline function. */ -inline void +void offset_intervals (struct buffer *buffer, EMACS_INT start, EMACS_INT length) { if (NULL_INTERVAL_P (BUF_INTERVALS (buffer)) || length == 0) @@ -1882,7 +1877,7 @@ /* Set point in BUFFER "temporarily" to CHARPOS, which corresponds to byte position BYTEPOS. */ -inline void +void temp_set_point_both (struct buffer *buffer, EMACS_INT charpos, EMACS_INT bytepos) { @@ -1902,7 +1897,7 @@ /* Set point "temporarily", without checking any text properties. */ -inline void +void temp_set_point (struct buffer *buffer, EMACS_INT charpos) { temp_set_point_both (buffer, charpos, @@ -2391,7 +2386,7 @@ /* Give STRING the properties of BUFFER from POSITION to LENGTH. */ -inline void +void copy_intervals_to_string (Lisp_Object string, struct buffer *buffer, EMACS_INT position, EMACS_INT length) { === modified file 'src/xdisp.c' --- src/xdisp.c 2011-11-06 18:21:52 +0000 +++ src/xdisp.c 2011-11-08 20:05:27 +0000 @@ -954,7 +954,7 @@ This is the height of W minus the height of a mode line, if any. */ -inline int +int window_text_bottom_y (struct window *w) { int height = WINDOW_TOTAL_HEIGHT (w); @@ -968,7 +968,7 @@ means return the total width of W, not including fringes to the left and right of the window. */ -inline int +int window_box_width (struct window *w, int area) { int cols = XFASTINT (w->total_cols); @@ -1007,7 +1007,7 @@ /* Return the pixel height of the display area of window W, not including mode lines of W, if any. */ -inline int +int window_box_height (struct window *w) { struct frame *f = XFRAME (w->frame); @@ -1054,7 +1054,7 @@ area AREA of window W. AREA < 0 means return the left edge of the whole window, to the right of the left fringe of W. */ -inline int +int window_box_left_offset (struct window *w, int area) { int x; @@ -1086,7 +1086,7 @@ area AREA of window W. AREA < 0 means return the right edge of the whole window, to the left of the right fringe of W. */ -inline int +int window_box_right_offset (struct window *w, int area) { return window_box_left_offset (w, area) + window_box_width (w, area); @@ -1096,7 +1096,7 @@ area AREA of window W. AREA < 0 means return the left edge of the whole window, to the right of the left fringe of W. */ -inline int +int window_box_left (struct window *w, int area) { struct frame *f = XFRAME (w->frame); @@ -1116,7 +1116,7 @@ area AREA of window W. AREA < 0 means return the right edge of the whole window, to the left of the right fringe of W. */ -inline int +int window_box_right (struct window *w, int area) { return window_box_left (w, area) + window_box_width (w, area); @@ -1129,7 +1129,7 @@ coordinates of the upper-left corner of the box. Return in *BOX_WIDTH, and *BOX_HEIGHT the pixel width and height of the box. */ -inline void +void window_box (struct window *w, int area, int *box_x, int *box_y, int *box_width, int *box_height) { ------------------------------------------------------------ revno: 106329 committer: Glenn Morris branch nick: trunk timestamp: Tue 2011-11-08 14:19:36 -0500 message: delphi syntax table fix for bug#9994 * lisp/progmodes/delphi.el (delphi-mode-syntax-table): Let define-derived-mode define a proper syntax table. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-11-08 19:06:29 +0000 +++ lisp/ChangeLog 2011-11-08 19:19:36 +0000 @@ -1,3 +1,8 @@ +2011-11-08 Glenn Morris + + * progmodes/delphi.el (delphi-mode-syntax-table): + Let define-derived-mode define a proper syntax table. (Bug#9994) + 2011-11-08 Stefan Monnier * window.el: Stay away from defsubst. === modified file 'lisp/progmodes/delphi.el' --- lisp/progmodes/delphi.el 2011-06-18 16:23:11 +0000 +++ lisp/progmodes/delphi.el 2011-11-08 19:19:36 +0000 @@ -1959,10 +1959,6 @@ kmap) "Keymap used in Delphi mode.") -(defvar delphi-mode-syntax-table nil - "Delphi mode's syntax table. It is just a standard syntax table. -This is ok since we do our own keyword/comment/string face coloring.") - ;;;###autoload (define-derived-mode delphi-mode prog-mode "Delphi" "Major mode for editing Delphi code. \\ ------------------------------------------------------------ revno: 106328 committer: martin rudalics branch nick: trunk timestamp: Tue 2011-11-08 20:06:29 +0100 message: Fix doc-string typo in window-min-delta diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-11-08 16:52:10 +0000 +++ lisp/ChangeLog 2011-11-08 19:06:29 +0000 @@ -14,6 +14,7 @@ * window.el (display-buffer-function, special-display-function): Mention display-buffer-record-window but do not mention help-setup parameter in doc-strings. + (window-min-delta): Fix doc-string typo. 2011-11-08 Chong Yidong === modified file 'lisp/window.el' --- lisp/window.el 2011-11-08 16:52:10 +0000 +++ lisp/window.el 2011-11-08 19:06:29 +0000 @@ -772,7 +772,7 @@ Optional argument NODOWN non-nil means don't check whether WINDOW itself \(and its child windows) can be shrunk; check only whether -at least one other windows can be enlarged appropriately." +at least one other window can be enlarged appropriately." (setq window (window-normalize-window window)) (let ((size (window-total-size window horizontal)) (minimum (window-min-size window horizontal ignore))) ------------------------------------------------------------ revno: 106327 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2011-11-08 11:52:10 -0500 message: * lisp/window.el: Stay away from defsubst. (window-list-no-nils): Remove. (window-state-get-1, window-state-get): Use backquote instead. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-11-08 15:08:59 +0000 +++ lisp/ChangeLog 2011-11-08 16:52:10 +0000 @@ -1,6 +1,12 @@ +2011-11-08 Stefan Monnier + + * window.el: Stay away from defsubst. + (window-list-no-nils): Remove. + (window-state-get-1, window-state-get): Use backquote instead. + 2011-11-08 thierry - * emacs-lisp/find-func.el (find-function-read): + * emacs-lisp/find-func.el (find-function-read): Fix incorrect use of default argument in `completing-read'. 2011-11-08 Martin Rudalics === modified file 'lisp/window.el' --- lisp/window.el 2011-11-08 09:33:22 +0000 +++ lisp/window.el 2011-11-08 16:52:10 +0000 @@ -68,19 +68,19 @@ ;; they don't substitute the selected window for nil), and they return ;; nil when WINDOW doesn't have a parent (like a frame's root window or ;; a minibuffer window). -(defsubst window-right (window) +(defun window-right (window) "Return WINDOW's right sibling. Return nil if WINDOW is the root window of its frame. WINDOW can be any window." (and window (window-parent window) (window-next-sibling window))) -(defsubst window-left (window) +(defun window-left (window) "Return WINDOW's left sibling. Return nil if WINDOW is the root window of its frame. WINDOW can be any window." (and window (window-parent window) (window-prev-sibling window))) -(defsubst window-child (window) +(defun window-child (window) "Return WINDOW's first child window." (or (window-top-child window) (window-left-child window))) @@ -100,7 +100,7 @@ (setq window (window-next-sibling window)))) window) -(defsubst window-valid-p (object) +(defun window-valid-p (object) "Return t if OBJECT denotes a live window or internal window. Otherwise, return nil; this includes the case where OBJECT is a deleted window." @@ -108,7 +108,7 @@ (or (window-buffer object) (window-child object)) t)) -(defsubst window-normalize-buffer (buffer-or-name) +(defun window-normalize-buffer (buffer-or-name) "Return buffer specified by BUFFER-OR-NAME. BUFFER-OR-NAME must be either a buffer or a string naming a live buffer and defaults to the current buffer." @@ -123,7 +123,7 @@ (t (error "No such buffer %s" buffer-or-name)))) -(defsubst window-normalize-frame (frame) +(defun window-normalize-frame (frame) "Return frame specified by FRAME. FRAME must be a live frame and defaults to the selected frame." (if frame @@ -132,7 +132,7 @@ (error "%s is not a live frame" frame)) (selected-frame))) -(defsubst window-normalize-window (window &optional live-only) +(defun window-normalize-window (window &optional live-only) "Return window specified by WINDOW. If WINDOW is nil, return `selected-window'. If WINDOW is a live window or internal window, return WINDOW; @@ -195,7 +195,7 @@ :version "24.1" :group 'windows) -(defsubst window-combined-p (&optional window horizontal) +(defun window-combined-p (&optional window horizontal) "Return non-nil if WINDOW has siblings in a given direction. If WINDOW is omitted or nil, it defaults to the selected window. @@ -530,7 +530,7 @@ window).") (make-variable-buffer-local 'window-size-fixed) -(defsubst window-size-ignore (window ignore) +(defun window-size-ignore (window ignore) "Return non-nil if IGNORE says to ignore size restrictions for WINDOW." (if (window-valid-p ignore) (eq window ignore) ignore)) @@ -655,7 +655,7 @@ delta)) (t 0))) -(defsubst window-sizable-p (window delta &optional horizontal ignore) +(defun window-sizable-p (window delta &optional horizontal ignore) "Return t if WINDOW can be resized by DELTA lines. For the meaning of the arguments of this function see the doc-string of `window-sizable'." @@ -935,7 +935,7 @@ (defalias 'window-height 'window-total-height) ;; See discussion in bug#4543. -(defsubst window-full-height-p (&optional window) +(defun window-full-height-p (&optional window) "Return t if WINDOW is as high as the containing frame. More precisely, return t if and only if the total height of WINDOW equals the total height of the root window of WINDOW's @@ -945,7 +945,7 @@ (= (window-total-size window) (window-total-size (frame-root-window window)))) -(defsubst window-full-width-p (&optional window) +(defun window-full-width-p (&optional window) "Return t if WINDOW is as wide as the containing frame. More precisely, return t if and only if the total width of WINDOW equals the total width of the root window of WINDOW's frame. @@ -1501,7 +1501,7 @@ (t (error "Cannot resize window %s" window))))) -(defsubst window--resize-child-windows-skip-p (window) +(defun window--resize-child-windows-skip-p (window) "Return non-nil if WINDOW shall be skipped by resizing routines." (memq (window-new-normal window) '(ignore stuck skip))) @@ -2146,7 +2146,7 @@ (window-resize window (- (window-min-delta window))) (window-resize window (- (window-min-delta window t)) t)) -(defsubst frame-root-window-p (window) +(defun frame-root-window-p (window) "Return non-nil if WINDOW is the root window of its frame." (eq window (frame-root-window window))) @@ -3019,7 +3019,7 @@ (unrecord-window-buffer window buffer))))) ;;; Splitting windows. -(defsubst window-split-min-size (&optional horizontal) +(defun window-split-min-size (&optional horizontal) "Return minimum height of any window when splitting windows. Optional argument HORIZONTAL non-nil means return minimum width." (if horizontal @@ -3562,10 +3562,6 @@ )) ;;; Window states, how to get them and how to put them in a window. -(defsubst window-list-no-nils (&rest args) - "Like LIST but do not add nil elements of ARGS." - (delq nil (apply 'list args))) - (defvar window-state-ignored-parameters '(quit-restore) "List of window parameters ignored by `window-state-get'.") @@ -3579,46 +3575,47 @@ (buffer (window-buffer window)) (selected (eq window (selected-window))) (head - (window-list-no-nils - type - (unless (window-next-sibling window) (cons 'last t)) - (cons 'total-height (window-total-size window)) - (cons 'total-width (window-total-size window t)) - (cons 'normal-height (window-normal-size window)) - (cons 'normal-width (window-normal-size window t)) - (cons 'splits (window-splits window)) - (cons 'nest (window-nest window)) - (let (list) - (dolist (parameter (window-parameters window)) - (unless (memq (car parameter) - window-state-ignored-parameters) - (setq list (cons parameter list)))) - (unless (window-parameter window 'clone-of) - ;; Make a clone-of parameter. - (setq list (cons (cons 'clone-of window) list))) - (when list - (cons 'parameters list))) - (when buffer - ;; All buffer related things go in here - make the buffer - ;; current when retrieving `point' and `mark'. - (with-current-buffer (window-buffer window) - (let ((point (window-point-1 window)) - (start (window-start window)) - (mark (mark))) - (window-list-no-nils - 'buffer (buffer-name buffer) - (cons 'selected selected) - (when window-size-fixed (cons 'size-fixed window-size-fixed)) - (cons 'hscroll (window-hscroll window)) - (cons 'fringes (window-fringes window)) - (cons 'margins (window-margins window)) - (cons 'scroll-bars (window-scroll-bars window)) - (cons 'vscroll (window-vscroll window)) - (cons 'dedicated (window-dedicated-p window)) - (cons 'point (if markers (copy-marker point) point)) - (cons 'start (if markers (copy-marker start) start)) - (when mark - (cons 'mark (if markers (copy-marker mark) mark))))))))) + `(,type + ,@(unless (window-next-sibling window) `((last . t))) + (total-height . ,(window-total-size window)) + (total-width . ,(window-total-size window t)) + (normal-height . ,(window-normal-size window)) + (normal-width . ,(window-normal-size window t)) + (splits . ,(window-splits window)) + (nest . ,(window-nest window)) + ,@(let (list) + (dolist (parameter (window-parameters window)) + (unless (memq (car parameter) + window-state-ignored-parameters) + (setq list (cons parameter list)))) + (unless (window-parameter window 'clone-of) + ;; Make a clone-of parameter. + (setq list (cons (cons 'clone-of window) list))) + (when list + `((parameters . ,list)))) + ,@(when buffer + ;; All buffer related things go in here - make the buffer + ;; current when retrieving `point' and `mark'. + (with-current-buffer (window-buffer window) + (let ((point (window-point-1 window)) + (start (window-start window)) + (mark (mark))) + `((buffer + ,(buffer-name buffer) + (selected . ,selected) + ,@(when window-size-fixed + `((size-fixed . ,window-size-fixed))) + (hscroll . ,(window-hscroll window)) + (fringes . ,(window-fringes window)) + (margins . ,(window-margins window)) + (scroll-bars . ,(window-scroll-bars window)) + (vscroll . ,(window-vscroll window)) + (dedicated . ,(window-dedicated-p window)) + (point . ,(if markers (copy-marker point) point)) + (start . ,(if markers (copy-marker start) start)) + ,@(when mark + `((mark . ,(if markers + (copy-marker mark) mark))))))))))) (tail (when (memq type '(vc hc)) (let (list) @@ -3654,16 +3651,15 @@ (cons ;; Frame related things would go into a function, say `frame-state', ;; calling `window-state-get' to insert the frame's root window. - (window-list-no-nils - (cons 'min-height (window-min-size window)) - (cons 'min-width (window-min-size window t)) - (cons 'min-height-ignore (window-min-size window nil t)) - (cons 'min-width-ignore (window-min-size window t t)) - (cons 'min-height-safe (window-min-size window nil 'safe)) - (cons 'min-width-safe (window-min-size window t 'safe)) - ;; These are probably not needed. - (when (window-size-fixed-p window) (cons 'fixed-height t)) - (when (window-size-fixed-p window t) (cons 'fixed-width t))) + `((min-height . ,(window-min-size window)) + (min-width . ,(window-min-size window t)) + (min-height-ignore . ,(window-min-size window nil t)) + (min-width-ignore . ,(window-min-size window t t)) + (min-height-safe . ,(window-min-size window nil 'safe)) + (min-width-safe . ,(window-min-size window t 'safe)) + ;; These are probably not needed. + ,@(when (window-size-fixed-p window) `((fixed-height . t))) + ,@(when (window-size-fixed-p window t) `((fixed-width . t)))) (window-state-get-1 window markers))) (defvar window-state-put-list nil @@ -4172,6 +4168,7 @@ (make-frame (append args special-display-frame-alist)))) (window (frame-selected-window frame))) (display-buffer-record-window 'frame window buffer) + ;; FIXME: Use window--display-buffer-2? (set-window-buffer window buffer) ;; Reset list of WINDOW's previous buffers to nil. (set-window-prev-buffers window nil) ------------------------------------------------------------ revno: 106326 committer: Chong Yidong branch nick: trunk timestamp: Tue 2011-11-08 23:34:21 +0800 message: * doc/lispref/windows.texi (Resizing Windows): Simplify introduction. Don't document enlarge-window, shrink-window, enlarge-window-horizontally, and shrink-window-horizontally; they are no longer preferred for calling from Lisp, and are already documented in the Emacs manual. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2011-11-08 07:43:30 +0000 +++ doc/lispref/ChangeLog 2011-11-08 15:34:21 +0000 @@ -4,6 +4,10 @@ window-text-height. Remove window-min-height and window-min-width discussion, referring instead to Emacs manual. (Splitting Windows, Resizing Windows): Add xref to Emacs manual. + (Resizing Windows): Simplify introduction. Don't document + enlarge-window, shrink-window, enlarge-window-horizontally, and + shrink-window-horizontally; they are no longer preferred for + calling from Lisp, and are already documented in the Emacs manual. 2011-11-07 Glenn Morris === modified file 'doc/lispref/windows.texi' --- doc/lispref/windows.texi 2011-11-08 07:43:30 +0000 +++ doc/lispref/windows.texi 2011-11-08 15:34:21 +0000 @@ -274,7 +274,7 @@ @defun window-combined-p &optional window horizontal This function returns a non-@code{nil} value if and only if @var{window} is part of a vertical combination. If @var{window} is -omitted or nil, it defaults to the selected one. +omitted or @code{nil}, it defaults to the selected one. If the optional argument @var{horizontal} is non-@code{nil}, this means to return non-@code{nil} if and only if @var{window} is part of @@ -542,138 +542,74 @@ @cindex changing window size @cindex window size, changing -Emacs does not permit overlapping windows or gaps between windows, so -changing the size of a window always affects at least one other window. -When a frame contains just one window, that window can be resized only -by resizing the window's frame. The functions described below are -therefore meaningful only in the context of a frame containing at least -two windows. The size of the corresponding frame never changes when -invoking a function described in this section. - - The routines changing window sizes always operate in one dimension at -a time. This means that windows can be resized only either vertically -or horizontally. If a window shall be resized in both dimensions, it -must be resized in one dimension first and in the other dimension -afterwards. If the second resize operation fails, the frame might end -up in an unsatisfactory state. To avoid such states, it might be useful -to save the current window configuration (@pxref{Window Configurations}) -before attempting the first resize operation and restore the saved -configuration in case the second resize operation fails. - - Functions that resize windows are supposed to obey restrictions -imposed by window minimum sizes and fixed-size windows, see @ref{Window -Sizes}. In order to determine whether resizing a specific window is -possible in the first place, the following function can be used: + This section describes functions for resizing a window without +changing the size of its frame. Because live windows do not overlap, +these functions are meaningful only on frames that contain two or more +windows: resizing a window also changes the size of a neighboring +window. If there is just one window on a frame, its size cannot be +changed except by resizing the frame (@pxref{Size and Position}). + + Except where noted, these functions also accept internal windows as +arguments. Resizing an internal window causes its child windows to be +resized to fit the same space. @defun window-resizable window delta &optional horizontal ignore side noup nodown This function returns @var{delta} if the size of @var{window} can be -changed vertically by @var{delta} lines. Optional argument -@var{horizontal} non-@code{nil} means to return @var{delta} if -@var{window} can be resized horizontally by @var{delta} columns. A -return value of zero means that @var{window} is not resizable. - -If @var{delta} is a positive number, this means that @var{window} shall -be enlarged by @var{delta} lines or columns. If @var{window} cannot be -enlarged by @var{delta} lines or columns, this function returns the -maximum value in the range from 0 to @var{delta} by which @var{window} -can be enlarged. - -If @var{delta} is a negative number, this means that @var{window} shall -be shrunk by -@var{delta} lines or columns. If @var{window} cannot be -shrunk by -@var{delta} lines or columns, this function returns the -minimum value in the range from @var{delta} to 0 that can be used for -shrinking @var{window}. - -Normally, the customizable variables @code{window-min-height} and -@code{window-min-width} specify the smallest allowable size of a -window. @xref{Change Window,,Deleting and Rearranging Windows, -emacs, The GNU Emacs Manual}. If resizing would result in making any -window smaller than this, this function usually signals an error. -However, if the optional argument @var{ignore} is non-@code{nil}, this -function ignores @code{window-min-height} and @code{window-min-width}, -as well as @code{window-size-fixed}. In that case, the minimum-height -window consists of a header (if any), a mode line, plus a text area -one line tall; the minimum-width window consists of any fringes, -margins and scroll bar, plus a text area two columns wide. - -If @var{ignore} denotes a window, this means to ignore restrictions for -that window only. If @var{ignore} equals the constant @code{safe}, this -means a live window may get as small as one line or two columns. - -Optional argument @var{noup} non-@code{nil} means don't go up in the -window tree but try to steal or distribute the space needed for the -resize operation among the other windows within @var{window}'s -combination. Optional argument @var{nodown} non-@code{nil} means don't -check whether @var{window} itself and its child windows can be resized. +changed vertically by @var{delta} lines. If the optional argument +@var{horizontal} is non-@code{nil}, it instead returns @var{delta} if +@var{window} can be resized horizontally by @var{delta} columns. It +does not actually change the window size. + +If @var{window} is @code{nil}, it defaults to the selected window. + +A positive value of @var{delta} enlarges the window by that number of +lines or columns; a negative value of @var{delta} shrinks it. If +@var{delta} is non-zero, a return value of 0 means that the window +cannot be resized. + +Normally, the variables @code{window-min-height} and +@code{window-min-width} specify the smallest allowable window size. +@xref{Change Window,, Deleting and Rearranging Windows, emacs, The GNU +Emacs Manual}. However, if the optional argument @var{ignore} is +non-@code{nil}, this function ignores @code{window-min-height} and +@code{window-min-width}, as well as @code{window-size-fixed}. +Instead, it considers the minimum-height window to be one consisting +of a header (if any), a mode line, plus a text area one line tall; and +a minimum-width window as one consisting of fringes, margins, and +scroll bar (if any), plus a text area two columns wide. + +If the optional argument @var{noup} is non-@code{nil}, this function +considers a resize operation that does not alter the window parent of +@var{window}, only its siblings. If the optional argument +@var{nodown} is non-@code{nil}, it does not attempt to check whether +@var{window} itself and its child windows can be resized. @end defun -The function @code{window-resizable} does not change any window sizes. -The following function does: - @defun window-resize window delta &optional horizontal ignore -This function resizes @var{window} vertically by @var{delta} lines. The -argument @var{window} can denote an arbitrary window and defaults to the -selected one. An attempt to resize the root window of a frame will -raise an error. - -Second argument @var{delta} a positive number means @var{window} shall -be enlarged by @var{delta} lines. If @var{delta} is negative, that -means @var{window} shall be shrunk by -@var{delta} lines. - -Optional argument @var{horizontal} non-@code{nil} means to resize -@var{window} horizontally by @var{delta} columns. In this case a -positive @var{delta} means enlarge @var{window} by @var{delta} columns. -A negative @var{delta} means @var{window} shall be shrunk by --@var{delta} columns. - -Optional argument @var{ignore} has the same meaning as for the function -@code{window-resizable} above. - -This function can simultaneously move two edges of WINDOW. Exactly -which edges of @var{window} are moved and which other windows are -resized along with @var{window} is determined by the splits and nest -status of the involved windows (@pxref{Splitting Windows}). If only the -low (right) edge of @var{window} shall be moved, the function -@code{adjust-window-trailing-edge} described below should be used. +This function resizes @var{window} by @var{delta} increments. If +@var{horizontal} is @code{nil}, it changes the height by @var{delta} +lines; otherwise, it changes the width by @var{delta} columns. A +positive @var{delta} means to enlarge the window, and a negative +@var{delta} means to shrink it. + +If @var{window} is @code{nil}, it defaults to the selected window. If +the window cannot be resized as demanded, an error is signaled. + +The optional argument @var{ignore} has the same meaning as for the +function @code{window-resizable} above. + +The choice of which window edge this function alters depends on the +splitting and nesting status of the involved windows; in some cases, +it may alter both edges. @xref{Splitting Windows}. To resize by +moving only the bottom or right edge of a window, use the function +@code{adjust-window-trailing-edge}, below. @end defun -The next four commands are simple interfaces to @code{window-resize}. -They always operate on the selected window, never delete any window, and -always raise an error when resizing would violate a restriction imposed -by @code{window-min-height}, @code{window-min-width}, or -@code{window-size-fixed}. - -@deffn Command enlarge-window delta &optional horizontal -This function makes the selected window @var{delta} lines taller. -Interactively, if no argument is given, it makes the selected window one -line taller. If optional argument @var{horizontal} is non-@code{nil}, -it makes the selected window wider by @var{delta} columns. If -@var{delta} is negative, it shrinks the selected window by -@var{delta} -lines or columns. The return value is @code{nil}. -@end deffn - -@deffn Command enlarge-window-horizontally delta -This function makes the selected window @var{delta} columns wider. -Interactively, if no argument is given, it makes the selected window one -column wider. -@end deffn - -@deffn Command shrink-window delta &optional horizontal -This function makes the selected window @var{delta} lines smaller. -Interactively, if no argument is given, it makes the selected window one -line smaller. If optional argument @var{horizontal} is non-@code{nil}, -it makes the selected window narrower by @var{delta} columns. If -@var{delta} is negative, it enlarges the selected window by -@var{delta} -lines or columns. The return value is @code{nil}. -@end deffn - -@deffn Command shrink-window-horizontally delta -This function makes the selected window @var{delta} columns narrower. -Interactively, if no argument is given, it makes the selected window one -column narrower. -@end deffn - -The following function is useful for moving the line dividing two +@c The commands enlarge-window, enlarge-window-horizontally, +@c shrink-window, and shrink-window-horizontally are documented in the +@c Emacs manual. They are not preferred for calling from Lisp. + + The following function is useful for moving the line dividing two windows. @defun adjust-window-trailing-edge window delta &optional horizontal @@ -1101,9 +1037,9 @@ @code{split-window}. @defopt window-splits -If this variable is nil, the function @code{split-window} can split a -window if and only if that window's screen estate is sufficiently large -to accommodate both--itself and the new window. +If this variable is @code{nil}, the function @code{split-window} can +split a window if and only if that window's screen estate is +sufficiently large to accommodate both--itself and the new window. If this variable is non-@code{nil}, @code{split-window} tries to resize all windows that are part of the same combination as the old window to @@ -1488,11 +1424,11 @@ @end deffn @deffn Command delete-windows-on &optional buffer-or-name frame -This function deletes all windows showing @var{buffer-or-name} and -returns nil. If there are no windows showing @var{buffer-or-name}, it -does nothing. The optional argument @var{buffer-or-name} may be a -buffer or the name of an existing buffer and defaults to the current -buffer. Invoking this command on a minibuffer signals an error. +This function deletes all windows showing @var{buffer-or-name}. If +there are no windows showing @var{buffer-or-name}, it does nothing. +The optional argument @var{buffer-or-name} may be a buffer or the name +of an existing buffer and defaults to the current buffer. Invoking +this command on a minibuffer signals an error. The function @code{delete-windows-on} operates by calling @code{delete-window} for each window showing @var{buffer-or-name}. If a @@ -2108,7 +2044,7 @@ @noindent Each action function is called in turn, passing the buffer as the first argument and the combined action alist as the second argument, -until one of the functions returns non-nil. +until one of the functions returns non-@code{nil}. The argument @var{action} can also have a non-@code{nil}, non-list value. This has the special meaning that the buffer should be @@ -2159,7 +2095,7 @@ This function tries to display @var{buffer} in the selected window. It fails if the selected window is a minibuffer window or is dedicated to another buffer (@pxref{Dedicated Windows}). It also fails if -@var{alist} has a non-nil @code{inhibit-same-window} entry. +@var{alist} has a non-@code{nil} @code{inhibit-same-window} entry. @end defun @defun display-buffer-reuse-window buffer alist ------------------------------------------------------------ revno: 106325 committer: thierry volpiatto + + * emacs-lisp/find-func.el (find-function-read): + Fix incorrect use of default argument in `completing-read'. + 2011-11-08 Martin Rudalics * window.el (display-buffer-function, special-display-function): ------------------------------------------------------------ revno: 106324 committer: thierry volpiatto branch nick: trunk timestamp: Tue 2011-11-08 10:33:22 +0100 message: Remove stale references to help-setup parameter in doc-strings. * window.el (display-buffer-function, special-display-function): Mention display-buffer-record-window but do not mention help-setup parameter in doc-strings. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-11-08 07:25:56 +0000 +++ lisp/ChangeLog 2011-11-08 09:33:22 +0000 @@ -1,3 +1,9 @@ +2011-11-08 Martin Rudalics + + * window.el (display-buffer-function, special-display-function): + Mention display-buffer-record-window but do not mention + help-setup parameter in doc-strings. + 2011-11-08 Chong Yidong * window.el (window-total-height, window-total-width): Doc fix. === modified file 'lisp/window.el' --- lisp/window.el 2011-11-08 07:25:56 +0000 +++ lisp/window.el 2011-11-08 09:33:22 +0000 @@ -3917,8 +3917,9 @@ should choose or create a window, display the specified buffer in it, and return the window. -The function specified here is responsible for setting the -quit-restore and help-setup parameters of the window used." +The specified function should call `display-buffer-record-window' +with corresponding arguments to set up the quit-restore parameter +of the window used." :type '(choice (const nil) (function :tag "function")) @@ -4190,8 +4191,9 @@ `special-display-buffer-names' or matches a regexp in `special-display-regexps'. -The function specified here is responsible for setting the -quit-restore and help-setup parameters of the window used." +The specified function should call `display-buffer-record-window' +with corresponding arguments to set up the quit-restore parameter +of the window used." :type 'function :group 'frames) ------------------------------------------------------------ revno: 106322 committer: Paul Eggert branch nick: trunk timestamp: Tue 2011-11-08 00:11:25 -0800 message: Fix permissions inadvertently changed in bzr 106251. diff: === modified file 'etc/images/icons/allout-widgets/light-bg/locked-encrypted.png' (properties changed: +x to -x) === modified file 'etc/images/icons/allout-widgets/light-bg/unlocked-encrypted.png' (properties changed: +x to -x) ------------------------------------------------------------ revno: 106321 committer: Chong Yidong branch nick: trunk timestamp: Tue 2011-11-08 15:43:30 +0800 message: Edits to Window Sizes node of Lisp manual. * doc/lispref/windows.texi (Window Sizes): Copyedits. Document window-text-height. Remove window-min-height and window-min-width discussion, referring instead to Emacs manual. (Splitting Windows, Resizing Windows): Add xref to Emacs manual. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2011-11-07 17:49:54 +0000 +++ doc/lispref/ChangeLog 2011-11-08 07:43:30 +0000 @@ -1,3 +1,10 @@ +2011-11-08 Chong Yidong + + * windows.texi (Window Sizes): Copyedits. Document + window-text-height. Remove window-min-height and window-min-width + discussion, referring instead to Emacs manual. + (Splitting Windows, Resizing Windows): Add xref to Emacs manual. + 2011-11-07 Glenn Morris * windows.texi (Choosing Window): Fix keybinding typo. === modified file 'doc/lispref/windows.texi' --- doc/lispref/windows.texi 2011-11-07 17:49:54 +0000 +++ doc/lispref/windows.texi 2011-11-08 07:43:30 +0000 @@ -340,13 +340,12 @@ @cindex window size @cindex size of window -Emacs windows are rectangular. The structure of a live window can be -roughly sketched as follows: + The following schematic shows the structure of a live window: @smallexample @group - _________________________________________ - ^ |______________ Header Line_______________| + _________________________________________ + ^ |______________ Header Line_______________| | |LS|LF|LM| |RM|RF|RS| ^ | | | | | | | | | | Window | | | | Text Area | | | | Window @@ -362,295 +361,177 @@ @end smallexample @cindex window body +@cindex text area of a window @cindex body of a window -The text area constitutes the body of the window. In its most simple -form, a window consists of its body alone. LS and RS stand for the left -and right scroll bar (@pxref{Scroll Bars}) respectively. Only one of -them can be present at any time. LF and RF denote the left and right -fringe, see @ref{Fringes}. LM and RM, finally, stand for the left and -right display margin, see @ref{Display Margins}. The header line, if -present, is located above theses areas, the mode line below, see -@ref{Mode Line Format}. + At the center of the window is the @dfn{text area}, or @dfn{body}, +where the buffer text is displayed. On each side of the text area is +a series of vertical areas; from innermost to outermost, these are the +left and right margins, denoted by LM and RM in the schematic +(@pxref{Display Margins}); the left and right fringes, denoted by LF +and RF (@pxref{Fringes}); and the left or right scroll bar, only one of +which is present at any time, denoted by LS and RS (@pxref{Scroll +Bars}). At the top of the window is an optional header line +(@pxref{Header Lines}), and at the bottom of the window is the mode +line (@pxref{Mode Line Format}). + + Emacs provides several functions for finding the height and width of +a window. Most of these functions report the values as integer +multiples of the default character height and width. On a graphical +display, the actual screen size of this default height and width are +those specified by the frame's default font. Hence, if the buffer +contains text that is displayed in a different size, the reported +height and width of the window may differ from the actual number of +text lines or columns displayed in it. @cindex window height -@cindex total window height @cindex height of a window @cindex total height of a window -The @dfn{total height of a window} is specified as the total number of -lines occupied by the window. Any mode or header line is included in a -window's total height. For an internal window, the total height is -calculated recursively from the total heights of its child windows. - @cindex window width -@cindex total window width @cindex width of a window @cindex total width of a window -The @dfn{total width of a window} denotes the total number of columns of -the window. Any scroll bar and the column of @samp{|} characters that -separate the window from its right sibling are included in a window's -total width. On a window-system, fringes and display margins are -included in a window's total width too. For an internal window, the -total width is calculated recursively from the total widths of its child -windows. - -@cindex total size of a window -@cindex total window size -The following function is the standard interface for getting the total -size of any window: - -@defun window-total-size &optional window &optional horizontal -This function returns the total number of lines of @var{window}. The -argument @var{window} can denote any window and defaults to the selected -one. If @var{window} is live, the return value includes any header or -mode lines of @var{window}. If @var{window} is internal, the return -value is the sum of the total heights of @var{window}'s child windows -provided these are vertically combined and the height of @var{window}'s -first child if they are horizontally combined. - - If the optional argument @var{horizontal} is non-@code{nil}, this -function returns the total number of columns of @var{window}. If -@var{window} is live, the return value includes any vertical divider -column or scroll bars of @var{window}. On a window-system, the return -value includes the space occupied by any margins and fringes of -@var{window} too. If @var{window} is internal, the return value is the -sum of the total widths of @var{window}'s child windows provided these -are horizontally combined and the width of @var{window}'s first child -otherwise. -@end defun - -Alternatively, the following two functions can be used to retrieve -either the total height or the total width of a window: + The @dfn{total height} of a window is the distance between the top +and bottom of the window, including the header line (if one exists) +and the mode line. The @dfn{total width} of a window is the distance +between the left and right edges of the mode line. Note that the +height of a frame is not the same as the height of its windows, since +a frame may also contain an echo area, menu bar, and tool bar +(@pxref{Size and Position}). @defun window-total-height &optional window -This function returns the total number of lines of @var{window}. -@var{window} can be any window and defaults to the selected one. The -return value includes @var{window}'s mode line and header line, if any. -If @var{window} is internal the return value is the sum of heights of -@var{window}'s child windows for a vertical combination and the height -of @var{window}'s first child otherwise. +This function returns the total height, in lines, of the window +@var{window}. If @var{window} is omitted or @code{nil}, it defaults +to the selected window. If @var{window} is an internal window, the +return value is the total height occupied by its descendant windows. @end defun @defun window-total-width &optional window -This function returns the total number of columns of @var{window}. -@var{window} can be any window and defaults to the selected one. The -return value includes any vertical dividers or scrollbars of -@var{window}. On a window-system the return value also includes the -space occupied by any margins and fringes of @var{window}. If -@var{window} is internal, the return value is the sum of the widths of -@var{window}'s child windows for a horizontal combination and the width -of @var{window}'s first child otherwise. -@end defun - -The total height of any window is usually less than the height of the -window's frame, because the latter may also include the minibuffer -window. Depending on the toolkit in use, the frame height can also -include the menu bar and the tool bar (@pxref{Size and Position}). -Therefore, in general it is not straightforward to compare window and -frame heights. The following function is useful to determine whether -there are no other windows above or below a specified window. - +This function returns the total width, in columns, of the window +@var{window}. If @var{window} is omitted or @code{nil}, it defaults +to the selected window. If @var{window} is internal, the return value +is the total width occupied by its descendant windows. +@end defun + +@defun window-total-size &optional window horizontal +This function returns either the total height or width of the window +@var{window}. If @var{horizontal} is omitted or @code{nil}, this is +equivalent to calling @code{window-total-height} for @var{window}; +otherwise it is equivalent to calling @code{window-total-width} for +@var{window}. +@end defun + +@cindex full-width window @cindex full-height window + The following functions can be used to determine whether a given +window has any adjacent windows. + @defun window-full-height-p &optional window -This function returns non-@code{nil} if there is no other window above -or below @var{window} on the containing frame. More precisely, this -function returns @code{t} if and only if the total height of -@var{window} equals the total height of the root window (@pxref{Windows -and Frames}) of @var{window}'s frame. The @var{window} argument may -denote any window and defaults to the selected one. +This function returns non-@code{nil} if @var{window} has no other +window above or below it in its frame, i.e. its total height equals +the total height of the root window on that frame. If @var{window} is +omitted or @code{nil}, it defaults to the selected window. @end defun -@cindex full-width window -The following function can be used to determine whether there are no -other windows on the left or right of a specified window. - @defun window-full-width-p &optional window -This function returns non-@code{nil} if there are no other windows on -the left or right of @var{window}; @code{nil} otherwise. More -precisely, this function returns @code{t} if and only if the total width -of @var{window} equals the total width of the root window -(@pxref{Windows and Frames}) of @var{window}'s frame. The @var{window} -argument may denote any window and defaults to the selected one. +This function returns non-@code{nil} if @var{window} has no other +window to the left or right in its frame, i.e. its total width equals +that of the root window on that frame. If @var{window} is omitted or +@code{nil}, it defaults to the selected window. @end defun -@cindex top line of window -@cindex left column of window - The windows of a frame are unambiguously characterized by the -combination of their top line and left column within that frame. +@cindex window position + The following functions can be used to determine the position of a +window relative to the window area of its frame: @defun window-top-line &optional window -This function returns the top line of @var{window}. The argument -@var{window} can denote any window and defaults to the selected one. +This function returns the distance, in lines, between the top of +@var{window} and the top of the frame's window area. For instance, +the return value is 0 if there is no window above @var{window}. If +@var{window} is omitted or @code{nil}, it defaults to the selected +window. @end defun @defun window-left-column &optional window -This function returns the left column of @var{window}. The argument -@var{window} can denote any window and defaults to the selected one. +This function returns the distance, in columns, between the left edge +of @var{window} and the left edge of the frame's window area. For +instance, the return value is 0 if there is no window to the left of +@var{window}. If @var{window} is omitted or @code{nil}, it defaults +to the selected window. @end defun -For a frame displaying one window only, that window's top line and left -column are both zero. When a frame displays a window @var{WB} below a -window @var{WA}, the top line of @var{WB} can be calculated by adding -the total height of @var{WA} to the top line of @var{WA}. When a frame -displays a window @var{WR} on the right of a window @var{WL}, the left -column of @var{WR} can be calculated by adding the total width of -@var{WL} to the left column of @var{WL}. - @cindex window body height @cindex body height of a window -The @dfn{body height of a window} is specified as the total number of -lines occupied by the window's text area. Mode or header lines are not -included in a window's body height. - @cindex window body width @cindex body width of a window -The @dfn{body width of a window} denotes the total number of columns -occupied by the window's text area. Scroll bars or columns of @samp{|} -characters that separate side-by-side windows are not included in a -window's body width. - @cindex body size of a window @cindex window body size -@cindex canonical units of window/frame size -The following functions retrieve height and width of the body of a -live window. Note that the values these functions return are measured -in @dfn{canonical units}, i.e.@: for the default frame's face. If the -window shows some characters with non-default face, e.g., if the font -of some characters is larger or smaller than the default font, the -values returned by these functions will not match the actual number of -lines or characters per line shown in the window. To get the actual -number of columns and lines, move to the last character in the line -(e.g., with @code{end-of-visual-line}) or to the last line of the -window (e.g., with @code{window-end}), and use @code{posn-at-point} to -find the line or column there. - -@defun window-body-size &optional window horizontal -This function returns the number of lines of @var{window}'s text area. -@var{window} must be a live window and defaults to the selected one. -The return value does not count any mode or header line of @var{window}. - -Optional argument @var{horizontal} non-@code{nil} means to return the -number of columns of @var{window}'s text area. In this case the return -value does not include any vertical divider or scroll bar owned by -@var{window}. On a window-system the return value does not include the -number of columns used for @var{window}'s fringes or display margins -either. -@end defun + The @dfn{body height} of a window is the height of its text area, +which does not include the mode or header line. Similarly, the +@dfn{body width} is the width of the text area, which does not include +the scroll bar, fringes, or margins. @defun window-body-height &optional window -This function returns the number of lines of @var{window}'s body. -@var{window} must be a live window and defaults to the selected one. +This function returns the body height, in lines, of the window +@var{window}. If @var{window} is omitted or @code{nil}, it defaults +to the selected window; otherwise it must be a live window. -The return value does not include @var{window}'s mode line and header -line, if any. If a line at the bottom of the window is only partially -visible, that line is included in the return value. If you do not -want to include a partially visible bottom line in the return value, -use @code{window-text-height} instead. +If there is a partially-visible line at the bottom of the text area, +that counts as a whole line; to exclude such a partially-visible line, +use @code{window-text-height}, below. @end defun @defun window-body-width &optional window -This function returns the number of columns of @var{window}'s body. -@var{window} must be a live window and defaults to the selected one. - -The return value does not include any vertical dividers or scroll bars -owned by @var{window}. On a window-system the return value does not -include the number of columns used for @var{window}'s fringes or -display margins either. -@end defun - -The following functions have been used in earlier versions of Emacs. -They are still supported but due to the confusing nomenclature they -should not be used any more in future code. - -@defun window-height &optional window -This function is an alias for `window-total-height', see above. -@end defun - -@defun window-width &optional window -This function is an alias for `window-body-width', see above. -@end defun - -@cindex minimum window size - The following two options constrain the sizes of windows to a minimum -height and width. Their values are honored when windows are split -(@pxref{Splitting Windows}) or resized (@pxref{Resizing Windows}). Any -request to make a window smaller than specified here will usually result -in an error. - -@defopt window-min-height -The value of this variable specifies how short a window may be. The -value is measured in line units and has to account for any header or -mode line. The default value for this option is @code{4}. Values less -than @code{1} are ignored. -@end defopt - -@defopt window-min-width -The value of this variable specifies how narrow a window may be. The -value is measured in characters and includes any margins, fringes, -scroll bar and vertical divider column. The default value for this -option is @code{10}. A value less than @code{2} is ignored. -@end defopt - -Applications should not rebind these variables. To shrink a specific -window to a height or width less than the one specified here, they -should rather invoke @code{window-resize} (@pxref{Resizing Windows}) -with a non-@code{nil} @var{ignore} argument. The function -@code{split-window} (@pxref{Splitting Windows}) can make a window -smaller than specified here by calling it with a non-@code{nil} -@var{size} argument. Interactively, the values specified here cannot be -overridden. - - Earlier versions of Emacs could delete a window when its size dropped -below @code{window-min-height} or @code{window-min-width}. As a rule, -the current version of Emacs does no more delete windows by side-effect. -The only exception to this rule are requests to resize a frame which may -implicitly delete windows when they do not fit on the frame any more, -see @ref{Size and Position}. - - The size of a window can be fixed which means that it cannot be split -(@pxref{Splitting Windows}) or resized (@pxref{Resizing Windows}). +This function returns the body width, in columns, of the window +@var{window}. If @var{window} is omitted or @code{nil}, it defaults +to the selected window; otherwise it must be a live window. +@end defun + +@defun window-body-size &optional window horizontal +This function returns the body height or body width of @var{window}. +If @var{horizontal} is omitted or @code{nil}, it is equivalent to +calling @code{window-body-height} for @var{window}; otherwise it is +equivalent to calling @code{window-body-width}. +@end defun + +@defun window-text-height &optional window +This function is like @code{window-body-height}, except that any +partially-visible line at the bottom of the text area is not counted. +@end defun + + For compatibility with previous versions of Emacs, +@code{window-height} is an alias for @code{window-body-height}, and +@code{window-width} is an alias for @code{window-body-width}. These +aliases are considered obsolete and will be removed in the future. @cindex fixed-size window + Commands that change the size of windows (@pxref{Resizing Windows}), +or split them (@pxref{Splitting Windows}), obey the variables +@code{window-min-height} and @code{window-min-width}, which specify +the smallest allowable window height and width. @xref{Change +Window,,Deleting and Rearranging Windows, emacs, The GNU Emacs +Manual}. They also obey the variable @code{window-size-fixed}, with +which a window can be @dfn{fixed} in size: + @defvar window-size-fixed -If this variable is non-@code{nil}, in a given buffer, then the size of -any window displaying that buffer remains fixed unless you either -explicitly change it or Emacs has no other choice. +If this buffer-local variable is non-@code{nil}, the size of any +window displaying the buffer cannot normally be changed. Deleting a +window or changing the frame's size may still change its size, if +there is no choice. If the value is @code{height}, then only the window's height is fixed; if the value is @code{width}, then only the window's width is fixed. Any other non-@code{nil} value fixes both the width and the height. - -This variable automatically becomes buffer-local when set. @end defvar -Commands supposed to explicitly change the size of windows such as -@code{enlarge-window} (@pxref{Resizing Windows}) get an error if they -had to change a window size which is fixed. Other functions like -@code{window-resize} (@pxref{Resizing Windows}) have an optional -@var{ignore} argument which allows to change the size of fixed-size -windows. - - Deleting a window or changing a frame's size may change the size of a -fixed-size window, if there is no other alternative. - - The height of a vertical combination of windows cannot be changed -when the height of all these windows is fixed. Its width cannot be -changed if the width of at least one of these windows is fixed. -Similarly, the width of a horizontal combination of windows cannot be -changed when the width of all these windows is fixed. Its height cannot -be changed if the height of at least one of these windows is fixed. - - The next function allows to check whether the size of an arbitrary -window is fixed. - @defun window-size-fixed-p &optional window horizontal -This function returns non-@code{nil} if @var{window}'s height is fixed. -The argument @var{window} can be an arbitrary window and defaults to the -selected one. Optional argument @var{horizontal} non-@code{nil} means -return non-@code{nil} if @var{window}'s width is fixed. +This function returns a non-@code{nil} value if @var{window}'s height +is fixed. If @var{window} is omitted or @code{nil}, it defaults to +the selected window. If the optional argument @var{horizontal} is +non-@code{nil}, the return value is non-@code{nil} if @var{window}'s +width is fixed. -If this function returns @code{nil}, this does not necessarily mean that -@var{window} can be resized in the desired direction. The function -@code{window-resizable} (@pxref{Resizing Windows}) can tell that. +A @code{nil} return value does not necessarily mean that @var{window} +can be resized in the desired direction. To determine that, use the +function @code{window-resizable}. @xref{Resizing Windows}. @end defun @@ -703,13 +584,17 @@ minimum value in the range from @var{delta} to 0 that can be used for shrinking @var{window}. -Optional argument @var{ignore} non-@code{nil} means ignore any -restrictions imposed by the variables @code{window-min-height} or -@code{window-min-width} and @code{window-size-fixed}. In this case the -minimum height of a window is specified as the minimum number of lines -that allow viewing any header or mode line and at least one line of the -text area of window. The minimum width of a window includes any -fringes, margins and the scroll bar as well as two text columns. +Normally, the customizable variables @code{window-min-height} and +@code{window-min-width} specify the smallest allowable size of a +window. @xref{Change Window,,Deleting and Rearranging Windows, +emacs, The GNU Emacs Manual}. If resizing would result in making any +window smaller than this, this function usually signals an error. +However, if the optional argument @var{ignore} is non-@code{nil}, this +function ignores @code{window-min-height} and @code{window-min-width}, +as well as @code{window-size-fixed}. In that case, the minimum-height +window consists of a header (if any), a mode line, plus a text area +one line tall; the minimum-width window consists of any fringes, +margins and scroll bar, plus a text area two columns wide. If @var{ignore} denotes a window, this means to ignore restrictions for that window only. If @var{ignore} equals the constant @code{safe}, this @@ -801,7 +686,7 @@ right. If @var{delta} is less than zero, this moves the edge upwards or to the left. If the edge can't be moved by @var{delta} lines or columns, it is moved as far as possible in the desired direction but no error is -signalled. +signaled. This function tries to resize windows adjacent to the edge that is moved. Only if this is insufficient, it will also resize windows not @@ -820,7 +705,7 @@ The optional argument @var{max-height} specifies the maximum total height the window is allowed to be; @code{nil} means use the maximum permissible height of a window on @var{window}'s frame. The optional -argument @var{min-height} specifies the minimum toatl height for the +argument @var{min-height} specifies the minimum total height for the window; @code{nil} means use @code{window-min-height}. All these height values include the mode line and/or header line. @@ -912,12 +797,14 @@ divided evenly into two parts. (If there is an odd line, it is allocated to the new window.) -If splitting would result in making a window smaller than -@code{window-min-height} or @code{window-min-width} (@pxref{Window -Sizes}), this function usually signals an error. However, if @var{size} -is non-@code{nil} and valid, a new window of the requested size is -created. (A size value would be invalid if it assigned less than one -line or less than two columns to the new window.) +Normally, the customizable variables @code{window-min-height} and +@code{window-min-width} specify the smallest allowable size of a +window. @xref{Change Window,,Deleting and Rearranging Windows, emacs, +The GNU Emacs Manual}. If splitting would result in making a window +smaller than this, this function usually signals an error. However, +if @var{size} is non-@code{nil} and valid, a new window of the +requested size is created, provided it has enough space for a text +area one line tall and/or two columns wide. Optional third argument @var{side} @code{nil} (or @code{below}) specifies that the new window shall be located below @var{window}. The @@ -1105,7 +992,7 @@ The scenario sketched above is the standard way to obtain the desired configuration. In Emacs 23 it was also the only way to do that since -Emacs 23 did't allow splitting internal windows. +Emacs 23 didn't allow splitting internal windows. With Emacs 24 you can also proceed as follows: Split an initial window @code{W6} by evaluating @code{(split-window W6 -3)} to produce the @@ -1833,7 +1720,7 @@ @end deffn The following function returns a copy of the list of windows in the -cyclic odering. +cyclic ordering. @defun window-list-1 &optional window &optional minibuf &optional all_frames This function returns a list of live windows. The optional arguments @@ -1843,7 +1730,7 @@ The optional argument @var{window} specifies the first window to list and defaults to the selected window. If @var{window} is not on the list of windows returned, some other window will be listed first but no error -is signalled. +is signaled. @end defun The functions described below use @code{window-list-1} for generating a @@ -1956,7 +1843,7 @@ returns @code{nil}. The argument @var{window} has to denote a live window and defaults to the selected one. The argument @var{buffer-or-name} must specify a buffer or the name of an existing -buffer. An error is signalled when @var{window} is @dfn{strongly} +buffer. An error is signaled when @var{window} is @dfn{strongly} dedicated to its buffer (@pxref{Dedicated Windows}) and does not already display @var{buffer-or-name}. @@ -2043,7 +1930,7 @@ (@pxref{Dedicated Windows}) and is not the only window on its frame, that window is deleted. If that window is the only window on its frame and there are other frames on the frame's terminal, that frame is dealt -with by the function spcecified by @code{frame-auto-hide-function} +with by the function specified by @code{frame-auto-hide-function} (@pxref{Quitting Windows}). Otherwise, the buffer provided by the function @code{switch-to-prev-buffer} (@pxref{Window History}) is displayed in the window instead. @@ -3281,7 +3168,7 @@ displayed at a specified vertical position within the window. It does not ``move point'' with respect to the text. -If @var{count} is a nonnegative number, that puts the line containing +If @var{count} is a non-negative number, that puts the line containing point @var{count} lines down from the top of the window. If @var{count} is a negative number, then it counts upward from the bottom of the window, so that @minus{}1 stands for the last usable