diff options
| author | Philip Kaludercic | 2026-02-01 21:01:40 +0100 |
|---|---|---|
| committer | Philip Kaludercic | 2026-02-01 21:01:40 +0100 |
| commit | 2cde30aa1b060ceeb202e793a979357ecb559374 (patch) | |
| tree | e97c621c4791e881cf355604bbedd11b0ca2da6b /doc | |
| parent | 850382c7d6ec386cb5f42ea125b0458953322504 (diff) | |
| parent | 8f5badc26bc47b0964f299cdb81354aff3e952b2 (diff) | |
| download | emacs-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.texi | 80 | ||||
| -rw-r--r-- | doc/emacs/files.texi | 3 | ||||
| -rw-r--r-- | doc/emacs/maintaining.texi | 3 | ||||
| -rw-r--r-- | doc/emacs/vc1-xtra.texi | 65 | ||||
| -rw-r--r-- | doc/emacs/windows.texi | 12 | ||||
| -rw-r--r-- | doc/lispref/control.texi | 4 | ||||
| -rw-r--r-- | doc/lispref/display.texi | 34 | ||||
| -rw-r--r-- | doc/lispref/frames.texi | 24 | ||||
| -rw-r--r-- | doc/lispref/sequences.texi | 15 | ||||
| -rw-r--r-- | doc/lispref/variables.texi | 13 | ||||
| -rw-r--r-- | doc/lispref/windows.texi | 35 |
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. |
| 1618 | Often, they must use a different value when you operate in buffers | 1618 | Often, they must use a different value when you operate in buffers with |
| 1619 | with a remote default directory. Think about the behavior when | 1619 | a remote default directory. Think about the behavior when calling |
| 1620 | calling @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 | 1621 | and rely on termcap, but on a remote machine, it may be @file{/bin/ksh} |
| 1622 | be @file{/bin/ksh} and terminfo. | 1622 | and terminfo. |
| 1623 | 1623 | ||
| 1624 | This can be accomplished with @dfn{connection-local variables}. | 1624 | This can be accomplished with @dfn{connection-local variables}. Such |
| 1625 | Directory and file local variables override connection-local | 1625 | variables are declared depending on the value of |
| 1626 | variables. Unsafe connection-local variables are handled in the same | 1626 | @code{default-directory} of the current buffer. When a buffer has a |
| 1627 | way as unsafe file-local variables (@pxref{Safe File Variables}). | 1627 | remote @code{default-directory}, and there exist a connection-local |
| 1628 | variable which matches @code{default-directory}, this alternative value | ||
| 1629 | of the variable is used. Directory and file local variables override | ||
| 1630 | connection-local variables. Unsafe connection-local variables are | ||
| 1631 | handled in the same way as unsafe file-local variables (@pxref{Safe File | ||
| 1632 | Variables}). | ||
| 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 |
| 1632 | variables/value pairs in a @dfn{profile}, using the | 1637 | pairs 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 |
| 1635 | criteria, identifying a remote machine: | 1640 | criteria (the first argument), identifying a remote machine with respect |
| 1641 | to @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 |
| 1658 | buffers which have a remote default directory matching the regexp | 1664 | which 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. |
| 1660 | discriminate for the properties @code{:protocol} (this is the Tramp | 1666 | |
| 1661 | method) or @code{:user} (a remote user name). The @code{nil} criteria | 1667 | Criteria, the first argument of @code{connection-local-set-profiles}, |
| 1662 | matches all buffers with a remote default directory. | 1668 | specifies, how the profiles match @code{default-directory}. It is a |
| 1669 | plist identifying a connection and the application using this | ||
| 1670 | connection. Property names might be @code{:application}, | ||
| 1671 | @code{:protocol}, @code{:user} and @code{:machine}. The property value | ||
| 1672 | of @code{:application} is a symbol, all other property values are | ||
| 1673 | strings. 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 | ||
| 1676 | say it in their documentation then. All properties are optional. | ||
| 1677 | |||
| 1678 | The other properties are used for checking @code{default-directory}. | ||
| 1679 | The 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} | ||
| 1682 | is the remote host name. All checks are performed via | ||
| 1683 | @code{string-equal}. The @code{nil} criteria matches all buffers | ||
| 1684 | with a remote default directory. | ||
| 1685 | |||
| 1686 | Connection-local variables are not activated by default. A package | ||
| 1687 | which uses connection-local variables must activate them for a given | ||
| 1688 | buffer, specifying for which @code{:application} it uses them. | ||
| 1689 | @xref{Applying Connection Local Variables,,, elisp, The Emacs Lisp | ||
| 1690 | Reference Manual}, for details. | ||
| 1691 | |||
| 1692 | After the above definition of profiles and their activation, any | ||
| 1693 | connection 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, |
| 1665 | and setting these profiles to criteria which could match in parallel. | 1705 | and 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 |
| 1838 | Kill the hunk at point (@code{diff-hunk-kill}). | 1838 | Kill the hunk at point (@code{diff-hunk-kill}). If the region is |
| 1839 | active, 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 | |||
| 1712 | Apart from acting on multiple files, these commands behave much like | 1712 | Apart from acting on multiple files, these commands behave much like |
| 1713 | their single-buffer counterparts (@pxref{Search}). | 1713 | their 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 |
| 1716 | commands starting with the prefix @kbd{b}: | 1719 | commands 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 = |
| 302 | Display diffs of changes to the VC fileset since the merge base of this | 302 | Display diffs of changes to the VC fileset since the merge base of this |
| 303 | branch and its upstream counterpart (@code{vc-diff-outgoing-base}). | 303 | branch 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 |
| 306 | Display all changes since the merge base of this branch and its upstream | 306 | Display a diff of all changes since the merge base of this branch and |
| 307 | counterpart (@code{vc-root-diff-outgoing-base}). | 307 | its upstream counterpart (@code{vc-root-diff-outgoing-base}). |
| 308 | |||
| 309 | @item C-x v T l | ||
| 310 | Display log messages for changes to the VC fileset since the merge base | ||
| 311 | of this branch and its upstream counterpart | ||
| 312 | (@code{vc-log-outgoing-base}). | ||
| 313 | |||
| 314 | @item C-x v T L | ||
| 315 | Display log messages for all changes since the merge base of this branch | ||
| 316 | and its upstream counterpart (@code{vc-root-log-outgoing-base}). | ||
| 308 | @end table | 317 | @end table |
| 309 | 318 | ||
| 310 | For decentralized version control systems (@pxref{VCS Repositories}), | 319 | For decentralized version control systems (@pxref{VCS Repositories}), |
| 311 | these commands provide specialized versions of @kbd{C-x v M D} (see | 320 | these 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 |
| 313 | repositories. These commands are useful both when working on a single | 322 | account the state of upstream repositories. These commands are useful |
| 314 | branch and when developing features on a separate branch | 323 | both when working on a single branch and when developing features on a |
| 315 | (@pxref{Branches}). These two cases are conceptually distinct, and so | 324 | separate branch (@pxref{Branches}). These two cases are conceptually |
| 316 | we will introduce them separately. | 325 | distinct, and so we will introduce them separately. |
| 317 | 326 | ||
| 318 | First, consider working on a single branch. @dfn{Outstanding changes} | 327 | First, consider working on a single branch. @dfn{Outstanding changes} |
| 319 | are those which you haven't yet pushed upstream. This includes both | 328 | are 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 | |||
| 321 | cases the reason these changes are not pushed yet is that they are not | 330 | cases the reason these changes are not pushed yet is that they are not |
| 322 | finished: the changes committed so far don't make sense in isolation. | 331 | finished: 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 |
| 328 | Type @kbd{C-x v o D} (@code{vc-root-diff-outgoing-base}) to display a | 337 | Type @kbd{C-x v T D} (@code{vc-root-diff-outgoing-base}) to display a |
| 329 | summary of all these changes, committed and uncommitted. This summary | 338 | summary of all these changes, committed and uncommitted. This summary |
| 330 | is in the form of a diff of what committing and pushing (@pxref{Pulling | 339 | is 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 |
| 332 | can use @kbd{C-x v o =} (@code{vc-diff-outgoing-base}) instead to limit | 341 | can use @kbd{C-x v T =} (@code{vc-diff-outgoing-base}) instead to limit |
| 333 | the display of changes to the current VC fileset. (The difference | 342 | the display of changes to the current VC fileset. (The difference |
| 334 | between @w{@kbd{C-x v o D}} and @w{@kbd{C-x v o =}} is like the | 343 | between @w{@kbd{C-x v T D}} and @w{@kbd{C-x v T =}} is like the |
| 335 | difference between @kbd{C-x v D} and @kbd{C-x v =} (@pxref{Old | 344 | difference between @kbd{C-x v D} and @kbd{C-x v =} (@pxref{Old |
| 336 | Revisions}).)@footnote{Another point of comparison is that these | 345 | Revisions}).)@footnote{Another point of comparison is that these |
| 337 | commands are like @w{@kbd{C-x v O =}} (@code{vc-fileset-diff-outgoing}) | 346 | commands 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 | |||
| 340 | commands, you can use a prefix argument to specify a particular upstream | 349 | commands, you can use a prefix argument to specify a particular upstream |
| 341 | location.} | 350 | location.} |
| 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 | ||
| 356 | Type @kbd{C-x v T L} (@code{vc-root-log-outgoing-base}) to display a | ||
| 357 | summary of the same changes in the form of a revision log; this does not | ||
| 358 | include 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 | ||
| 360 | the current VC fileset. | ||
| 361 | |||
| 343 | Second, consider developing a feature on a separate branch. Call this | 362 | Second, consider developing a feature on a separate branch. Call this |
| 344 | the @dfn{topic branch},@footnote{What we mean by a topic branch is any | 363 | the @dfn{topic branch},@footnote{What we mean by a topic branch is any |
| 345 | shorter-lived branch used for work which will later be merged into a | 364 | shorter-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 | |||
| 359 | on the topic branch that haven't yet been merged into the trunk, plus | 378 | on the topic branch that haven't yet been merged into the trunk, plus |
| 360 | uncommitted changes. | 379 | uncommitted changes. |
| 361 | 380 | ||
| 362 | When the current branch is a topic branch and you type @kbd{C-x v o D}, | 381 | When the current branch is a topic branch and you type @kbd{C-x v T D}, |
| 363 | Emacs displays a summary of all the changes that are outstanding against | 382 | Emacs displays a summary of all the changes that are outstanding against |
| 364 | the trunk to which the current branch will be merged. This summary is | 383 | the trunk to which the current branch will be merged. This summary is |
| 365 | in the form of a diff of what committing and pushing all the changes, | 384 | in 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. |
| 367 | As above, you can use @kbd{C-x v o =} instead to limit the display of | 386 | As above, you can use @kbd{C-x v T =} instead to limit the display of |
| 368 | changes to the current VC fileset. | 387 | changes to the current VC fileset. @kbd{C-x v T L} and @kbd{C-x v T l} |
| 388 | show the corresponding revision logs, excluding uncommitted changes as | ||
| 389 | above. | ||
| 369 | 390 | ||
| 370 | This functionality relies on Emacs correctly detecting whether the | 391 | This functionality relies on Emacs correctly detecting whether the |
| 371 | current branch is a trunk or a topic branch, and in the latter case, | 392 | current 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 |
| 380 | matching the names of branches that should always be considered trunk | 401 | matching the names of branches that should always be considered trunk |
| 381 | and topic branches, respectively. You can also specify prefix arguments | 402 | and topic branches, respectively. You can also specify prefix arguments |
| 382 | to @kbd{C-x v o D} and @kbd{C-x v o =}. Here is a summary of how to use | 403 | to @kbd{C-x v T @dots{}}. Here is a summary of how to use these |
| 383 | these controls: | 404 | controls: |
| 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 | |||
| 425 | branch. | 446 | branch. |
| 426 | 447 | ||
| 427 | @item | 448 | @item |
| 428 | Supply a double prefix argument, i.e. @w{@kbd{C-u C-u C-x v o @dots{}}}, | 449 | Supply a double prefix argument, i.e. @w{@kbd{C-u C-u C-x v T @dots{}}}, |
| 429 | and Emacs will treat the current branch as a trunk, no matter what. | 450 | and Emacs will treat the current branch as a trunk, no matter what. |
| 430 | This is useful when you simply want to obtain a diff of all outgoing | 451 | This is useful when you simply want to obtain a diff of all outgoing |
| 431 | changes (@pxref{VC Change Log}) plus uncommitted changes. | 452 | changes (@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 |
| 435 | Finally, you can take full manual control by supplying a single prefix | 456 | Finally, you can take full manual control by supplying a single prefix |
| 436 | argument, i.e. @w{@kbd{C-u C-x v o @dots{}}}. Emacs will prompt you for | 457 | argument, i.e. @w{@kbd{C-u C-x v T @dots{}}}. Emacs will prompt you for |
| 437 | the @dfn{outgoing base}, which is the upstream location for which the | 458 | the @dfn{outgoing base}, which is the upstream location for which the |
| 438 | changes are destined once they are no longer outstanding. | 459 | changes 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 | ||
| 522 | The split can be either vertical or horizontal, depending on the | 524 | The split can be either vertical or horizontal, depending on the |
| 523 | variables @code{split-height-threshold} and | 525 | variables @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 | |||
| 528 | split puts the new window on the right. If neither condition holds, | 530 | split puts the new window on the right. If neither condition holds, |
| 529 | Emacs tries to split so that the new window is below---but only if the | 531 | Emacs tries to split so that the new window is below---but only if the |
| 530 | window was not split before (to avoid excessive splitting). Whether | 532 | window was not split before (to avoid excessive splitting). Whether |
| 531 | Emacs tries first to split vertically or horizontally, is | 533 | Emacs tries first to split vertically or horizontally when both |
| 532 | determined by the value of @code{split-window-preferred-direction}. | 534 | conditions hold is determined by the value of |
| 535 | @code{split-window-preferred-direction}. Its default is @code{longest}, | ||
| 536 | which means to split vertically if the window's frame is taller than it | ||
| 537 | is wide (a @dfn{portrait} frame), and split horizontally if its wider | ||
| 538 | than it's tall (a @dfn{landscape} frame). The values @code{vertical} | ||
| 539 | and @code{horizontal} always prefer, respectively, the vertical or the | ||
| 540 | horizontal split. | ||
| 533 | 541 | ||
| 534 | @item | 542 | @item |
| 535 | Otherwise, display the buffer in a window previously showing it. | 543 | Otherwise, 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}. | |||
| 2344 | The macro @code{condition-case-unless-debug} provides another way to | 2344 | The macro @code{condition-case-unless-debug} provides another way to |
| 2345 | handle debugging of such forms. It behaves exactly like | 2345 | handle 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 |
| 2347 | non-@code{nil}, in which case it does not handle any errors at all. | 2347 | non-@code{nil}, in which case it causes Emacs to enter the debugger |
| 2348 | before executing any applicable handler. (The applicable handler, if | ||
| 2349 | any, 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 | |||
| 2243 | property (@pxref{Display Property}) showing the ellipsis, instead of | 2243 | property (@pxref{Display Property}) showing the ellipsis, instead of |
| 2244 | actually truncating the string. | 2244 | actually truncating the string. |
| 2245 | 2245 | ||
| 2246 | See also the function @code{truncate-string-pixelwise} for pixel-level | ||
| 2247 | resolution. | ||
| 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 | |||
| 2440 | that buffer when computing the width of @var{string}. | 2443 | that 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 | ||
| 2447 | This is a convenience function that uses @code{window-text-pixel-size} | ||
| 2448 | to truncate @var{string} to @var{max-pixels} pixels. Caveat: if you | ||
| 2449 | call this function to measure the width of a string with embedded | ||
| 2450 | newlines, it will then return the width of the widest substring that | ||
| 2451 | does not include newlines. The meaning of this result is the widest | ||
| 2452 | line taken by the string if inserted into a buffer. If @var{buffer} is | ||
| 2453 | non-@code{nil}, use any face remappings (@pxref{Face Remapping}) from | ||
| 2454 | that buffer when computing the width of @var{string}. | ||
| 2455 | |||
| 2456 | If @var{ellipsis} is non-@code{nil}, it should be a string which will | ||
| 2457 | replace the end of @var{string} when it is truncated. In this case, | ||
| 2458 | more characters will be removed from @var{string} to free enough space | ||
| 2459 | for @var{ellipsis} to fit within @var{max-pixels} pixels. However, if | ||
| 2460 | the 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 | ||
| 2463 | value returned by the function @code{truncate-string-ellipsis}, | ||
| 2464 | described above. | ||
| 2465 | |||
| 2466 | If @var{ellipsis-pixels} is non-@code{nil} and @var{ellipsis} is | ||
| 2467 | non-@code{nil}, it should be the number of pixels of @var{ellipsis} that | ||
| 2468 | you should precompute using @code{string-pixel-width}, specifying the | ||
| 2469 | same buffer. This is useful to avoid the cost of recomputing this value | ||
| 2470 | repeatedly when you have many strings to truncate using the same | ||
| 2471 | ellipsis string. | ||
| 2472 | |||
| 2473 | See also the function @code{truncate-string-to-width} for | ||
| 2474 | character-level resolution. | ||
| 2475 | @end defun | ||
| 2476 | |||
| 2443 | @defun line-pixel-height | 2477 | @defun line-pixel-height |
| 2444 | This function returns the height in pixels of the line at point in the | 2478 | This function returns the height in pixels of the line at point in the |
| 2445 | selected window. The value includes the line spacing of the line | 2479 | selected 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 | |||
| 109 | descending from it. | 109 | descending 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 |
| 113 | This function returns the unique identifier of a frame, an integer, | 114 | This function returns the unique identifier of a frame, an integer, |
| 114 | assigned to @var{frame}. If @var{frame} is @code{nil} or unspecified, | 115 | assigned 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 | |||
| 3187 | you're done. | 3188 | you're done. |
| 3188 | @end deffn | 3189 | @end deffn |
| 3189 | 3190 | ||
| 3191 | @deffn Command select-frame-by-id id &optional noerror | ||
| 3192 | This function searches open and undeletable frames for a matching frame | ||
| 3193 | identifier @var{id} (@pxref{Frames}). If found, its frame is undeleted, | ||
| 3194 | if necessary, then raised, given focus, and made the selected frame. On | ||
| 3195 | a text terminal, raising a frame causes it to occupy the entire terminal | ||
| 3196 | display. | ||
| 3197 | |||
| 3198 | This function returns the selected frame or signals an error if @var{id} | ||
| 3199 | is not found, unless @var{noerror} is non-@code{nil}, in which case it | ||
| 3200 | returns @code{nil}. | ||
| 3201 | @end deffn | ||
| 3202 | |||
| 3203 | @deffn Command undelete-frame-by-id id &optional noerror | ||
| 3204 | This function searches undeletable frames for a matching frame | ||
| 3205 | identifier @var{id} (@pxref{Frames}). If found, its frame is undeleted, | ||
| 3206 | raised, given focus, and made the selected frame. On a text terminal, | ||
| 3207 | raising a frame causes it to occupy the entire terminal display. | ||
| 3208 | |||
| 3209 | This 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 | ||
| 3211 | case it returns @code{nil}. | ||
| 3212 | @end deffn | ||
| 3213 | |||
| 3190 | @cindex text-terminal focus notification | 3214 | @cindex text-terminal focus notification |
| 3191 | Emacs cooperates with the window system by arranging to select frames | 3215 | Emacs cooperates with the window system by arranging to select frames |
| 3192 | as the server and window manager request. When a window system | 3216 | as 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 |
| 1113 | elements that appear in @var{sequence2} where removed. If the optional | 1113 | elements that do not appear in @var{sequence2} were removed. If the |
| 1114 | argument @var{function} is non-@code{nil}, it is a function of two | 1114 | optional argument @var{function} is non-@code{nil}, it is a function of |
| 1115 | arguments to use to compare elements instead of the default | 1115 | two 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 | 1129 | elements 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 | 1130 | argument @var{function} is non-@code{nil}, it is a function of two |
| 1131 | use to compare elements instead of the default @code{equal}. | 1131 | arguments 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 | ||
| 2654 | If @var{symbol} does not have a connection-local | 2654 | If @var{symbol} does not have a connection-local |
| 2655 | binding, the value is the default binding of the variable. | 2655 | binding, the value is the default binding of the variable. |
| 2656 | |||
| 2657 | The difference to @code{with-connection-local@{-application@}-variables} | ||
| 2658 | is, that @code{symbol} is not set buffer-local. A typical usage pattern | ||
| 2659 | is to use only the the connection value of a variable if it exists, and | ||
| 2660 | not to use its default value otherwise (using @code{my-app-variable} | ||
| 2661 | initialized 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 |
| 4123 | window. | 4123 | window. |
| 4124 | 4124 | ||
| 4125 | This function obeys the usual rules that determine when a window may | 4125 | This function obeys the usual rules that determine when a window may be |
| 4126 | be split (@pxref{Splitting Windows}). It first tries to split by | 4126 | split (@pxref{Splitting Windows}). It first tries either a vertical |
| 4127 | placing the new window below, subject to the restriction imposed by | 4127 | split by placing the new window below, subject to the restriction |
| 4128 | @code{split-height-threshold} (see below), in addition to any other | 4128 | imposed by @code{split-height-threshold} (see below), or a horizontal |
| 4129 | restrictions. If that fails, it tries to split by placing the new | 4129 | split that places the new window to the right, subject to |
| 4130 | window to the right, subject to @code{split-width-threshold} (see | 4130 | @code{split-width-threshold}, in addition to any other restrictions. |
| 4131 | below). If that also fails, and the window is the only window on its | 4131 | Whether it tries first to split vertically or horizontally depends on |
| 4132 | frame, this function again tries to split and place the new window | 4132 | the value of the user option @code{split-window-preferred-direction}. |
| 4133 | below, disregarding @code{split-height-threshold}. If this fails as | 4133 | If splitting along the first dimension fails, it tries to split along |
| 4134 | well, this function gives up and returns @code{nil}. | 4134 | the other dimension. If that also fails, and the window is the only |
| 4135 | window on its frame, this function again tries to split and place the | ||
| 4136 | new window below, disregarding @code{split-height-threshold}. If this | ||
| 4137 | fails 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}, | |||
| 4150 | that means not to split this way. | 4153 | that means not to split this way. |
| 4151 | @end defopt | 4154 | @end defopt |
| 4152 | 4155 | ||
| 4156 | @defopt split-window-preferred-direction | ||
| 4157 | This variable determines the first dimension along which | ||
| 4158 | @code{split-window-sensibly} tries to split the window, if the window | ||
| 4159 | could be split both vertically and horizontally, as determined by the | ||
| 4160 | values of @code{split-height-threshold} and | ||
| 4161 | @code{split-width-threshold}. The default value is @code{longest}, | ||
| 4162 | which means to split vertically if the height of the window's frame is | ||
| 4163 | greater or equal to its width, and horizontally otherwise. The values | ||
| 4164 | @code{vertical} and @code{horizontal} specify the direction in which to | ||
| 4165 | attempt the first split. | ||
| 4166 | @end defopt | ||
| 4167 | |||
| 4153 | @defopt even-window-sizes | 4168 | @defopt even-window-sizes |
| 4154 | This variable, if non-@code{nil}, causes @code{display-buffer} to even | 4169 | This variable, if non-@code{nil}, causes @code{display-buffer} to even |
| 4155 | window sizes whenever it reuses an existing window, and that window is | 4170 | window sizes whenever it reuses an existing window, and that window is |