aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorPhilip Kaludercic2026-02-01 21:01:40 +0100
committerPhilip Kaludercic2026-02-01 21:01:40 +0100
commit2cde30aa1b060ceeb202e793a979357ecb559374 (patch)
treee97c621c4791e881cf355604bbedd11b0ca2da6b /doc
parent850382c7d6ec386cb5f42ea125b0458953322504 (diff)
parent8f5badc26bc47b0964f299cdb81354aff3e952b2 (diff)
downloademacs-2cde30aa1b060ceeb202e793a979357ecb559374.tar.gz
emacs-2cde30aa1b060ceeb202e793a979357ecb559374.zip
Merge remote-tracking branch 'origin/master' into feature/package-autosuggest
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs/custom.texi80
-rw-r--r--doc/emacs/files.texi3
-rw-r--r--doc/emacs/maintaining.texi3
-rw-r--r--doc/emacs/vc1-xtra.texi65
-rw-r--r--doc/emacs/windows.texi12
-rw-r--r--doc/lispref/control.texi4
-rw-r--r--doc/lispref/display.texi34
-rw-r--r--doc/lispref/frames.texi24
-rw-r--r--doc/lispref/sequences.texi15
-rw-r--r--doc/lispref/variables.texi13
-rw-r--r--doc/lispref/windows.texi35
11 files changed, 225 insertions, 63 deletions
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi
index 7663e2b21df..d79bcf3fe0f 100644
--- a/doc/emacs/custom.texi
+++ b/doc/emacs/custom.texi
@@ -1615,24 +1615,30 @@ your preference, such as @code{ws-butler-mode}.
1615@cindex per-connection local variables 1615@cindex per-connection local variables
1616 1616
1617 Most of the variables reflect the situation on the local machine. 1617 Most of the variables reflect the situation on the local machine.
1618Often, they must use a different value when you operate in buffers 1618Often, they must use a different value when you operate in buffers with
1619with a remote default directory. Think about the behavior when 1619a remote default directory. Think about the behavior when calling
1620calling @code{shell} -- on your local machine, you might use 1620@code{shell} --- on your local machine, you might use @file{/bin/bash}
1621@file{/bin/bash} and rely on termcap, but on a remote machine, it may 1621and rely on termcap, but on a remote machine, it may be @file{/bin/ksh}
1622be @file{/bin/ksh} and terminfo. 1622and terminfo.
1623 1623
1624 This can be accomplished with @dfn{connection-local variables}. 1624 This can be accomplished with @dfn{connection-local variables}. Such
1625Directory and file local variables override connection-local 1625variables are declared depending on the value of
1626variables. Unsafe connection-local variables are handled in the same 1626@code{default-directory} of the current buffer. When a buffer has a
1627way as unsafe file-local variables (@pxref{Safe File Variables}). 1627remote @code{default-directory}, and there exist a connection-local
1628variable which matches @code{default-directory}, this alternative value
1629of the variable is used. Directory and file local variables override
1630connection-local variables. Unsafe connection-local variables are
1631handled in the same way as unsafe file-local variables (@pxref{Safe File
1632Variables}).
1628 1633
1629@findex connection-local-set-profile-variables 1634@findex connection-local-set-profile-variables
1630@findex connection-local-set-profiles 1635@findex connection-local-set-profiles
1631 Connection-local variables are declared as a group of 1636 Connection-local variables are declared as a group of variables/value
1632variables/value pairs in a @dfn{profile}, using the 1637pairs in a @dfn{profile}, using the
1633@code{connection-local-set-profile-variables} function. The function 1638@code{connection-local-set-profile-variables} function. The function
1634@code{connection-local-set-profiles} activates profiles for a given 1639@code{connection-local-set-profiles} declares profiles for a given
1635criteria, identifying a remote machine: 1640criteria (the first argument), identifying a remote machine with respect
1641to @code{default-directory} of the current buffer:
1636 1642
1637@example 1643@example
1638(connection-local-set-profile-variables 'remote-terminfo 1644(connection-local-set-profile-variables 'remote-terminfo
@@ -1654,12 +1660,46 @@ criteria, identifying a remote machine:
1654 1660
1655 This code declares three different profiles, @code{remote-terminfo}, 1661 This code declares three different profiles, @code{remote-terminfo},
1656@code{remote-ksh}, and @code{remote-bash}. The profiles 1662@code{remote-ksh}, and @code{remote-bash}. The profiles
1657@code{remote-terminfo} and @code{remote-ksh} are applied to all 1663@code{remote-terminfo} and @code{remote-ksh} are applied to all buffers
1658buffers which have a remote default directory matching the regexp 1664which have a remote @code{default-directory} matching the string
1659@code{"remotemachine"} as host name. Such a criteria can also 1665@code{"remotemachine"} as host name.
1660discriminate for the properties @code{:protocol} (this is the Tramp 1666
1661method) or @code{:user} (a remote user name). The @code{nil} criteria 1667 Criteria, the first argument of @code{connection-local-set-profiles},
1662matches all buffers with a remote default directory. 1668specifies, how the profiles match @code{default-directory}. It is a
1669plist identifying a connection and the application using this
1670connection. Property names might be @code{:application},
1671@code{:protocol}, @code{:user} and @code{:machine}. The property value
1672of @code{:application} is a symbol, all other property values are
1673strings. In general the symbol @code{tramp} should be used as
1674@code{:application} value. Some packages use a different
1675@code{:application} (for example @code{eshell} or @code{vc-git}); they
1676say it in their documentation then. All properties are optional.
1677
1678 The other properties are used for checking @code{default-directory}.
1679The propertiy @code{:protocol} is used for the method a remote
1680@code{default-directory} uses, the property
1681@code{:user} is the remote user name, and the property @code{:machine}
1682is the remote host name. All checks are performed via
1683@code{string-equal}. The @code{nil} criteria matches all buffers
1684with a remote default directory.
1685
1686 Connection-local variables are not activated by default. A package
1687which uses connection-local variables must activate them for a given
1688buffer, specifying for which @code{:application} it uses them.
1689@xref{Applying Connection Local Variables,,, elisp, The Emacs Lisp
1690Reference Manual}, for details.
1691
1692 After the above definition of profiles and their activation, any
1693connection made by Tramp to the @samp{remotemachine} system will use
1694
1695@itemize
1696@item @code{t} as the connection-specific value of @code{system-uses-terminfo},
1697@item @samp{dumb-emacs-ansi} as the connection-specific value of
1698@code{comint-terminfo-terminal},
1699@item @samp{/bin/ksh} as the connection-specific value of as
1700@code{shell-file-name},
1701@item @samp{-c} as the connection-specific value of @code{shell-command-switch}.
1702@end itemize
1663 1703
1664 Be careful when declaring different profiles with the same variable, 1704 Be careful when declaring different profiles with the same variable,
1665and setting these profiles to criteria which could match in parallel. 1705and setting these profiles to criteria which could match in parallel.
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index 567c1492518..a9bcee0b060 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -1835,7 +1835,8 @@ the start of the @var{n}th previous file.
1835 1835
1836@findex diff-hunk-kill 1836@findex diff-hunk-kill
1837@item M-k 1837@item M-k
1838Kill the hunk at point (@code{diff-hunk-kill}). 1838Kill the hunk at point (@code{diff-hunk-kill}). If the region is
1839active, kills all hunks the region overlaps.
1839 1840
1840@findex diff-file-kill 1841@findex diff-file-kill
1841@item M-K 1842@item M-K
diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi
index f1090d4b43f..aebe31b478e 100644
--- a/doc/emacs/maintaining.texi
+++ b/doc/emacs/maintaining.texi
@@ -1712,6 +1712,9 @@ Do an incremental regular expression search on the fileset
1712Apart from acting on multiple files, these commands behave much like 1712Apart from acting on multiple files, these commands behave much like
1713their single-buffer counterparts (@pxref{Search}). 1713their single-buffer counterparts (@pxref{Search}).
1714 1714
1715@c Outstanding changes commands under 'T' are not mentioned because
1716@c these are an advanced feature documented only in vc1-xtra.texi.
1717
1715 The VC Directory buffer additionally defines some branch-related 1718 The VC Directory buffer additionally defines some branch-related
1716commands starting with the prefix @kbd{b}: 1719commands starting with the prefix @kbd{b}:
1717 1720
diff --git a/doc/emacs/vc1-xtra.texi b/doc/emacs/vc1-xtra.texi
index 8ffd6506dbe..2bb695025db 100644
--- a/doc/emacs/vc1-xtra.texi
+++ b/doc/emacs/vc1-xtra.texi
@@ -298,22 +298,31 @@ yet merged into the target branch.
298@cindex outstanding changes 298@cindex outstanding changes
299 299
300@table @kbd 300@table @kbd
301@item C-x v o = 301@item C-x v T =
302Display diffs of changes to the VC fileset since the merge base of this 302Display diffs of changes to the VC fileset since the merge base of this
303branch and its upstream counterpart (@code{vc-diff-outgoing-base}). 303branch and its upstream counterpart (@code{vc-diff-outgoing-base}).
304 304
305@item C-x v o D 305@item C-x v T D
306Display all changes since the merge base of this branch and its upstream 306Display a diff of all changes since the merge base of this branch and
307counterpart (@code{vc-root-diff-outgoing-base}). 307its upstream counterpart (@code{vc-root-diff-outgoing-base}).
308
309@item C-x v T l
310Display log messages for changes to the VC fileset since the merge base
311of this branch and its upstream counterpart
312(@code{vc-log-outgoing-base}).
313
314@item C-x v T L
315Display log messages for all changes since the merge base of this branch
316and its upstream counterpart (@code{vc-root-log-outgoing-base}).
308@end table 317@end table
309 318
310For decentralized version control systems (@pxref{VCS Repositories}), 319For decentralized version control systems (@pxref{VCS Repositories}),
311these commands provide specialized versions of @kbd{C-x v M D} (see 320these commands provide specialized versions of @kbd{C-x v M L} and
312@pxref{Merge Bases}) which also take into account the state of upstream 321@w{@kbd{C-x v M D}} (see @pxref{Merge Bases}) which also take into
313repositories. These commands are useful both when working on a single 322account the state of upstream repositories. These commands are useful
314branch and when developing features on a separate branch 323both when working on a single branch and when developing features on a
315(@pxref{Branches}). These two cases are conceptually distinct, and so 324separate branch (@pxref{Branches}). These two cases are conceptually
316we will introduce them separately. 325distinct, and so we will introduce them separately.
317 326
318First, consider working on a single branch. @dfn{Outstanding changes} 327First, consider working on a single branch. @dfn{Outstanding changes}
319are those which you haven't yet pushed upstream. This includes both 328are those which you haven't yet pushed upstream. This includes both
@@ -321,17 +330,17 @@ unpushed commits and uncommitted changes in your working tree. In many
321cases the reason these changes are not pushed yet is that they are not 330cases the reason these changes are not pushed yet is that they are not
322finished: the changes committed so far don't make sense in isolation. 331finished: the changes committed so far don't make sense in isolation.
323 332
324@kindex C-x v o = 333@kindex C-x v T =
325@findex vc-diff-outgoing-base 334@findex vc-diff-outgoing-base
326@kindex C-x v o D 335@kindex C-x v T D
327@findex vc-root-diff-outgoing-base 336@findex vc-root-diff-outgoing-base
328Type @kbd{C-x v o D} (@code{vc-root-diff-outgoing-base}) to display a 337Type @kbd{C-x v T D} (@code{vc-root-diff-outgoing-base}) to display a
329summary of all these changes, committed and uncommitted. This summary 338summary of all these changes, committed and uncommitted. This summary
330is in the form of a diff of what committing and pushing (@pxref{Pulling 339is in the form of a diff of what committing and pushing (@pxref{Pulling
331/ Pushing}) all these changes would do to the upstream repository. You 340/ Pushing}) all these changes would do to the upstream repository. You
332can use @kbd{C-x v o =} (@code{vc-diff-outgoing-base}) instead to limit 341can use @kbd{C-x v T =} (@code{vc-diff-outgoing-base}) instead to limit
333the display of changes to the current VC fileset. (The difference 342the display of changes to the current VC fileset. (The difference
334between @w{@kbd{C-x v o D}} and @w{@kbd{C-x v o =}} is like the 343between @w{@kbd{C-x v T D}} and @w{@kbd{C-x v T =}} is like the
335difference between @kbd{C-x v D} and @kbd{C-x v =} (@pxref{Old 344difference between @kbd{C-x v D} and @kbd{C-x v =} (@pxref{Old
336Revisions}).)@footnote{Another point of comparison is that these 345Revisions}).)@footnote{Another point of comparison is that these
337commands are like @w{@kbd{C-x v O =}} (@code{vc-fileset-diff-outgoing}) 346commands are like @w{@kbd{C-x v O =}} (@code{vc-fileset-diff-outgoing})
@@ -340,6 +349,16 @@ include uncommitted changes in the reported diffs. Like those other
340commands, you can use a prefix argument to specify a particular upstream 349commands, you can use a prefix argument to specify a particular upstream
341location.} 350location.}
342 351
352@kindex C-x v T l
353@findex vc-log-outgoing-base
354@kindex C-x v T L
355@findex vc-root-log-outgoing-base
356Type @kbd{C-x v T L} (@code{vc-root-log-outgoing-base}) to display a
357summary of the same changes in the form of a revision log; this does not
358include uncommitted changes. You can use @kbd{C-x v T l}
359(@code{vc-log-outgoing-base}) instead to limit the display of changes to
360the current VC fileset.
361
343Second, consider developing a feature on a separate branch. Call this 362Second, consider developing a feature on a separate branch. Call this
344the @dfn{topic branch},@footnote{What we mean by a topic branch is any 363the @dfn{topic branch},@footnote{What we mean by a topic branch is any
345shorter-lived branch used for work which will later be merged into a 364shorter-lived branch used for work which will later be merged into a
@@ -359,13 +378,15 @@ upstream repository's development trunk. That means committed changes
359on the topic branch that haven't yet been merged into the trunk, plus 378on the topic branch that haven't yet been merged into the trunk, plus
360uncommitted changes. 379uncommitted changes.
361 380
362When the current branch is a topic branch and you type @kbd{C-x v o D}, 381When the current branch is a topic branch and you type @kbd{C-x v T D},
363Emacs displays a summary of all the changes that are outstanding against 382Emacs displays a summary of all the changes that are outstanding against
364the trunk to which the current branch will be merged. This summary is 383the trunk to which the current branch will be merged. This summary is
365in the form of a diff of what committing and pushing all the changes, 384in the form of a diff of what committing and pushing all the changes,
366@emph{and} subsequently merging the topic branch, would do to the trunk. 385@emph{and} subsequently merging the topic branch, would do to the trunk.
367As above, you can use @kbd{C-x v o =} instead to limit the display of 386As above, you can use @kbd{C-x v T =} instead to limit the display of
368changes to the current VC fileset. 387changes to the current VC fileset. @kbd{C-x v T L} and @kbd{C-x v T l}
388show the corresponding revision logs, excluding uncommitted changes as
389above.
369 390
370This functionality relies on Emacs correctly detecting whether the 391This functionality relies on Emacs correctly detecting whether the
371current branch is a trunk or a topic branch, and in the latter case, 392current branch is a trunk or a topic branch, and in the latter case,
@@ -379,8 +400,8 @@ The variables @code{vc-trunk-branch-regexps} and
379@code{vc-topic-branch-regexps} contain lists of regular expressions 400@code{vc-topic-branch-regexps} contain lists of regular expressions
380matching the names of branches that should always be considered trunk 401matching the names of branches that should always be considered trunk
381and topic branches, respectively. You can also specify prefix arguments 402and topic branches, respectively. You can also specify prefix arguments
382to @kbd{C-x v o D} and @kbd{C-x v o =}. Here is a summary of how to use 403to @kbd{C-x v T @dots{}}. Here is a summary of how to use these
383these controls: 404controls:
384 405
385@enumerate 406@enumerate
386@item 407@item
@@ -425,7 +446,7 @@ described. E.g., if the value of @code{vc-trunk-branch-regexps} is
425branch. 446branch.
426 447
427@item 448@item
428Supply a double prefix argument, i.e. @w{@kbd{C-u C-u C-x v o @dots{}}}, 449Supply a double prefix argument, i.e. @w{@kbd{C-u C-u C-x v T @dots{}}},
429and Emacs will treat the current branch as a trunk, no matter what. 450and Emacs will treat the current branch as a trunk, no matter what.
430This is useful when you simply want to obtain a diff of all outgoing 451This is useful when you simply want to obtain a diff of all outgoing
431changes (@pxref{VC Change Log}) plus uncommitted changes. 452changes (@pxref{VC Change Log}) plus uncommitted changes.
@@ -433,7 +454,7 @@ changes (@pxref{VC Change Log}) plus uncommitted changes.
433@item 454@item
434@cindex outgoing base, version control 455@cindex outgoing base, version control
435Finally, you can take full manual control by supplying a single prefix 456Finally, you can take full manual control by supplying a single prefix
436argument, i.e. @w{@kbd{C-u C-x v o @dots{}}}. Emacs will prompt you for 457argument, i.e. @w{@kbd{C-u C-x v T @dots{}}}. Emacs will prompt you for
437the @dfn{outgoing base}, which is the upstream location for which the 458the @dfn{outgoing base}, which is the upstream location for which the
438changes are destined once they are no longer outstanding. 459changes are destined once they are no longer outstanding.
439 460
diff --git a/doc/emacs/windows.texi b/doc/emacs/windows.texi
index 937ea386650..8500e3b7731 100644
--- a/doc/emacs/windows.texi
+++ b/doc/emacs/windows.texi
@@ -519,6 +519,8 @@ selected frame, and display the buffer in that new window.
519@vindex split-height-threshold 519@vindex split-height-threshold
520@vindex split-width-threshold 520@vindex split-width-threshold
521@vindex split-window-preferred-direction 521@vindex split-window-preferred-direction
522@cindex portrait frame
523@cindex landscape frame
522The split can be either vertical or horizontal, depending on the 524The split can be either vertical or horizontal, depending on the
523variables @code{split-height-threshold} and 525variables @code{split-height-threshold} and
524@code{split-width-threshold}. These variables should have integer 526@code{split-width-threshold}. These variables should have integer
@@ -528,8 +530,14 @@ window's height, the split puts the new window below. Otherwise, if
528split puts the new window on the right. If neither condition holds, 530split puts the new window on the right. If neither condition holds,
529Emacs tries to split so that the new window is below---but only if the 531Emacs tries to split so that the new window is below---but only if the
530window was not split before (to avoid excessive splitting). Whether 532window was not split before (to avoid excessive splitting). Whether
531Emacs tries first to split vertically or horizontally, is 533Emacs tries first to split vertically or horizontally when both
532determined by the value of @code{split-window-preferred-direction}. 534conditions hold is determined by the value of
535@code{split-window-preferred-direction}. Its default is @code{longest},
536which means to split vertically if the window's frame is taller than it
537is wide (a @dfn{portrait} frame), and split horizontally if its wider
538than it's tall (a @dfn{landscape} frame). The values @code{vertical}
539and @code{horizontal} always prefer, respectively, the vertical or the
540horizontal split.
533 541
534@item 542@item
535Otherwise, display the buffer in a window previously showing it. 543Otherwise, display the buffer in a window previously showing it.
diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi
index a4776030cf2..7c3f29c7226 100644
--- a/doc/lispref/control.texi
+++ b/doc/lispref/control.texi
@@ -2344,7 +2344,9 @@ the other usual filtering mechanisms say it should. @xref{Error Debugging}.
2344The macro @code{condition-case-unless-debug} provides another way to 2344The macro @code{condition-case-unless-debug} provides another way to
2345handle debugging of such forms. It behaves exactly like 2345handle debugging of such forms. It behaves exactly like
2346@code{condition-case}, unless the variable @code{debug-on-error} is 2346@code{condition-case}, unless the variable @code{debug-on-error} is
2347non-@code{nil}, in which case it does not handle any errors at all. 2347non-@code{nil}, in which case it causes Emacs to enter the debugger
2348before executing any applicable handler. (The applicable handler, if
2349any, will still run when the debugger exits.)
2348@end defmac 2350@end defmac
2349 2351
2350 Once Emacs decides that a certain handler handles the error, it 2352 Once Emacs decides that a certain handler handles the error, it
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 4211b435db5..464c0badc36 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -2243,6 +2243,9 @@ means hide the excess parts of @var{string} with a @code{display} text
2243property (@pxref{Display Property}) showing the ellipsis, instead of 2243property (@pxref{Display Property}) showing the ellipsis, instead of
2244actually truncating the string. 2244actually truncating the string.
2245 2245
2246See also the function @code{truncate-string-pixelwise} for pixel-level
2247resolution.
2248
2246@example 2249@example
2247@group 2250@group
2248(truncate-string-to-width "\tab\t" 12 4) 2251(truncate-string-to-width "\tab\t" 12 4)
@@ -2440,6 +2443,37 @@ non-@code{nil}, use any face remappings (@pxref{Face Remapping}) from
2440that buffer when computing the width of @var{string}. 2443that buffer when computing the width of @var{string}.
2441@end defun 2444@end defun
2442 2445
2446@defun truncate-string-pixelwise string max-pixels &optional buffer ellipsis ellipsis-pixels
2447This is a convenience function that uses @code{window-text-pixel-size}
2448to truncate @var{string} to @var{max-pixels} pixels. Caveat: if you
2449call this function to measure the width of a string with embedded
2450newlines, it will then return the width of the widest substring that
2451does not include newlines. The meaning of this result is the widest
2452line taken by the string if inserted into a buffer. If @var{buffer} is
2453non-@code{nil}, use any face remappings (@pxref{Face Remapping}) from
2454that buffer when computing the width of @var{string}.
2455
2456If @var{ellipsis} is non-@code{nil}, it should be a string which will
2457replace the end of @var{string} when it is truncated. In this case,
2458more characters will be removed from @var{string} to free enough space
2459for @var{ellipsis} to fit within @var{max-pixels} pixels. However, if
2460the pixel width of @var{string} is less than the pixel width of
2461@var{ellipsis}, @var{ellipsis} will not be appended to the result. If
2462@var{ellipsis} is non-@code{nil} and not a string, it stands for the
2463value returned by the function @code{truncate-string-ellipsis},
2464described above.
2465
2466If @var{ellipsis-pixels} is non-@code{nil} and @var{ellipsis} is
2467non-@code{nil}, it should be the number of pixels of @var{ellipsis} that
2468you should precompute using @code{string-pixel-width}, specifying the
2469same buffer. This is useful to avoid the cost of recomputing this value
2470repeatedly when you have many strings to truncate using the same
2471ellipsis string.
2472
2473See also the function @code{truncate-string-to-width} for
2474character-level resolution.
2475@end defun
2476
2443@defun line-pixel-height 2477@defun line-pixel-height
2444This function returns the height in pixels of the line at point in the 2478This function returns the height in pixels of the line at point in the
2445selected window. The value includes the line spacing of the line 2479selected window. The value includes the line spacing of the line
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi
index 5bf0bfc8c10..bdd79528cac 100644
--- a/doc/lispref/frames.texi
+++ b/doc/lispref/frames.texi
@@ -109,6 +109,7 @@ must be a root frame, which means it cannot be a child frame itself
109descending from it. 109descending from it.
110@end defun 110@end defun
111 111
112@cindex frame identifier
112@defun frame-id &optional frame 113@defun frame-id &optional frame
113This function returns the unique identifier of a frame, an integer, 114This function returns the unique identifier of a frame, an integer,
114assigned to @var{frame}. If @var{frame} is @code{nil} or unspecified, 115assigned to @var{frame}. If @var{frame} is @code{nil} or unspecified,
@@ -3187,6 +3188,29 @@ could switch to a different terminal without switching back when
3187you're done. 3188you're done.
3188@end deffn 3189@end deffn
3189 3190
3191@deffn Command select-frame-by-id id &optional noerror
3192This function searches open and undeletable frames for a matching frame
3193identifier @var{id} (@pxref{Frames}). If found, its frame is undeleted,
3194if necessary, then raised, given focus, and made the selected frame. On
3195a text terminal, raising a frame causes it to occupy the entire terminal
3196display.
3197
3198This function returns the selected frame or signals an error if @var{id}
3199is not found, unless @var{noerror} is non-@code{nil}, in which case it
3200returns @code{nil}.
3201@end deffn
3202
3203@deffn Command undelete-frame-by-id id &optional noerror
3204This function searches undeletable frames for a matching frame
3205identifier @var{id} (@pxref{Frames}). If found, its frame is undeleted,
3206raised, given focus, and made the selected frame. On a text terminal,
3207raising a frame causes it to occupy the entire terminal display.
3208
3209This function returns the undeleted frame or signals an error if
3210@var{id} is not found, unless @var{noerror} is non-@code{nil}, in which
3211case it returns @code{nil}.
3212@end deffn
3213
3190@cindex text-terminal focus notification 3214@cindex text-terminal focus notification
3191Emacs cooperates with the window system by arranging to select frames 3215Emacs cooperates with the window system by arranging to select frames
3192as the server and window manager request. When a window system 3216as the server and window manager request. When a window system
diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi
index 4de739aa915..afee255346c 100644
--- a/doc/lispref/sequences.texi
+++ b/doc/lispref/sequences.texi
@@ -1110,9 +1110,9 @@ instead of the default @code{equal}.
1110@cindex sequences, intersection of 1110@cindex sequences, intersection of
1111@cindex intersection of sequences 1111@cindex intersection of sequences
1112 This function returns a copy of @var{sequence1} from which the 1112 This function returns a copy of @var{sequence1} from which the
1113elements that appear in @var{sequence2} where removed. If the optional 1113elements that do not appear in @var{sequence2} were removed. If the
1114argument @var{function} is non-@code{nil}, it is a function of two 1114optional argument @var{function} is non-@code{nil}, it is a function of
1115arguments to use to compare elements instead of the default 1115two arguments to use to compare elements instead of the default
1116@code{equal}. 1116@code{equal}.
1117 1117
1118@example 1118@example
@@ -1125,10 +1125,11 @@ arguments to use to compare elements instead of the default
1125 1125
1126 1126
1127@defun seq-difference sequence1 sequence2 &optional function 1127@defun seq-difference sequence1 sequence2 &optional function
1128 This function returns a list of the elements that appear in 1128 This function returns a copy of @var{sequence1} from which the
1129@var{sequence1} but not in @var{sequence2}. If the optional argument 1129elements that appear in @var{sequence2} were removed. If the optional
1130@var{function} is non-@code{nil}, it is a function of two arguments to 1130argument @var{function} is non-@code{nil}, it is a function of two
1131use to compare elements instead of the default @code{equal}. 1131arguments to use to compare elements instead of the default
1132@code{equal}.
1132 1133
1133@example 1134@example
1134@group 1135@group
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
index 29a272eec92..2f5ee037f3e 100644
--- a/doc/lispref/variables.texi
+++ b/doc/lispref/variables.texi
@@ -2653,6 +2653,19 @@ This macro returns the connection-local value of @var{symbol} for
2653 2653
2654If @var{symbol} does not have a connection-local 2654If @var{symbol} does not have a connection-local
2655binding, the value is the default binding of the variable. 2655binding, the value is the default binding of the variable.
2656
2657The difference to @code{with-connection-local@{-application@}-variables}
2658is, that @code{symbol} is not set buffer-local. A typical usage pattern
2659is to use only the the connection value of a variable if it exists, and
2660not to use its default value otherwise (using @code{my-app-variable}
2661initialized above):
2662
2663@lisp
2664(if (connection-local-p my-app-variable 'my-app)
2665 (connection-local-value my-app-variable 'my-app)
2666 ;; Something else.
2667 )
2668@end lisp
2656@end defmac 2669@end defmac
2657 2670
2658@defvar enable-connection-local-variables 2671@defvar enable-connection-local-variables
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index 169f15cc898..d804c34250f 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -4122,16 +4122,19 @@ window. If @var{window} cannot be split, it returns @code{nil}. If
4122@var{window} is omitted or @code{nil}, it defaults to the selected 4122@var{window} is omitted or @code{nil}, it defaults to the selected
4123window. 4123window.
4124 4124
4125This function obeys the usual rules that determine when a window may 4125This function obeys the usual rules that determine when a window may be
4126be split (@pxref{Splitting Windows}). It first tries to split by 4126split (@pxref{Splitting Windows}). It first tries either a vertical
4127placing the new window below, subject to the restriction imposed by 4127split by placing the new window below, subject to the restriction
4128@code{split-height-threshold} (see below), in addition to any other 4128imposed by @code{split-height-threshold} (see below), or a horizontal
4129restrictions. If that fails, it tries to split by placing the new 4129split that places the new window to the right, subject to
4130window to the right, subject to @code{split-width-threshold} (see 4130@code{split-width-threshold}, in addition to any other restrictions.
4131below). If that also fails, and the window is the only window on its 4131Whether it tries first to split vertically or horizontally depends on
4132frame, this function again tries to split and place the new window 4132the value of the user option @code{split-window-preferred-direction}.
4133below, disregarding @code{split-height-threshold}. If this fails as 4133If splitting along the first dimension fails, it tries to split along
4134well, this function gives up and returns @code{nil}. 4134the other dimension. If that also fails, and the window is the only
4135window on its frame, this function again tries to split and place the
4136new window below, disregarding @code{split-height-threshold}. If this
4137fails as well, this function gives up and returns @code{nil}.
4135@end defun 4138@end defun
4136 4139
4137@defopt split-height-threshold 4140@defopt split-height-threshold
@@ -4150,6 +4153,18 @@ window has at least that many columns. If the value is @code{nil},
4150that means not to split this way. 4153that means not to split this way.
4151@end defopt 4154@end defopt
4152 4155
4156@defopt split-window-preferred-direction
4157This variable determines the first dimension along which
4158@code{split-window-sensibly} tries to split the window, if the window
4159could be split both vertically and horizontally, as determined by the
4160values of @code{split-height-threshold} and
4161@code{split-width-threshold}. The default value is @code{longest},
4162which means to split vertically if the height of the window's frame is
4163greater or equal to its width, and horizontally otherwise. The values
4164@code{vertical} and @code{horizontal} specify the direction in which to
4165attempt the first split.
4166@end defopt
4167
4153@defopt even-window-sizes 4168@defopt even-window-sizes
4154This variable, if non-@code{nil}, causes @code{display-buffer} to even 4169This variable, if non-@code{nil}, causes @code{display-buffer} to even
4155window sizes whenever it reuses an existing window, and that window is 4170window sizes whenever it reuses an existing window, and that window is