diff options
| author | Sean Whitton | 2025-07-25 19:34:04 +0100 |
|---|---|---|
| committer | Sean Whitton | 2025-07-25 19:34:04 +0100 |
| commit | 50ffb29d0bbb92a7c6569c83d2e3e4868c4e867b (patch) | |
| tree | 0911cfa9182a3910deb041c6bc7391f2ce849096 | |
| parent | 08ca6caa0a081cd67d253b09896c3789268da7a1 (diff) | |
| download | emacs-50ffb29d0bbb92a7c6569c83d2e3e4868c4e867b.tar.gz emacs-50ffb29d0bbb92a7c6569c83d2e3e4868c4e867b.zip | |
VC: New support for other working trees
* lisp/vc/vc-git.el (vc-git--read-start-point): New function,
factored out of vc-git-create-tag.
(vc-git-create-tag): Use it.
(vc-git--worktrees, vc-git-known-other-working-trees)
(vc-git-add-working-tree, vc-git-delete-working-tree)
(vc-git-move-working-tree):
* lisp/vc/vc-hg.el (vc-hg-known-other-working-trees)
(vc-hg-add-working-tree, vc-hg--shared-p)
(vc-hg-delete-working-tree, vc-hg-move-working-tree): New
functions.
* lisp/vc/vc.el: Define API for known-other-working-tree,
add-working-tree, delete-working-tree and move-working-tree
backend functions.
(vc-dir-status-files): New function.
(project-current-directory-override): Declare.
(dired-rename-subdir): Autoload.
(vc-add-working-tree, vc-switch-working-tree)
(vc-delete-working-tree, vc-move-working-tree): New commands.
* lisp/vc/vc-hooks.el (vc-prefix-map): Bind them under C-x v.
* doc/emacs/vc1-xtra.texi (Other Working Trees): New node.
* etc/NEWS: Announce the new commands.
* test/lisp/vc/vc-tests/vc-tests.el
(vc-test--other-working-trees): New function.
(vc-test-git07-other-working-trees)
(vc-test-hg07-other-working-trees): New tests.
* lisp/ldefs-boot.el: Regenerate.
| -rw-r--r-- | doc/emacs/emacs.texi | 1 | ||||
| -rw-r--r-- | doc/emacs/vc1-xtra.texi | 65 | ||||
| -rw-r--r-- | etc/NEWS | 16 | ||||
| -rw-r--r-- | lisp/ldefs-boot.el | 256 | ||||
| -rw-r--r-- | lisp/vc/vc-dir.el | 4 | ||||
| -rw-r--r-- | lisp/vc/vc-git.el | 70 | ||||
| -rw-r--r-- | lisp/vc/vc-hg.el | 53 | ||||
| -rw-r--r-- | lisp/vc/vc-hooks.el | 6 | ||||
| -rw-r--r-- | lisp/vc/vc.el | 194 | ||||
| -rw-r--r-- | test/lisp/vc/vc-tests/vc-tests.el | 119 |
10 files changed, 637 insertions, 147 deletions
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index ba47190944a..b373dc092f8 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi | |||
| @@ -868,6 +868,7 @@ Miscellaneous Commands and Features of VC | |||
| 868 | * Change Logs and VC:: Generating a change log file from log entries. | 868 | * Change Logs and VC:: Generating a change log file from log entries. |
| 869 | * VC Delete/Rename:: Deleting and renaming version-controlled files. | 869 | * VC Delete/Rename:: Deleting and renaming version-controlled files. |
| 870 | * Revision Tags:: Symbolic names for revisions. | 870 | * Revision Tags:: Symbolic names for revisions. |
| 871 | * Other Working Trees:: Multiple sets of workfiles. | ||
| 871 | * Version Headers:: Inserting version control headers into working files. | 872 | * Version Headers:: Inserting version control headers into working files. |
| 872 | * Editing VC Commands:: Editing the VC shell commands that Emacs will run. | 873 | * Editing VC Commands:: Editing the VC shell commands that Emacs will run. |
| 873 | * Preparing Patches:: Preparing and composing patches from within VC. | 874 | * Preparing Patches:: Preparing and composing patches from within VC. |
diff --git a/doc/emacs/vc1-xtra.texi b/doc/emacs/vc1-xtra.texi index e35883c4819..29ae63c7e41 100644 --- a/doc/emacs/vc1-xtra.texi +++ b/doc/emacs/vc1-xtra.texi | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | * Change Logs and VC:: Generating a change log file from log entries. | 14 | * Change Logs and VC:: Generating a change log file from log entries. |
| 15 | * VC Delete/Rename:: Deleting and renaming version-controlled files. | 15 | * VC Delete/Rename:: Deleting and renaming version-controlled files. |
| 16 | * Revision Tags:: Symbolic names for revisions. | 16 | * Revision Tags:: Symbolic names for revisions. |
| 17 | * Other Working Trees:: Multiple sets of workfiles. | ||
| 17 | * Version Headers:: Inserting version control headers into working files. | 18 | * Version Headers:: Inserting version control headers into working files. |
| 18 | * Editing VC Commands:: Editing the VC shell commands that Emacs will run. | 19 | * Editing VC Commands:: Editing the VC shell commands that Emacs will run. |
| 19 | * Preparing Patches:: Preparing and composing patches from within VC. | 20 | * Preparing Patches:: Preparing and composing patches from within VC. |
| @@ -226,6 +227,70 @@ an old tag, the renamed file is retrieved under its new name, which is | |||
| 226 | not the name that the makefile expects. So the program won't really | 227 | not the name that the makefile expects. So the program won't really |
| 227 | work as retrieved. | 228 | work as retrieved. |
| 228 | 229 | ||
| 230 | @node Other Working Trees | ||
| 231 | @subsubsection Multiple Working Trees for One Repository | ||
| 232 | |||
| 233 | @cindex other working trees | ||
| 234 | @cindex multiple working trees | ||
| 235 | Some VCS support more than one working tree with the same backing | ||
| 236 | repository or revisions store. This means that you can have different | ||
| 237 | revisions or branches (@pxref{Branches}) checked out simultaneously, in | ||
| 238 | different working trees, but with all revision history, branches, tags | ||
| 239 | and other metadata shared. The following commands let you switch | ||
| 240 | between and modify different working trees. | ||
| 241 | |||
| 242 | @table @kbd | ||
| 243 | @item C-x v w c | ||
| 244 | Add a new working tree. | ||
| 245 | |||
| 246 | @item C-x v w w | ||
| 247 | Visit this file in another working tree. | ||
| 248 | |||
| 249 | @item C-x v w x | ||
| 250 | Delete a working tree you no longer need. | ||
| 251 | |||
| 252 | @item C-x v w R | ||
| 253 | Relocate a working tree to another file name. | ||
| 254 | @end table | ||
| 255 | |||
| 256 | @kindex C-x v w c | ||
| 257 | @findex vc-add-working-tree | ||
| 258 | You can start using multiple working trees by using the command | ||
| 259 | @w{@kbd{C-x v w c}} (@code{vc-add-working-tree}) to create a new working | ||
| 260 | tree. This prompts you to specify a destination directory, which | ||
| 261 | identifies the working tree, and which will hold the new set of | ||
| 262 | workfiles. | ||
| 263 | |||
| 264 | Different VCS have different rules about what may and must be checked | ||
| 265 | out in other working trees, so there may be additional prompts depending | ||
| 266 | on the VCS in use. For example, Git requires that each branch be | ||
| 267 | checked out in only one working tree at a time, so when using Git, Emacs | ||
| 268 | will also prompt you for the name of the branch to be checked out in the | ||
| 269 | new working tree. | ||
| 270 | |||
| 271 | @kindex C-x v w w | ||
| 272 | @findex vc-switch-working-tree | ||
| 273 | Once your repository has other working trees, you can use the command | ||
| 274 | @kbd{C-x v w w} (@code{vc-switch-working-tree}) to switch between them. | ||
| 275 | It tries to find the analogue of the current buffer's file | ||
| 276 | under another working tree. Typically the sets of workfiles | ||
| 277 | under different working trees differ more in file contents than in which | ||
| 278 | files do and do not exist. In other words, the file the | ||
| 279 | current buffer visits probably exists in other working trees too, and | ||
| 280 | this command lets you switch to those versions of the file. | ||
| 281 | |||
| 282 | @kindex C-x v w x | ||
| 283 | @kindex C-x v w R | ||
| 284 | @findex vc-delete-working-tree | ||
| 285 | @findex vc-move-working-tree | ||
| 286 | The commands @kbd{C-x v w x} (@code{vc-delete-working-tree}) and | ||
| 287 | @kbd{C-x v w R} (@code{vc-move-working-tree}) are for performing | ||
| 288 | maintenance tasks on other working trees, letting you delete, move and | ||
| 289 | rename them. Deleting other working trees is particular useful because | ||
| 290 | a common use for multiple working trees is to create throwaway copies of | ||
| 291 | the repository to quickly test changes, without interfering with any | ||
| 292 | work-in-progress you may have in your primary working trees. | ||
| 293 | |||
| 229 | @node Version Headers | 294 | @node Version Headers |
| 230 | @subsubsection Inserting Version Control Headers | 295 | @subsubsection Inserting Version Control Headers |
| 231 | 296 | ||
| @@ -1843,6 +1843,22 @@ appearance of the list can be customized with the new faces | |||
| 1843 | 1843 | ||
| 1844 | ** VC | 1844 | ** VC |
| 1845 | 1845 | ||
| 1846 | +++ | ||
| 1847 | *** New commands to handle repositories with multiple working trees. | ||
| 1848 | Some VCS support more than one working tree with the same backing | ||
| 1849 | revisions store, such as with Git's 'worktree' subcommand and | ||
| 1850 | Mercurial's 'share' extension. Emacs now has some commands to manage | ||
| 1851 | other working trees: | ||
| 1852 | |||
| 1853 | - 'C-x v w c': Add a new working tree. | ||
| 1854 | - 'C-x v w w': Visit this file in another working tree. | ||
| 1855 | - 'C-x v w x': Delete a working tree you no longer need. | ||
| 1856 | - 'C-x v w R': Relocate a working tree to another file name. | ||
| 1857 | |||
| 1858 | In addition, Lisp programs that extend VC can invoke the new backend | ||
| 1859 | functions to obtain a list of other working trees, and to add, remove | ||
| 1860 | and relocate them. | ||
| 1861 | |||
| 1846 | --- | 1862 | --- |
| 1847 | *** Using 'e' from Log View mode to modify change comments now works for Git. | 1863 | *** Using 'e' from Log View mode to modify change comments now works for Git. |
| 1848 | 1864 | ||
diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index 8d275b37172..10328165450 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el | |||
| @@ -5234,8 +5234,6 @@ evaluate the variable `compilation-shell-minor-mode'. | |||
| 5234 | The mode's hook is called both when the mode is enabled and when it is | 5234 | The mode's hook is called both when the mode is enabled and when it is |
| 5235 | disabled. | 5235 | disabled. |
| 5236 | 5236 | ||
| 5237 | \\{compilation-shell-minor-mode-map} | ||
| 5238 | |||
| 5239 | (fn &optional ARG)" t) | 5237 | (fn &optional ARG)" t) |
| 5240 | (autoload 'compilation-minor-mode "compile" "\ | 5238 | (autoload 'compilation-minor-mode "compile" "\ |
| 5241 | Toggle Compilation minor mode. | 5239 | Toggle Compilation minor mode. |
| @@ -5258,8 +5256,6 @@ evaluate the variable `compilation-minor-mode'. | |||
| 5258 | The mode's hook is called both when the mode is enabled and when it is | 5256 | The mode's hook is called both when the mode is enabled and when it is |
| 5259 | disabled. | 5257 | disabled. |
| 5260 | 5258 | ||
| 5261 | \\{compilation-minor-mode-map} | ||
| 5262 | |||
| 5263 | (fn &optional ARG)" t) | 5259 | (fn &optional ARG)" t) |
| 5264 | (autoload 'compilation-next-error-function "compile" "\ | 5260 | (autoload 'compilation-next-error-function "compile" "\ |
| 5265 | Advance to the next error message and visit the file where the error was. | 5261 | Advance to the next error message and visit the file where the error was. |
| @@ -5372,7 +5368,10 @@ either customize it (see the info node `Easy Customization') | |||
| 5372 | or call the function `global-completion-preview-mode'.") | 5368 | or call the function `global-completion-preview-mode'.") |
| 5373 | (custom-autoload 'global-completion-preview-mode "completion-preview" nil) | 5369 | (custom-autoload 'global-completion-preview-mode "completion-preview" nil) |
| 5374 | (autoload 'global-completion-preview-mode "completion-preview" "\ | 5370 | (autoload 'global-completion-preview-mode "completion-preview" "\ |
| 5375 | Toggle Completion-Preview mode in all buffers. | 5371 | Toggle Completion-Preview mode in many buffers. |
| 5372 | Specifically, Completion-Preview mode is enabled in all buffers where | ||
| 5373 | `completion-preview-mode' would do it. | ||
| 5374 | |||
| 5376 | With prefix ARG, enable Global Completion-Preview mode if ARG is | 5375 | With prefix ARG, enable Global Completion-Preview mode if ARG is |
| 5377 | positive; otherwise, disable it. | 5376 | positive; otherwise, disable it. |
| 5378 | 5377 | ||
| @@ -5380,9 +5379,6 @@ If called from Lisp, toggle the mode if ARG is `toggle'. | |||
| 5380 | Enable the mode if ARG is nil, omitted, or is a positive number. | 5379 | Enable the mode if ARG is nil, omitted, or is a positive number. |
| 5381 | Disable the mode if ARG is a negative number. | 5380 | Disable the mode if ARG is a negative number. |
| 5382 | 5381 | ||
| 5383 | Completion-Preview mode is enabled in all buffers where | ||
| 5384 | `completion-preview-mode' would do it. | ||
| 5385 | |||
| 5386 | See `completion-preview-mode' for more information on | 5382 | See `completion-preview-mode' for more information on |
| 5387 | Completion-Preview mode. | 5383 | Completion-Preview mode. |
| 5388 | 5384 | ||
| @@ -6539,7 +6535,10 @@ either customize it (see the info node `Easy Customization') | |||
| 6539 | or call the function `global-cwarn-mode'.") | 6535 | or call the function `global-cwarn-mode'.") |
| 6540 | (custom-autoload 'global-cwarn-mode "cwarn" nil) | 6536 | (custom-autoload 'global-cwarn-mode "cwarn" nil) |
| 6541 | (autoload 'global-cwarn-mode "cwarn" "\ | 6537 | (autoload 'global-cwarn-mode "cwarn" "\ |
| 6542 | Toggle Cwarn mode in all buffers. | 6538 | Toggle Cwarn mode in many buffers. |
| 6539 | Specifically, Cwarn mode is enabled in all buffers where | ||
| 6540 | `turn-on-cwarn-mode-if-enabled' would do it. | ||
| 6541 | |||
| 6543 | With prefix ARG, enable Global Cwarn mode if ARG is positive; | 6542 | With prefix ARG, enable Global Cwarn mode if ARG is positive; |
| 6544 | otherwise, disable it. | 6543 | otherwise, disable it. |
| 6545 | 6544 | ||
| @@ -6547,9 +6546,6 @@ If called from Lisp, toggle the mode if ARG is `toggle'. | |||
| 6547 | Enable the mode if ARG is nil, omitted, or is a positive number. | 6546 | Enable the mode if ARG is nil, omitted, or is a positive number. |
| 6548 | Disable the mode if ARG is a negative number. | 6547 | Disable the mode if ARG is a negative number. |
| 6549 | 6548 | ||
| 6550 | Cwarn mode is enabled in all buffers where | ||
| 6551 | `turn-on-cwarn-mode-if-enabled' would do it. | ||
| 6552 | |||
| 6553 | See `cwarn-mode' for more information on Cwarn mode. | 6549 | See `cwarn-mode' for more information on Cwarn mode. |
| 6554 | 6550 | ||
| 6555 | (fn &optional ARG)" t) | 6551 | (fn &optional ARG)" t) |
| @@ -7653,18 +7649,18 @@ Also see the `diff-entire-buffers' variable. | |||
| 7653 | 7649 | ||
| 7654 | (autoload 'diff-mode "diff-mode" "\ | 7650 | (autoload 'diff-mode "diff-mode" "\ |
| 7655 | Major mode for viewing/editing context diffs. | 7651 | Major mode for viewing/editing context diffs. |
| 7656 | Supports unified and context diffs as well as (to a lesser extent) | 7652 | Supports unified and context diffs as well as, to a lesser extent, diffs |
| 7657 | normal diffs. | 7653 | in the old \"normal\" format. (Unified diffs have become the standard, |
| 7658 | 7654 | most commonly encountered format.) If you edit the buffer manually, | |
| 7659 | When the buffer is read-only, the ESC prefix is not necessary. | 7655 | `diff-mode' will try to update the hunk headers for you on-the-fly. |
| 7660 | If you edit the buffer manually, `diff-mode' will try to update the hunk | ||
| 7661 | headers for you on-the-fly. | ||
| 7662 | 7656 | ||
| 7663 | You can also switch between context diff and unified diff with \\[diff-context->unified], | 7657 | You can also switch between context diff and unified diff with \\[diff-context->unified], |
| 7664 | or vice versa with \\[diff-unified->context] and you can also reverse the direction of | 7658 | or vice versa with \\[diff-unified->context] and you can also reverse the direction of |
| 7665 | a diff with \\[diff-reverse-direction]. | 7659 | a diff with \\[diff-reverse-direction]. |
| 7666 | 7660 | ||
| 7667 | \\{diff-mode-map} | 7661 | \\{diff-mode-map} |
| 7662 | In read-only buffers the following bindings are also available: | ||
| 7663 | \\{diff-read-only-map} | ||
| 7668 | 7664 | ||
| 7669 | (fn)" t) | 7665 | (fn)" t) |
| 7670 | (autoload 'diff-minor-mode "diff-mode" "\ | 7666 | (autoload 'diff-minor-mode "diff-mode" "\ |
| @@ -8114,7 +8110,10 @@ either customize it (see the info node `Easy Customization') | |||
| 8114 | or call the function `global-display-fill-column-indicator-mode'.") | 8110 | or call the function `global-display-fill-column-indicator-mode'.") |
| 8115 | (custom-autoload 'global-display-fill-column-indicator-mode "display-fill-column-indicator" nil) | 8111 | (custom-autoload 'global-display-fill-column-indicator-mode "display-fill-column-indicator" nil) |
| 8116 | (autoload 'global-display-fill-column-indicator-mode "display-fill-column-indicator" "\ | 8112 | (autoload 'global-display-fill-column-indicator-mode "display-fill-column-indicator" "\ |
| 8117 | Toggle Display-Fill-Column-Indicator mode in all buffers. | 8113 | Toggle Display-Fill-Column-Indicator mode in many buffers. |
| 8114 | Specifically, Display-Fill-Column-Indicator mode is enabled in all | ||
| 8115 | buffers where `display-fill-column-indicator--turn-on' would do it. | ||
| 8116 | |||
| 8118 | With prefix ARG, enable Global Display-Fill-Column-Indicator mode if | 8117 | With prefix ARG, enable Global Display-Fill-Column-Indicator mode if |
| 8119 | ARG is positive; otherwise, disable it. | 8118 | ARG is positive; otherwise, disable it. |
| 8120 | 8119 | ||
| @@ -8122,9 +8121,6 @@ If called from Lisp, toggle the mode if ARG is `toggle'. | |||
| 8122 | Enable the mode if ARG is nil, omitted, or is a positive number. | 8121 | Enable the mode if ARG is nil, omitted, or is a positive number. |
| 8123 | Disable the mode if ARG is a negative number. | 8122 | Disable the mode if ARG is a negative number. |
| 8124 | 8123 | ||
| 8125 | Display-Fill-Column-Indicator mode is enabled in all buffers where | ||
| 8126 | `display-fill-column-indicator--turn-on' would do it. | ||
| 8127 | |||
| 8128 | See `display-fill-column-indicator-mode' for more information on | 8124 | See `display-fill-column-indicator-mode' for more information on |
| 8129 | Display-Fill-Column-Indicator mode. | 8125 | Display-Fill-Column-Indicator mode. |
| 8130 | 8126 | ||
| @@ -8185,7 +8181,10 @@ either customize it (see the info node `Easy Customization') | |||
| 8185 | or call the function `global-display-line-numbers-mode'.") | 8181 | or call the function `global-display-line-numbers-mode'.") |
| 8186 | (custom-autoload 'global-display-line-numbers-mode "display-line-numbers" nil) | 8182 | (custom-autoload 'global-display-line-numbers-mode "display-line-numbers" nil) |
| 8187 | (autoload 'global-display-line-numbers-mode "display-line-numbers" "\ | 8183 | (autoload 'global-display-line-numbers-mode "display-line-numbers" "\ |
| 8188 | Toggle Display-Line-Numbers mode in all buffers. | 8184 | Toggle Display-Line-Numbers mode in many buffers. |
| 8185 | Specifically, Display-Line-Numbers mode is enabled in all buffers | ||
| 8186 | where `display-line-numbers--turn-on' would do it. | ||
| 8187 | |||
| 8189 | With prefix ARG, enable Global Display-Line-Numbers mode if ARG is | 8188 | With prefix ARG, enable Global Display-Line-Numbers mode if ARG is |
| 8190 | positive; otherwise, disable it. | 8189 | positive; otherwise, disable it. |
| 8191 | 8190 | ||
| @@ -8193,9 +8192,6 @@ If called from Lisp, toggle the mode if ARG is `toggle'. | |||
| 8193 | Enable the mode if ARG is nil, omitted, or is a positive number. | 8192 | Enable the mode if ARG is nil, omitted, or is a positive number. |
| 8194 | Disable the mode if ARG is a negative number. | 8193 | Disable the mode if ARG is a negative number. |
| 8195 | 8194 | ||
| 8196 | Display-Line-Numbers mode is enabled in all buffers where | ||
| 8197 | `display-line-numbers--turn-on' would do it. | ||
| 8198 | |||
| 8199 | See `display-line-numbers-mode' for more information on | 8195 | See `display-line-numbers-mode' for more information on |
| 8200 | Display-Line-Numbers mode. | 8196 | Display-Line-Numbers mode. |
| 8201 | 8197 | ||
| @@ -8550,8 +8546,8 @@ switch on the minor mode in all major modes), nil (meaning don't | |||
| 8550 | switch on in any major mode), a list of modes (meaning switch on only | 8546 | switch on in any major mode), a list of modes (meaning switch on only |
| 8551 | in those modes and their descendants), or a list (not MODES...), | 8547 | in those modes and their descendants), or a list (not MODES...), |
| 8552 | meaning switch on in any major mode except MODES. The value can also | 8548 | meaning switch on in any major mode except MODES. The value can also |
| 8553 | mix all of these forms, see the info node `Defining Minor Modes' for | 8549 | mix all of these forms, see the Info node `(elisp)Defining Minor Modes' |
| 8554 | details. The :predicate key causes the macro to create a user option | 8550 | for details. The :predicate key causes the macro to create a user option |
| 8555 | named the same as MODE, but ending with \"-modes\" instead of \"-mode\". | 8551 | named the same as MODE, but ending with \"-modes\" instead of \"-mode\". |
| 8556 | That user option can then be used to customize in which modes this | 8552 | That user option can then be used to customize in which modes this |
| 8557 | globalized minor mode will be switched on. | 8553 | globalized minor mode will be switched on. |
| @@ -8929,7 +8925,7 @@ A second call of this function without changing point inserts the next match. | |||
| 8929 | A call with prefix PREFIX reads the symbol to insert from the minibuffer with | 8925 | A call with prefix PREFIX reads the symbol to insert from the minibuffer with |
| 8930 | completion. | 8926 | completion. |
| 8931 | 8927 | ||
| 8932 | (fn PREFIX)" t) | 8928 | (fn PREFIX)" '("P")) |
| 8933 | (autoload 'ebrowse-tags-loop-continue "ebrowse" "\ | 8929 | (autoload 'ebrowse-tags-loop-continue "ebrowse" "\ |
| 8934 | Repeat last operation on files in tree. | 8930 | Repeat last operation on files in tree. |
| 8935 | FIRST-TIME non-nil means this is not a repetition, but the first time. | 8931 | FIRST-TIME non-nil means this is not a repetition, but the first time. |
| @@ -9851,7 +9847,7 @@ Describe CTR if it is a class constructor. | |||
| 9851 | 9847 | ||
| 9852 | ;;; Generated autoloads from emacs-lisp/eldoc.el | 9848 | ;;; Generated autoloads from emacs-lisp/eldoc.el |
| 9853 | 9849 | ||
| 9854 | (push '(eldoc 1 15 0) package--builtin-versions) | 9850 | (push '(eldoc 1 16 0) package--builtin-versions) |
| 9855 | 9851 | ||
| 9856 | 9852 | ||
| 9857 | ;;; Generated autoloads from elec-pair.el | 9853 | ;;; Generated autoloads from elec-pair.el |
| @@ -9951,32 +9947,6 @@ mode hooks. | |||
| 9951 | (register-definition-prefixes "elide-head" '("elide-head-")) | 9947 | (register-definition-prefixes "elide-head" '("elide-head-")) |
| 9952 | 9948 | ||
| 9953 | 9949 | ||
| 9954 | ;;; Generated autoloads from emacs-lisp/elint.el | ||
| 9955 | |||
| 9956 | (autoload 'elint-file "elint" "\ | ||
| 9957 | Lint the file FILE. | ||
| 9958 | |||
| 9959 | (fn FILE)" t) | ||
| 9960 | (autoload 'elint-directory "elint" "\ | ||
| 9961 | Lint all the .el files in DIRECTORY. | ||
| 9962 | A complicated directory may require a lot of memory. | ||
| 9963 | |||
| 9964 | (fn DIRECTORY)" t) | ||
| 9965 | (autoload 'elint-current-buffer "elint" "\ | ||
| 9966 | Lint the current buffer. | ||
| 9967 | If necessary, this first calls `elint-initialize'." t) | ||
| 9968 | (autoload 'elint-defun "elint" "\ | ||
| 9969 | Lint the function at point. | ||
| 9970 | If necessary, this first calls `elint-initialize'." t) | ||
| 9971 | (autoload 'elint-initialize "elint" "\ | ||
| 9972 | Initialize elint. | ||
| 9973 | If elint is already initialized, this does nothing, unless | ||
| 9974 | optional prefix argument REINIT is non-nil. | ||
| 9975 | |||
| 9976 | (fn &optional REINIT)" t) | ||
| 9977 | (register-definition-prefixes "elint" '("elint-")) | ||
| 9978 | |||
| 9979 | |||
| 9980 | ;;; Generated autoloads from progmodes/elixir-ts-mode.el | 9950 | ;;; Generated autoloads from progmodes/elixir-ts-mode.el |
| 9981 | 9951 | ||
| 9982 | (autoload 'elixir-ts-mode "elixir-ts-mode" "\ | 9952 | (autoload 'elixir-ts-mode "elixir-ts-mode" "\ |
| @@ -10721,7 +10691,7 @@ ERC assigns SERVER and FULL-NAME the associated keyword values | |||
| 10721 | and defers to `erc-compute-port', `erc-compute-user', and | 10691 | and defers to `erc-compute-port', `erc-compute-user', and |
| 10722 | `erc-compute-nick' for those respective parameters. | 10692 | `erc-compute-nick' for those respective parameters. |
| 10723 | 10693 | ||
| 10724 | (fn &key SERVER PORT NICK USER PASSWORD FULL-NAME ID)" t) | 10694 | (fn &key SERVER PORT NICK USER PASSWORD FULL-NAME ID)" '((let ((erc--display-context `((erc-interactive-display . erc) ,@erc--display-context))) (erc-select-read-args)))) |
| 10725 | (defalias 'erc-select #'erc) | 10695 | (defalias 'erc-select #'erc) |
| 10726 | (autoload 'erc-tls "erc" "\ | 10696 | (autoload 'erc-tls "erc" "\ |
| 10727 | Connect to an IRC server over a TLS-encrypted connection. | 10697 | Connect to an IRC server over a TLS-encrypted connection. |
| @@ -10744,7 +10714,7 @@ See the alternative entry-point command `erc' as well as Info | |||
| 10744 | node `(erc) Connecting' for a fuller description of the various | 10714 | node `(erc) Connecting' for a fuller description of the various |
| 10745 | parameters, like ID. | 10715 | parameters, like ID. |
| 10746 | 10716 | ||
| 10747 | (fn &key SERVER PORT NICK USER PASSWORD FULL-NAME CLIENT-CERTIFICATE ID)" t) | 10717 | (fn &key SERVER PORT NICK USER PASSWORD FULL-NAME CLIENT-CERTIFICATE ID)" '((let ((erc-default-port erc-default-port-tls) (erc--display-context `((erc-interactive-display . erc-tls) ,@erc--display-context))) (erc-select-read-args)))) |
| 10748 | (autoload 'erc-handle-irc-url "erc" "\ | 10718 | (autoload 'erc-handle-irc-url "erc" "\ |
| 10749 | Use ERC to IRC on HOST:PORT in CHANNEL. | 10719 | Use ERC to IRC on HOST:PORT in CHANNEL. |
| 10750 | If ERC is already connected to HOST:PORT, simply /join CHANNEL. | 10720 | If ERC is already connected to HOST:PORT, simply /join CHANNEL. |
| @@ -10976,9 +10946,7 @@ it has to be wrapped in `(eval (quote ...))'. | |||
| 10976 | If NAME is already defined as a test and Emacs is running | 10946 | If NAME is already defined as a test and Emacs is running |
| 10977 | in batch mode, an error is signaled. | 10947 | in batch mode, an error is signaled. |
| 10978 | 10948 | ||
| 10979 | (fn NAME () [DOCSTRING] [:expected-result RESULT-TYPE] [:tags \\='(TAG...)] BODY...)" nil t) | 10949 | (fn NAME () [DOCSTRING] [:expected-result RESULT-TYPE] [:tags \\='(TAG...)] BODY...)" nil 'macro) |
| 10980 | (function-put 'ert-deftest 'doc-string-elt 3) | ||
| 10981 | (function-put 'ert-deftest 'lisp-indent-function 2) | ||
| 10982 | (autoload 'ert-run-tests-batch "ert" "\ | 10950 | (autoload 'ert-run-tests-batch "ert" "\ |
| 10983 | Run the tests specified by SELECTOR, printing results to the terminal. | 10951 | Run the tests specified by SELECTOR, printing results to the terminal. |
| 10984 | 10952 | ||
| @@ -12830,6 +12798,8 @@ value is the default binding of the variable. | |||
| 12830 | The connection-local value of `path-separator'.") | 12798 | The connection-local value of `path-separator'.") |
| 12831 | (autoload 'null-device "files-x" "\ | 12799 | (autoload 'null-device "files-x" "\ |
| 12832 | The connection-local value of `null-device'.") | 12800 | The connection-local value of `null-device'.") |
| 12801 | (autoload 'exec-suffixes "files-x" "\ | ||
| 12802 | The connection-local value of `exec-suffixes'.") | ||
| 12833 | (register-definition-prefixes "files-x" '("connection-local-" "dir-locals-to-string" "modify-" "read-")) | 12803 | (register-definition-prefixes "files-x" '("connection-local-" "dir-locals-to-string" "modify-" "read-")) |
| 12834 | 12804 | ||
| 12835 | 12805 | ||
| @@ -13399,8 +13369,6 @@ evaluate the variable `flymake-mode'. | |||
| 13399 | The mode's hook is called both when the mode is enabled and when it is | 13369 | The mode's hook is called both when the mode is enabled and when it is |
| 13400 | disabled. | 13370 | disabled. |
| 13401 | 13371 | ||
| 13402 | \\{flymake-mode-map} | ||
| 13403 | |||
| 13404 | (fn &optional ARG)" t) | 13372 | (fn &optional ARG)" t) |
| 13405 | (autoload 'flymake-mode-on "flymake" "\ | 13373 | (autoload 'flymake-mode-on "flymake" "\ |
| 13406 | Turn Flymake mode on.") | 13374 | Turn Flymake mode on.") |
| @@ -15232,7 +15200,10 @@ either customize it (see the info node `Easy Customization') | |||
| 15232 | or call the function `global-goto-address-mode'.") | 15200 | or call the function `global-goto-address-mode'.") |
| 15233 | (custom-autoload 'global-goto-address-mode "goto-addr" nil) | 15201 | (custom-autoload 'global-goto-address-mode "goto-addr" nil) |
| 15234 | (autoload 'global-goto-address-mode "goto-addr" "\ | 15202 | (autoload 'global-goto-address-mode "goto-addr" "\ |
| 15235 | Toggle Goto-Address mode in all buffers. | 15203 | Toggle Goto-Address mode in many buffers. |
| 15204 | Specifically, Goto-Address mode is enabled in all buffers where | ||
| 15205 | `goto-addr-mode--turn-on' would do it. | ||
| 15206 | |||
| 15236 | With prefix ARG, enable Global Goto-Address mode if ARG is positive; | 15207 | With prefix ARG, enable Global Goto-Address mode if ARG is positive; |
| 15237 | otherwise, disable it. | 15208 | otherwise, disable it. |
| 15238 | 15209 | ||
| @@ -15240,9 +15211,6 @@ If called from Lisp, toggle the mode if ARG is `toggle'. | |||
| 15240 | Enable the mode if ARG is nil, omitted, or is a positive number. | 15211 | Enable the mode if ARG is nil, omitted, or is a positive number. |
| 15241 | Disable the mode if ARG is a negative number. | 15212 | Disable the mode if ARG is a negative number. |
| 15242 | 15213 | ||
| 15243 | Goto-Address mode is enabled in all buffers where | ||
| 15244 | `goto-addr-mode--turn-on' would do it. | ||
| 15245 | |||
| 15246 | See `goto-address-mode' for more information on Goto-Address mode. | 15214 | See `goto-address-mode' for more information on Goto-Address mode. |
| 15247 | 15215 | ||
| 15248 | (fn &optional ARG)" t) | 15216 | (fn &optional ARG)" t) |
| @@ -16433,7 +16401,10 @@ either customize it (see the info node `Easy Customization') | |||
| 16433 | or call the function `global-hi-lock-mode'.") | 16401 | or call the function `global-hi-lock-mode'.") |
| 16434 | (custom-autoload 'global-hi-lock-mode "hi-lock" nil) | 16402 | (custom-autoload 'global-hi-lock-mode "hi-lock" nil) |
| 16435 | (autoload 'global-hi-lock-mode "hi-lock" "\ | 16403 | (autoload 'global-hi-lock-mode "hi-lock" "\ |
| 16436 | Toggle Hi-Lock mode in all buffers. | 16404 | Toggle Hi-Lock mode in many buffers. |
| 16405 | Specifically, Hi-Lock mode is enabled in all buffers where | ||
| 16406 | `turn-on-hi-lock-if-enabled' would do it. | ||
| 16407 | |||
| 16437 | With prefix ARG, enable Global Hi-Lock mode if ARG is positive; | 16408 | With prefix ARG, enable Global Hi-Lock mode if ARG is positive; |
| 16438 | otherwise, disable it. | 16409 | otherwise, disable it. |
| 16439 | 16410 | ||
| @@ -16441,9 +16412,6 @@ If called from Lisp, toggle the mode if ARG is `toggle'. | |||
| 16441 | Enable the mode if ARG is nil, omitted, or is a positive number. | 16412 | Enable the mode if ARG is nil, omitted, or is a positive number. |
| 16442 | Disable the mode if ARG is a negative number. | 16413 | Disable the mode if ARG is a negative number. |
| 16443 | 16414 | ||
| 16444 | Hi-Lock mode is enabled in all buffers where | ||
| 16445 | `turn-on-hi-lock-if-enabled' would do it. | ||
| 16446 | |||
| 16447 | See `hi-lock-mode' for more information on Hi-Lock mode. | 16415 | See `hi-lock-mode' for more information on Hi-Lock mode. |
| 16448 | 16416 | ||
| 16449 | (fn &optional ARG)" t) | 16417 | (fn &optional ARG)" t) |
| @@ -16812,7 +16780,10 @@ either customize it (see the info node `Easy Customization') | |||
| 16812 | or call the function `global-highlight-changes-mode'.") | 16780 | or call the function `global-highlight-changes-mode'.") |
| 16813 | (custom-autoload 'global-highlight-changes-mode "hilit-chg" nil) | 16781 | (custom-autoload 'global-highlight-changes-mode "hilit-chg" nil) |
| 16814 | (autoload 'global-highlight-changes-mode "hilit-chg" "\ | 16782 | (autoload 'global-highlight-changes-mode "hilit-chg" "\ |
| 16815 | Toggle Highlight-Changes mode in all buffers. | 16783 | Toggle Highlight-Changes mode in many buffers. |
| 16784 | Specifically, Highlight-Changes mode is enabled in all buffers where | ||
| 16785 | `highlight-changes-mode-turn-on' would do it. | ||
| 16786 | |||
| 16816 | With prefix ARG, enable Global Highlight-Changes mode if ARG is | 16787 | With prefix ARG, enable Global Highlight-Changes mode if ARG is |
| 16817 | positive; otherwise, disable it. | 16788 | positive; otherwise, disable it. |
| 16818 | 16789 | ||
| @@ -16820,9 +16791,6 @@ If called from Lisp, toggle the mode if ARG is `toggle'. | |||
| 16820 | Enable the mode if ARG is nil, omitted, or is a positive number. | 16791 | Enable the mode if ARG is nil, omitted, or is a positive number. |
| 16821 | Disable the mode if ARG is a negative number. | 16792 | Disable the mode if ARG is a negative number. |
| 16822 | 16793 | ||
| 16823 | Highlight-Changes mode is enabled in all buffers where | ||
| 16824 | `highlight-changes-mode-turn-on' would do it. | ||
| 16825 | |||
| 16826 | See `highlight-changes-mode' for more information on Highlight-Changes | 16794 | See `highlight-changes-mode' for more information on Highlight-Changes |
| 16827 | mode. | 16795 | mode. |
| 16828 | 16796 | ||
| @@ -17102,8 +17070,7 @@ inlined into the compiled format versions. This means that if you | |||
| 17102 | change its definition, you should explicitly call | 17070 | change its definition, you should explicitly call |
| 17103 | `ibuffer-recompile-formats'. | 17071 | `ibuffer-recompile-formats'. |
| 17104 | 17072 | ||
| 17105 | (fn SYMBOL (&key NAME INLINE PROPS SUMMARIZER) &rest BODY)" nil t) | 17073 | (fn SYMBOL (&key NAME INLINE PROPS SUMMARIZER) &rest BODY)" nil 'macro) |
| 17106 | (function-put 'define-ibuffer-column 'lisp-indent-function 'defun) | ||
| 17107 | (autoload 'define-ibuffer-sorter "ibuf-macs" "\ | 17074 | (autoload 'define-ibuffer-sorter "ibuf-macs" "\ |
| 17108 | Define a method of sorting named NAME. | 17075 | Define a method of sorting named NAME. |
| 17109 | DOCUMENTATION is the documentation of the function, which will be called | 17076 | DOCUMENTATION is the documentation of the function, which will be called |
| @@ -17114,9 +17081,7 @@ For sorting, the forms in BODY will be evaluated with `a' bound to one | |||
| 17114 | buffer object, and `b' bound to another. BODY should return a non-nil | 17081 | buffer object, and `b' bound to another. BODY should return a non-nil |
| 17115 | value if and only if `a' is \"less than\" `b'. | 17082 | value if and only if `a' is \"less than\" `b'. |
| 17116 | 17083 | ||
| 17117 | (fn NAME DOCUMENTATION (&key DESCRIPTION) &rest BODY)" nil t) | 17084 | (fn NAME DOCUMENTATION (&key DESCRIPTION) &rest BODY)" nil 'macro) |
| 17118 | (function-put 'define-ibuffer-sorter 'lisp-indent-function 1) | ||
| 17119 | (function-put 'define-ibuffer-sorter 'doc-string-elt 2) | ||
| 17120 | (autoload 'define-ibuffer-op "ibuf-macs" "\ | 17085 | (autoload 'define-ibuffer-op "ibuf-macs" "\ |
| 17121 | Generate a function which operates on a buffer. | 17086 | Generate a function which operates on a buffer. |
| 17122 | OP becomes the name of the function; if it doesn't begin with | 17087 | OP becomes the name of the function; if it doesn't begin with |
| @@ -17159,9 +17124,7 @@ BODY define the operation; they are forms to evaluate per each | |||
| 17159 | marked buffer. BODY is evaluated with `buf' bound to the | 17124 | marked buffer. BODY is evaluated with `buf' bound to the |
| 17160 | buffer object. | 17125 | buffer object. |
| 17161 | 17126 | ||
| 17162 | (fn OP ARGS DOCUMENTATION (&key INTERACTIVE MARK MODIFIER-P DANGEROUS OPSTRING ACTIVE-OPSTRING BEFORE AFTER COMPLEX) &rest BODY)" nil t) | 17127 | (fn OP ARGS DOCUMENTATION (&key INTERACTIVE MARK MODIFIER-P DANGEROUS OPSTRING ACTIVE-OPSTRING BEFORE AFTER COMPLEX) &rest BODY)" nil 'macro) |
| 17163 | (function-put 'define-ibuffer-op 'lisp-indent-function 2) | ||
| 17164 | (function-put 'define-ibuffer-op 'doc-string-elt 3) | ||
| 17165 | (autoload 'define-ibuffer-filter "ibuf-macs" "\ | 17128 | (autoload 'define-ibuffer-filter "ibuf-macs" "\ |
| 17166 | Define a filter named NAME. | 17129 | Define a filter named NAME. |
| 17167 | DOCUMENTATION is the documentation of the function. | 17130 | DOCUMENTATION is the documentation of the function. |
| @@ -17176,9 +17139,7 @@ not a particular buffer should be displayed or not. The forms in BODY | |||
| 17176 | will be evaluated with BUF bound to the buffer object, and QUALIFIER | 17139 | will be evaluated with BUF bound to the buffer object, and QUALIFIER |
| 17177 | bound to the current value of the filter. | 17140 | bound to the current value of the filter. |
| 17178 | 17141 | ||
| 17179 | (fn NAME DOCUMENTATION (&key READER DESCRIPTION) &rest BODY)" nil t) | 17142 | (fn NAME DOCUMENTATION (&key READER DESCRIPTION) &rest BODY)" nil 'macro) |
| 17180 | (function-put 'define-ibuffer-filter 'lisp-indent-function 2) | ||
| 17181 | (function-put 'define-ibuffer-filter 'doc-string-elt 2) | ||
| 17182 | (register-definition-prefixes "ibuf-macs" '("ibuffer-")) | 17143 | (register-definition-prefixes "ibuf-macs" '("ibuffer-")) |
| 17183 | 17144 | ||
| 17184 | 17145 | ||
| @@ -18088,8 +18049,9 @@ Toggle thumbnails in front of marked file names in the Dired buffer. | |||
| 18088 | If no file is marked, toggle display of thumbnail on the current file's line. | 18049 | If no file is marked, toggle display of thumbnail on the current file's line. |
| 18089 | ARG, if non-nil (interactively, the prefix argument), specifies the files | 18050 | ARG, if non-nil (interactively, the prefix argument), specifies the files |
| 18090 | whose thumbnail display to toggle instead of the marked files: if ARG is an | 18051 | whose thumbnail display to toggle instead of the marked files: if ARG is an |
| 18091 | integer, use the next ARG (or previous -ARG, if ARG<0) files; any other | 18052 | integer, use the next ARG (or previous -ARG, if ARG<0) files; if ARG is |
| 18092 | value of ARG means toggle thumbnail display of the current line's file. | 18053 | the symbol `marked', use only the marked files, if any; any other value of |
| 18054 | ARG means toggle thumbnail display of the current line's file. | ||
| 18093 | 18055 | ||
| 18094 | (fn &optional ARG)" '(dired-mode)) | 18056 | (fn &optional ARG)" '(dired-mode)) |
| 18095 | (autoload 'image-dired-jump-thumbnail-buffer "image-dired-dired" "\ | 18057 | (autoload 'image-dired-jump-thumbnail-buffer "image-dired-dired" "\ |
| @@ -20017,7 +19979,9 @@ keys and associated values are: | |||
| 20017 | files that are concerned by the current operation (using relative names); | 19979 | files that are concerned by the current operation (using relative names); |
| 20018 | `log-edit-diff-function' -- function taking no arguments that | 19980 | `log-edit-diff-function' -- function taking no arguments that |
| 20019 | displays a diff of the files concerned by the current operation. | 19981 | displays a diff of the files concerned by the current operation. |
| 20020 | `vc-log-fileset' -- the VC fileset to be committed (if any). | 19982 | `vc-log-fileset' -- list of files to be committed, if any |
| 19983 | (not a true VC fileset structure as returned by | ||
| 19984 | `vc-deduce-fileset', but only the second element). | ||
| 20021 | 19985 | ||
| 20022 | If BUFFER is non-nil, `log-edit' will switch to that buffer, use it | 19986 | If BUFFER is non-nil, `log-edit' will switch to that buffer, use it |
| 20023 | to edit the log message and go back to the current buffer when | 19987 | to edit the log message and go back to the current buffer when |
| @@ -27204,8 +27168,6 @@ evaluate the variable `rectangle-mark-mode'. | |||
| 27204 | The mode's hook is called both when the mode is enabled and when it is | 27168 | The mode's hook is called both when the mode is enabled and when it is |
| 27205 | disabled. | 27169 | disabled. |
| 27206 | 27170 | ||
| 27207 | \\{rectangle-mark-mode-map} | ||
| 27208 | |||
| 27209 | (fn &optional ARG)" t) | 27171 | (fn &optional ARG)" t) |
| 27210 | (register-definition-prefixes "rect" '("apply-on-rectangle" "clear-rectangle-line" "delete-" "extract-rectangle-" "killed-rectangle" "ope" "rectangle-" "spaces-string" "string-rectangle-")) | 27172 | (register-definition-prefixes "rect" '("apply-on-rectangle" "clear-rectangle-line" "delete-" "extract-rectangle-" "killed-rectangle" "ope" "rectangle-" "spaces-string" "string-rectangle-")) |
| 27211 | 27173 | ||
| @@ -29004,6 +28966,22 @@ disabled. | |||
| 29004 | (register-definition-prefixes "semantic/senator" '("semantic-up-reference" "senator-")) | 28966 | (register-definition-prefixes "semantic/senator" '("semantic-up-reference" "senator-")) |
| 29005 | 28967 | ||
| 29006 | 28968 | ||
| 28969 | ;;; Generated autoloads from send-to.el | ||
| 28970 | |||
| 28971 | (autoload 'send-to-supported-p "send-to" "\ | ||
| 28972 | Return non-nil for platforms where `send-to' is supported.") | ||
| 28973 | (autoload 'send-to "send-to" "\ | ||
| 28974 | Send file(s) or region text to (non-Emacs) applications or services. | ||
| 28975 | |||
| 28976 | Sending is handled by the first supported handler from `send-to-handlers'. | ||
| 28977 | |||
| 28978 | ITEMS list is also populated by the resolved handler, but can be | ||
| 28979 | explicitly overridden. | ||
| 28980 | |||
| 28981 | (fn &optional ITEMS)" t) | ||
| 28982 | (register-definition-prefixes "send-to" '("send-to-")) | ||
| 28983 | |||
| 28984 | |||
| 29007 | ;;; Generated autoloads from mail/sendmail.el | 28985 | ;;; Generated autoloads from mail/sendmail.el |
| 29008 | 28986 | ||
| 29009 | (defvar mail-from-style 'angles "\ | 28987 | (defvar mail-from-style 'angles "\ |
| @@ -31509,7 +31487,10 @@ either customize it (see the info node `Easy Customization') | |||
| 31509 | or call the function `global-subword-mode'.") | 31487 | or call the function `global-subword-mode'.") |
| 31510 | (custom-autoload 'global-subword-mode "subword" nil) | 31488 | (custom-autoload 'global-subword-mode "subword" nil) |
| 31511 | (autoload 'global-subword-mode "subword" "\ | 31489 | (autoload 'global-subword-mode "subword" "\ |
| 31512 | Toggle Subword mode in all buffers. | 31490 | Toggle Subword mode in many buffers. |
| 31491 | Specifically, Subword mode is enabled in all buffers where `(lambda | ||
| 31492 | nil (subword-mode 1))' would do it. | ||
| 31493 | |||
| 31513 | With prefix ARG, enable Global Subword mode if ARG is positive; | 31494 | With prefix ARG, enable Global Subword mode if ARG is positive; |
| 31514 | otherwise, disable it. | 31495 | otherwise, disable it. |
| 31515 | 31496 | ||
| @@ -31517,9 +31498,6 @@ If called from Lisp, toggle the mode if ARG is `toggle'. | |||
| 31517 | Enable the mode if ARG is nil, omitted, or is a positive number. | 31498 | Enable the mode if ARG is nil, omitted, or is a positive number. |
| 31518 | Disable the mode if ARG is a negative number. | 31499 | Disable the mode if ARG is a negative number. |
| 31519 | 31500 | ||
| 31520 | Subword mode is enabled in all buffers where `(lambda nil | ||
| 31521 | (subword-mode 1))' would do it. | ||
| 31522 | |||
| 31523 | See `subword-mode' for more information on Subword mode. | 31501 | See `subword-mode' for more information on Subword mode. |
| 31524 | 31502 | ||
| 31525 | (fn &optional ARG)" t) | 31503 | (fn &optional ARG)" t) |
| @@ -31558,7 +31536,10 @@ either customize it (see the info node `Easy Customization') | |||
| 31558 | or call the function `global-superword-mode'.") | 31536 | or call the function `global-superword-mode'.") |
| 31559 | (custom-autoload 'global-superword-mode "subword" nil) | 31537 | (custom-autoload 'global-superword-mode "subword" nil) |
| 31560 | (autoload 'global-superword-mode "subword" "\ | 31538 | (autoload 'global-superword-mode "subword" "\ |
| 31561 | Toggle Superword mode in all buffers. | 31539 | Toggle Superword mode in many buffers. |
| 31540 | Specifically, Superword mode is enabled in all buffers where `(lambda | ||
| 31541 | nil (superword-mode 1))' would do it. | ||
| 31542 | |||
| 31562 | With prefix ARG, enable Global Superword mode if ARG is positive; | 31543 | With prefix ARG, enable Global Superword mode if ARG is positive; |
| 31563 | otherwise, disable it. | 31544 | otherwise, disable it. |
| 31564 | 31545 | ||
| @@ -31566,9 +31547,6 @@ If called from Lisp, toggle the mode if ARG is `toggle'. | |||
| 31566 | Enable the mode if ARG is nil, omitted, or is a positive number. | 31547 | Enable the mode if ARG is nil, omitted, or is a positive number. |
| 31567 | Disable the mode if ARG is a negative number. | 31548 | Disable the mode if ARG is a negative number. |
| 31568 | 31549 | ||
| 31569 | Superword mode is enabled in all buffers where `(lambda nil | ||
| 31570 | (superword-mode 1))' would do it. | ||
| 31571 | |||
| 31572 | See `superword-mode' for more information on Superword mode. | 31550 | See `superword-mode' for more information on Superword mode. |
| 31573 | 31551 | ||
| 31574 | (fn &optional ARG)" t) | 31552 | (fn &optional ARG)" t) |
| @@ -31693,7 +31671,10 @@ either customize it (see the info node `Easy Customization') | |||
| 31693 | or call the function `global-tab-line-mode'.") | 31671 | or call the function `global-tab-line-mode'.") |
| 31694 | (custom-autoload 'global-tab-line-mode "tab-line" nil) | 31672 | (custom-autoload 'global-tab-line-mode "tab-line" nil) |
| 31695 | (autoload 'global-tab-line-mode "tab-line" "\ | 31673 | (autoload 'global-tab-line-mode "tab-line" "\ |
| 31696 | Toggle Tab-Line mode in all buffers. | 31674 | Toggle Tab-Line mode in many buffers. |
| 31675 | Specifically, Tab-Line mode is enabled in all buffers where | ||
| 31676 | `tab-line-mode--turn-on' would do it. | ||
| 31677 | |||
| 31697 | With prefix ARG, enable Global Tab-Line mode if ARG is positive; | 31678 | With prefix ARG, enable Global Tab-Line mode if ARG is positive; |
| 31698 | otherwise, disable it. | 31679 | otherwise, disable it. |
| 31699 | 31680 | ||
| @@ -31701,9 +31682,6 @@ If called from Lisp, toggle the mode if ARG is `toggle'. | |||
| 31701 | Enable the mode if ARG is nil, omitted, or is a positive number. | 31682 | Enable the mode if ARG is nil, omitted, or is a positive number. |
| 31702 | Disable the mode if ARG is a negative number. | 31683 | Disable the mode if ARG is a negative number. |
| 31703 | 31684 | ||
| 31704 | Tab-Line mode is enabled in all buffers where `tab-line-mode--turn-on' | ||
| 31705 | would do it. | ||
| 31706 | |||
| 31707 | See `tab-line-mode' for more information on Tab-Line mode. | 31685 | See `tab-line-mode' for more information on Tab-Line mode. |
| 31708 | 31686 | ||
| 31709 | (fn &optional ARG)" t) | 31687 | (fn &optional ARG)" t) |
| @@ -33980,7 +33958,7 @@ If the buffer runs `dired', the buffer is reverted." t) | |||
| 33980 | Visit the file or directory named on this line as the superuser. | 33958 | Visit the file or directory named on this line as the superuser. |
| 33981 | 33959 | ||
| 33982 | By default this is done using the \"sudo\" Tramp method. | 33960 | By default this is done using the \"sudo\" Tramp method. |
| 33983 | YOu can customize `tramp-file-name-with-method' to change this. | 33961 | You can customize `tramp-file-name-with-method' to change this. |
| 33984 | 33962 | ||
| 33985 | Interactively, with a prefix argument, prompt for a different method." t) | 33963 | Interactively, with a prefix argument, prompt for a different method." t) |
| 33986 | (register-definition-prefixes "tramp-cmds" '("tramp-" "with-tramp-file-name-with-method")) | 33964 | (register-definition-prefixes "tramp-cmds" '("tramp-" "with-tramp-file-name-with-method")) |
| @@ -34058,7 +34036,7 @@ Interactively, with a prefix argument, prompt for a different method." t) | |||
| 34058 | 34036 | ||
| 34059 | ;;; Generated autoloads from net/trampver.el | 34037 | ;;; Generated autoloads from net/trampver.el |
| 34060 | 34038 | ||
| 34061 | (push '(tramp 2 8 0) package--builtin-versions) | 34039 | (push '(tramp 2 8 1 -1) package--builtin-versions) |
| 34062 | (register-definition-prefixes "trampver" '("tramp-")) | 34040 | (register-definition-prefixes "trampver" '("tramp-")) |
| 34063 | 34041 | ||
| 34064 | 34042 | ||
| @@ -35627,6 +35605,7 @@ The merge base is a common ancestor between REV1 and REV2 revisions. | |||
| 35627 | (fn FILES REV1 REV2)" t) | 35605 | (fn FILES REV1 REV2)" t) |
| 35628 | (autoload 'vc-root-diff-incoming "vc" "\ | 35606 | (autoload 'vc-root-diff-incoming "vc" "\ |
| 35629 | Report diff of all changes that would be pulled from REMOTE-LOCATION. | 35607 | Report diff of all changes that would be pulled from REMOTE-LOCATION. |
| 35608 | When unspecified REMOTE-LOCATION is the place \\[vc-update] would pull from. | ||
| 35630 | When called interactively with a prefix argument, prompt for REMOTE-LOCATION. | 35609 | When called interactively with a prefix argument, prompt for REMOTE-LOCATION. |
| 35631 | In some version control systems REMOTE-LOCATION can be a remote branch name. | 35610 | In some version control systems REMOTE-LOCATION can be a remote branch name. |
| 35632 | 35611 | ||
| @@ -35636,6 +35615,7 @@ global binding. | |||
| 35636 | (fn &optional REMOTE-LOCATION)" t) | 35615 | (fn &optional REMOTE-LOCATION)" t) |
| 35637 | (autoload 'vc-root-diff-outgoing "vc" "\ | 35616 | (autoload 'vc-root-diff-outgoing "vc" "\ |
| 35638 | Report diff of all changes that would be pushed to REMOTE-LOCATION. | 35617 | Report diff of all changes that would be pushed to REMOTE-LOCATION. |
| 35618 | When unspecified REMOTE-LOCATION is the place \\[vc-push] would push to. | ||
| 35639 | When called interactively with a prefix argument, prompt for REMOTE-LOCATION. | 35619 | When called interactively with a prefix argument, prompt for REMOTE-LOCATION. |
| 35640 | In some version control systems REMOTE-LOCATION can be a remote branch name. | 35620 | In some version control systems REMOTE-LOCATION can be a remote branch name. |
| 35641 | 35621 | ||
| @@ -35752,12 +35732,12 @@ locked files at or below DIR (but if NAME is empty, locked files are | |||
| 35752 | allowed and simply skipped). | 35732 | allowed and simply skipped). |
| 35753 | If BRANCHP is non-nil (interactively, the prefix argument), switch to the | 35733 | If BRANCHP is non-nil (interactively, the prefix argument), switch to the |
| 35754 | branch and check out and update the files to their version on that branch. | 35734 | branch and check out and update the files to their version on that branch. |
| 35735 | In this case NAME may not be empty. | ||
| 35755 | This function runs the hook `vc-retrieve-tag-hook' when finished. | 35736 | This function runs the hook `vc-retrieve-tag-hook' when finished. |
| 35756 | 35737 | ||
| 35757 | (fn DIR NAME &optional BRANCHP)" t) | 35738 | (fn DIR NAME &optional BRANCHP)" t) |
| 35758 | (autoload 'vc-switch-branch "vc" "\ | 35739 | (autoload 'vc-switch-branch "vc" "\ |
| 35759 | Switch to the branch NAME in the directory DIR. | 35740 | Switch to the branch NAME in the directory DIR. |
| 35760 | If NAME is empty, it refers to the latest revision of the current branch. | ||
| 35761 | Interactively, prompt for DIR only for VCS that works at file level; | 35741 | Interactively, prompt for DIR only for VCS that works at file level; |
| 35762 | otherwise use the root directory of the current buffer's VC tree. | 35742 | otherwise use the root directory of the current buffer's VC tree. |
| 35763 | Interactively, prompt for the NAME of the branch. | 35743 | Interactively, prompt for the NAME of the branch. |
| @@ -35801,12 +35781,14 @@ The command prompts for the branch whose change log to show. | |||
| 35801 | (fn BRANCH)" t) | 35781 | (fn BRANCH)" t) |
| 35802 | (autoload 'vc-log-incoming "vc" "\ | 35782 | (autoload 'vc-log-incoming "vc" "\ |
| 35803 | Show log of changes that will be received with pull from REMOTE-LOCATION. | 35783 | Show log of changes that will be received with pull from REMOTE-LOCATION. |
| 35784 | When unspecified REMOTE-LOCATION is the place \\[vc-update] would pull from. | ||
| 35804 | When called interactively with a prefix argument, prompt for REMOTE-LOCATION. | 35785 | When called interactively with a prefix argument, prompt for REMOTE-LOCATION. |
| 35805 | In some version control systems REMOTE-LOCATION can be a remote branch name. | 35786 | In some version control systems REMOTE-LOCATION can be a remote branch name. |
| 35806 | 35787 | ||
| 35807 | (fn &optional REMOTE-LOCATION)" t) | 35788 | (fn &optional REMOTE-LOCATION)" t) |
| 35808 | (autoload 'vc-log-outgoing "vc" "\ | 35789 | (autoload 'vc-log-outgoing "vc" "\ |
| 35809 | Show log of changes that will be sent with a push operation to REMOTE-LOCATION. | 35790 | Show log of changes that will be sent with a push operation to REMOTE-LOCATION. |
| 35791 | When unspecified REMOTE-LOCATION is the place \\[vc-push] would push to. | ||
| 35810 | When called interactively with a prefix argument, prompt for REMOTE-LOCATION. | 35792 | When called interactively with a prefix argument, prompt for REMOTE-LOCATION. |
| 35811 | In some version control systems REMOTE-LOCATION can be a remote branch name. | 35793 | In some version control systems REMOTE-LOCATION can be a remote branch name. |
| 35812 | 35794 | ||
| @@ -35953,6 +35935,34 @@ When invoked interactively in a Log View buffer with | |||
| 35953 | marked revisions, use those. | 35935 | marked revisions, use those. |
| 35954 | 35936 | ||
| 35955 | (fn ADDRESSEE SUBJECT REVISIONS)" t) | 35937 | (fn ADDRESSEE SUBJECT REVISIONS)" t) |
| 35938 | (autoload 'vc-add-working-tree "vc" "\ | ||
| 35939 | Create working tree DIRECTORY with same backing repository as this tree. | ||
| 35940 | See Info node `(emacs)Other Working Trees' regarding VCS repositories | ||
| 35941 | with multiple working trees. | ||
| 35942 | |||
| 35943 | (fn BACKEND DIRECTORY)" t) | ||
| 35944 | (autoload 'vc-switch-working-tree "vc" "\ | ||
| 35945 | Switch to this file or directory's analogue in working tree DIRECTORY. | ||
| 35946 | This command switches to the file or directory which has the same path | ||
| 35947 | relative to DIRECTORY that this buffer's file or directory has relative | ||
| 35948 | to the root of this working tree. | ||
| 35949 | DIRECTORY names another working tree with the same backing repository as | ||
| 35950 | this tree; see Info node `(emacs)Other Working Trees' for general | ||
| 35951 | information regarding VCS repositories with multiple working trees. | ||
| 35952 | |||
| 35953 | (fn DIRECTORY)" t) | ||
| 35954 | (autoload 'vc-delete-working-tree "vc" "\ | ||
| 35955 | Delete working tree DIRECTORY with same backing repository as this tree. | ||
| 35956 | See Info node `(emacs)Other Working Trees' regarding VCS repositories | ||
| 35957 | with multiple working trees. | ||
| 35958 | |||
| 35959 | (fn BACKEND DIRECTORY)" t) | ||
| 35960 | (autoload 'vc-move-working-tree "vc" "\ | ||
| 35961 | Relocate a working tree from FROM to TO. | ||
| 35962 | See Info node `(emacs)Other Working Trees' regarding VCS repositories | ||
| 35963 | with multiple working trees. | ||
| 35964 | |||
| 35965 | (fn BACKEND FROM TO)" t) | ||
| 35956 | (register-definition-prefixes "vc" '("log-view-vc-prev-" "vc-" "with-vc-properties")) | 35966 | (register-definition-prefixes "vc" '("log-view-vc-prev-" "vc-" "with-vc-properties")) |
| 35957 | 35967 | ||
| 35958 | 35968 | ||
| @@ -37300,7 +37310,10 @@ either customize it (see the info node `Easy Customization') | |||
| 37300 | or call the function `global-visual-wrap-prefix-mode'.") | 37310 | or call the function `global-visual-wrap-prefix-mode'.") |
| 37301 | (custom-autoload 'global-visual-wrap-prefix-mode "visual-wrap" nil) | 37311 | (custom-autoload 'global-visual-wrap-prefix-mode "visual-wrap" nil) |
| 37302 | (autoload 'global-visual-wrap-prefix-mode "visual-wrap" "\ | 37312 | (autoload 'global-visual-wrap-prefix-mode "visual-wrap" "\ |
| 37303 | Toggle Visual-Wrap-Prefix mode in all buffers. | 37313 | Toggle Visual-Wrap-Prefix mode in many buffers. |
| 37314 | Specifically, Visual-Wrap-Prefix mode is enabled in all buffers where | ||
| 37315 | `visual-wrap-prefix-mode' would do it. | ||
| 37316 | |||
| 37304 | With prefix ARG, enable Global Visual-Wrap-Prefix mode if ARG is | 37317 | With prefix ARG, enable Global Visual-Wrap-Prefix mode if ARG is |
| 37305 | positive; otherwise, disable it. | 37318 | positive; otherwise, disable it. |
| 37306 | 37319 | ||
| @@ -37308,9 +37321,6 @@ If called from Lisp, toggle the mode if ARG is `toggle'. | |||
| 37308 | Enable the mode if ARG is nil, omitted, or is a positive number. | 37321 | Enable the mode if ARG is nil, omitted, or is a positive number. |
| 37309 | Disable the mode if ARG is a negative number. | 37322 | Disable the mode if ARG is a negative number. |
| 37310 | 37323 | ||
| 37311 | Visual-Wrap-Prefix mode is enabled in all buffers where | ||
| 37312 | `visual-wrap-prefix-mode' would do it. | ||
| 37313 | |||
| 37314 | See `visual-wrap-prefix-mode' for more information on | 37324 | See `visual-wrap-prefix-mode' for more information on |
| 37315 | Visual-Wrap-Prefix mode. | 37325 | Visual-Wrap-Prefix mode. |
| 37316 | 37326 | ||
| @@ -37757,7 +37767,10 @@ either customize it (see the info node `Easy Customization') | |||
| 37757 | or call the function `global-whitespace-mode'.") | 37767 | or call the function `global-whitespace-mode'.") |
| 37758 | (custom-autoload 'global-whitespace-mode "whitespace" nil) | 37768 | (custom-autoload 'global-whitespace-mode "whitespace" nil) |
| 37759 | (autoload 'global-whitespace-mode "whitespace" "\ | 37769 | (autoload 'global-whitespace-mode "whitespace" "\ |
| 37760 | Toggle Whitespace mode in all buffers. | 37770 | Toggle Whitespace mode in many buffers. |
| 37771 | Specifically, Whitespace mode is enabled in all buffers where | ||
| 37772 | `whitespace-turn-on-if-enabled' would do it. | ||
| 37773 | |||
| 37761 | With prefix ARG, enable Global Whitespace mode if ARG is positive; | 37774 | With prefix ARG, enable Global Whitespace mode if ARG is positive; |
| 37762 | otherwise, disable it. | 37775 | otherwise, disable it. |
| 37763 | 37776 | ||
| @@ -37765,9 +37778,6 @@ If called from Lisp, toggle the mode if ARG is `toggle'. | |||
| 37765 | Enable the mode if ARG is nil, omitted, or is a positive number. | 37778 | Enable the mode if ARG is nil, omitted, or is a positive number. |
| 37766 | Disable the mode if ARG is a negative number. | 37779 | Disable the mode if ARG is a negative number. |
| 37767 | 37780 | ||
| 37768 | Whitespace mode is enabled in all buffers where | ||
| 37769 | `whitespace-turn-on-if-enabled' would do it. | ||
| 37770 | |||
| 37771 | See `whitespace-mode' for more information on Whitespace mode. | 37781 | See `whitespace-mode' for more information on Whitespace mode. |
| 37772 | 37782 | ||
| 37773 | (fn &optional ARG)" t) | 37783 | (fn &optional ARG)" t) |
| @@ -38414,7 +38424,10 @@ either customize it (see the info node `Easy Customization') | |||
| 38414 | or call the function `global-window-tool-bar-mode'.") | 38424 | or call the function `global-window-tool-bar-mode'.") |
| 38415 | (custom-autoload 'global-window-tool-bar-mode "window-tool-bar" nil) | 38425 | (custom-autoload 'global-window-tool-bar-mode "window-tool-bar" nil) |
| 38416 | (autoload 'global-window-tool-bar-mode "window-tool-bar" "\ | 38426 | (autoload 'global-window-tool-bar-mode "window-tool-bar" "\ |
| 38417 | Toggle Window-Tool-Bar mode in all buffers. | 38427 | Toggle Window-Tool-Bar mode in many buffers. |
| 38428 | Specifically, Window-Tool-Bar mode is enabled in all buffers where | ||
| 38429 | `window-tool-bar--turn-on' would do it. | ||
| 38430 | |||
| 38418 | With prefix ARG, enable Global Window-Tool-Bar mode if ARG is | 38431 | With prefix ARG, enable Global Window-Tool-Bar mode if ARG is |
| 38419 | positive; otherwise, disable it. | 38432 | positive; otherwise, disable it. |
| 38420 | 38433 | ||
| @@ -38422,9 +38435,6 @@ If called from Lisp, toggle the mode if ARG is `toggle'. | |||
| 38422 | Enable the mode if ARG is nil, omitted, or is a positive number. | 38435 | Enable the mode if ARG is nil, omitted, or is a positive number. |
| 38423 | Disable the mode if ARG is a negative number. | 38436 | Disable the mode if ARG is a negative number. |
| 38424 | 38437 | ||
| 38425 | Window-Tool-Bar mode is enabled in all buffers where | ||
| 38426 | `window-tool-bar--turn-on' would do it. | ||
| 38427 | |||
| 38428 | See `window-tool-bar-mode' for more information on Window-Tool-Bar | 38438 | See `window-tool-bar-mode' for more information on Window-Tool-Bar |
| 38429 | mode. | 38439 | mode. |
| 38430 | 38440 | ||
| @@ -38643,7 +38653,10 @@ either customize it (see the info node `Easy Customization') | |||
| 38643 | or call the function `global-word-wrap-whitespace-mode'.") | 38653 | or call the function `global-word-wrap-whitespace-mode'.") |
| 38644 | (custom-autoload 'global-word-wrap-whitespace-mode "word-wrap-mode" nil) | 38654 | (custom-autoload 'global-word-wrap-whitespace-mode "word-wrap-mode" nil) |
| 38645 | (autoload 'global-word-wrap-whitespace-mode "word-wrap-mode" "\ | 38655 | (autoload 'global-word-wrap-whitespace-mode "word-wrap-mode" "\ |
| 38646 | Toggle Word-Wrap-Whitespace mode in all buffers. | 38656 | Toggle Word-Wrap-Whitespace mode in many buffers. |
| 38657 | Specifically, Word-Wrap-Whitespace mode is enabled in all buffers | ||
| 38658 | where `word-wrap-whitespace-mode' would do it. | ||
| 38659 | |||
| 38647 | With prefix ARG, enable Global Word-Wrap-Whitespace mode if ARG is | 38660 | With prefix ARG, enable Global Word-Wrap-Whitespace mode if ARG is |
| 38648 | positive; otherwise, disable it. | 38661 | positive; otherwise, disable it. |
| 38649 | 38662 | ||
| @@ -38651,9 +38664,6 @@ If called from Lisp, toggle the mode if ARG is `toggle'. | |||
| 38651 | Enable the mode if ARG is nil, omitted, or is a positive number. | 38664 | Enable the mode if ARG is nil, omitted, or is a positive number. |
| 38652 | Disable the mode if ARG is a negative number. | 38665 | Disable the mode if ARG is a negative number. |
| 38653 | 38666 | ||
| 38654 | Word-Wrap-Whitespace mode is enabled in all buffers where | ||
| 38655 | `word-wrap-whitespace-mode' would do it. | ||
| 38656 | |||
| 38657 | See `word-wrap-whitespace-mode' for more information on | 38667 | See `word-wrap-whitespace-mode' for more information on |
| 38658 | Word-Wrap-Whitespace mode. | 38668 | Word-Wrap-Whitespace mode. |
| 38659 | 38669 | ||
| @@ -38990,9 +39000,9 @@ run a specific program. The program must be a member of | |||
| 38990 | (provide 'loaddefs) | 39000 | (provide 'loaddefs) |
| 38991 | 39001 | ||
| 38992 | ;; Local Variables: | 39002 | ;; Local Variables: |
| 39003 | ;; no-byte-compile: t | ||
| 38993 | ;; version-control: never | 39004 | ;; version-control: never |
| 38994 | ;; no-update-autoloads: t | 39005 | ;; no-update-autoloads: t |
| 38995 | ;; no-byte-compile: t | ||
| 38996 | ;; no-native-compile: t | 39006 | ;; no-native-compile: t |
| 38997 | ;; coding: utf-8-emacs-unix | 39007 | ;; coding: utf-8-emacs-unix |
| 38998 | ;; End: | 39008 | ;; End: |
diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el index 340a3f28756..93a05412a04 100644 --- a/lisp/vc/vc-dir.el +++ b/lisp/vc/vc-dir.el | |||
| @@ -1415,7 +1415,7 @@ Throw an error if another update process is in progress." | |||
| 1415 | (vc-call-backend | 1415 | (vc-call-backend |
| 1416 | backend 'dir-status-files def-dir nil | 1416 | backend 'dir-status-files def-dir nil |
| 1417 | (lambda (entries &optional more-to-come) | 1417 | (lambda (entries &optional more-to-come) |
| 1418 | ;; ENTRIES is a list of (FILE VC_STATE EXTRA) items. | 1418 | ;; ENTRIES is a list of (FILE VC-STATE EXTRA) items. |
| 1419 | ;; If MORE-TO-COME is true, then more updates will come from | 1419 | ;; If MORE-TO-COME is true, then more updates will come from |
| 1420 | ;; the asynchronous process. | 1420 | ;; the asynchronous process. |
| 1421 | (with-current-buffer buffer | 1421 | (with-current-buffer buffer |
| @@ -1520,7 +1520,7 @@ not under version control, prompt for a directory." | |||
| 1520 | (interactive) | 1520 | (interactive) |
| 1521 | (let ((root-dir (vc-root-dir))) | 1521 | (let ((root-dir (vc-root-dir))) |
| 1522 | (if root-dir (vc-dir root-dir) | 1522 | (if root-dir (vc-dir root-dir) |
| 1523 | (call-interactively 'vc-dir)))) | 1523 | (call-interactively #'vc-dir)))) |
| 1524 | 1524 | ||
| 1525 | ;;;###autoload | 1525 | ;;;###autoload |
| 1526 | (defun vc-dir (dir &optional backend) | 1526 | (defun vc-dir (dir &optional backend) |
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 44af30b2eb0..680e74d8a6e 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el | |||
| @@ -1913,12 +1913,15 @@ This requires git 1.8.4 or later, for the \"-L\" option of \"git log\"." | |||
| 1913 | (declare-function vc-read-revision "vc" | 1913 | (declare-function vc-read-revision "vc" |
| 1914 | (prompt &optional files backend default initial-input)) | 1914 | (prompt &optional files backend default initial-input)) |
| 1915 | 1915 | ||
| 1916 | (defun vc-git--read-start-point (&optional dir) | ||
| 1917 | (let ((branch (car (vc-git-branches)))) | ||
| 1918 | (vc-read-revision (format-prompt "Start point" branch) | ||
| 1919 | (list (or dir (vc-git-root default-directory))) | ||
| 1920 | 'Git branch))) | ||
| 1921 | |||
| 1916 | (defun vc-git-create-tag (dir name branchp) | 1922 | (defun vc-git-create-tag (dir name branchp) |
| 1917 | (let ((default-directory dir) | 1923 | (let ((default-directory dir) |
| 1918 | (start-point (when branchp (vc-read-revision | 1924 | (start-point (and branchp (vc-git--read-start-point dir)))) |
| 1919 | (format-prompt "Start point" | ||
| 1920 | (car (vc-git-branches))) | ||
| 1921 | (list dir) 'Git (car (vc-git-branches)))))) | ||
| 1922 | (and (or (zerop (vc-git-command nil t nil "update-index" "--refresh")) | 1925 | (and (or (zerop (vc-git-command nil t nil "update-index" "--refresh")) |
| 1923 | (y-or-n-p "Modified files exist. Proceed? ") | 1926 | (y-or-n-p "Modified files exist. Proceed? ") |
| 1924 | (user-error (format "Can't create %s with modified files" | 1927 | (user-error (format "Can't create %s with modified files" |
| @@ -2340,7 +2343,7 @@ In other modes, call `vc-deduce-fileset' to determine files to stash." | |||
| 2340 | (vc-resynch-buffer (vc-git-root default-directory) t t)) | 2343 | (vc-resynch-buffer (vc-git-root default-directory) t t)) |
| 2341 | 2344 | ||
| 2342 | (defun vc-git-stash-list () | 2345 | (defun vc-git-stash-list () |
| 2343 | (when-let* ((out (vc-git--run-command-string nil "stash" "list"))) | 2346 | (and-let* ((out (vc-git--run-command-string nil "stash" "list"))) |
| 2344 | (split-string | 2347 | (split-string |
| 2345 | (replace-regexp-in-string | 2348 | (replace-regexp-in-string |
| 2346 | "^stash@" " " out) | 2349 | "^stash@" " " out) |
| @@ -2389,6 +2392,63 @@ In other modes, call `vc-deduce-fileset' to determine files to stash." | |||
| 2389 | (interactive "e") | 2392 | (interactive "e") |
| 2390 | (vc-dir-at-event e (popup-menu vc-git-stash-menu-map e))) | 2393 | (vc-dir-at-event e (popup-menu vc-git-stash-menu-map e))) |
| 2391 | 2394 | ||
| 2395 | (defun vc-git--worktrees () | ||
| 2396 | "Return an alist of alists regarding this repository's worktrees." | ||
| 2397 | (with-temp-buffer | ||
| 2398 | (vc-git-command nil 0 nil "worktree" "prune") | ||
| 2399 | (vc-git-command t 0 nil "worktree" "list" "--porcelain" "-z") | ||
| 2400 | (let (worktrees current-root current-rest) | ||
| 2401 | (goto-char (point-min)) | ||
| 2402 | (while | ||
| 2403 | (re-search-forward "\\=\\(\\([a-zA-Z]+\\)\\(?: \\([^\0]+\\)\\)?\\)?\0" | ||
| 2404 | nil t) | ||
| 2405 | (if (match-string 1) | ||
| 2406 | (let ((k (intern (match-string 2))) | ||
| 2407 | (v (or (match-string 3) t))) | ||
| 2408 | (cond ((and (not current-root) (eq k 'worktree)) | ||
| 2409 | (setq current-root (file-name-as-directory v))) | ||
| 2410 | ((not (eq k 'worktree)) | ||
| 2411 | (push (cons k v) current-rest)) | ||
| 2412 | (t | ||
| 2413 | (error "'git worktree' output parse error")))) | ||
| 2414 | (push (cons current-root current-rest) worktrees) | ||
| 2415 | (setq current-root nil current-rest nil))) | ||
| 2416 | (or worktrees | ||
| 2417 | (error "'git worktree' output parse error"))))) | ||
| 2418 | |||
| 2419 | (defun vc-git-known-other-working-trees () | ||
| 2420 | (cl-loop with root = (expand-file-name (vc-git-root default-directory)) | ||
| 2421 | for (worktree) in (vc-git--worktrees) | ||
| 2422 | unless (equal worktree root) | ||
| 2423 | collect (abbreviate-file-name worktree))) | ||
| 2424 | |||
| 2425 | (defun vc-git-add-working-tree (directory) | ||
| 2426 | (letrec ((dir (expand-file-name directory)) | ||
| 2427 | (vc-filter-command-function #'list) ; see `vc-read-revision' | ||
| 2428 | (revs (vc-git-revision-table nil)) | ||
| 2429 | (table (lazy-completion-table table (lambda () revs))) | ||
| 2430 | (branch (completing-read (format-prompt "New or existing branch" | ||
| 2431 | "latest revision, detached") | ||
| 2432 | table nil nil nil 'vc-revision-history)) | ||
| 2433 | (args (cond ((string-empty-p branch) | ||
| 2434 | (list "--detach" dir)) | ||
| 2435 | ((member branch revs) | ||
| 2436 | (list dir branch)) | ||
| 2437 | (t | ||
| 2438 | (list "-b" branch dir (vc-git--read-start-point)))))) | ||
| 2439 | (apply #'vc-git-command nil 0 nil "worktree" "add" args))) | ||
| 2440 | |||
| 2441 | (defun vc-git-delete-working-tree (directory) | ||
| 2442 | (vc-git-command nil 0 nil "worktree" "remove" "-f" | ||
| 2443 | (expand-file-name directory))) | ||
| 2444 | |||
| 2445 | (defun vc-git-move-working-tree (from to) | ||
| 2446 | ;; 'git worktree move' can't move the main worktree, but moving and | ||
| 2447 | ;; then repairing like this can. | ||
| 2448 | (rename-file from (directory-file-name to) 1) | ||
| 2449 | (let ((default-directory to)) | ||
| 2450 | (vc-git-command nil 0 nil "worktree" "repair"))) | ||
| 2451 | |||
| 2392 | 2452 | ||
| 2393 | ;;; Internal commands | 2453 | ;;; Internal commands |
| 2394 | 2454 | ||
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 4e9057db4f9..976c8183efe 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el | |||
| @@ -1217,7 +1217,7 @@ It is based on `log-edit-mode', and has Hg-specific extensions.") | |||
| 1217 | (defalias 'vc-hg-async-checkins #'always) | 1217 | (defalias 'vc-hg-async-checkins #'always) |
| 1218 | 1218 | ||
| 1219 | (defun vc-hg-checkin (files comment &optional _rev) | 1219 | (defun vc-hg-checkin (files comment &optional _rev) |
| 1220 | "Hg-specific version of `vc-backend-checkin'. | 1220 | "Hg-specific version of `vc-BACKEND-checkin'. |
| 1221 | REV is ignored." | 1221 | REV is ignored." |
| 1222 | (let ((args (nconc (list "commit" "-m") | 1222 | (let ((args (nconc (list "commit" "-m") |
| 1223 | (vc-hg--extract-headers comment)))) | 1223 | (vc-hg--extract-headers comment)))) |
| @@ -1681,6 +1681,57 @@ Intended for use via the `vc-hg--async-command' wrapper." | |||
| 1681 | (concat "paths." (or remote-name "default"))) | 1681 | (concat "paths." (or remote-name "default"))) |
| 1682 | (buffer-substring-no-properties (point-min) (1- (point-max)))))) | 1682 | (buffer-substring-no-properties (point-min) (1- (point-max)))))) |
| 1683 | 1683 | ||
| 1684 | (defun vc-hg-known-other-working-trees () | ||
| 1685 | ;; Mercurial doesn't maintain records of shared repositories. | ||
| 1686 | ;; The first repository knows nothing about shares created from it, | ||
| 1687 | ;; and each share only has a reference back to the first repository. | ||
| 1688 | ;; | ||
| 1689 | ;; Therefore, to support the VC API for other working trees, Emacs | ||
| 1690 | ;; needs to maintain records of its own about other working trees. | ||
| 1691 | ;; Rather than create something new our strategy is to rely on | ||
| 1692 | ;; project.el's knowledge of existing projects. | ||
| 1693 | ;; Note that this relies on code calling `vc-hg-add-working-tree' | ||
| 1694 | ;; registering the resultant working tree with project.el. | ||
| 1695 | (let* ((our-root (vc-hg-root default-directory)) | ||
| 1696 | (our-sp (expand-file-name ".hg/sharedpath" our-root)) | ||
| 1697 | our-store shares) | ||
| 1698 | (if (file-exists-p our-sp) | ||
| 1699 | (with-temp-buffer | ||
| 1700 | (insert-file-contents-literally our-sp) | ||
| 1701 | (setq our-store (string-trim (buffer-string))) | ||
| 1702 | (push (abbreviate-file-name (file-name-directory our-store)) | ||
| 1703 | shares)) | ||
| 1704 | (setq our-store (expand-file-name ".hg" our-root))) | ||
| 1705 | (dolist (root (project-known-project-roots)) | ||
| 1706 | (when-let* (((not (equal root our-root))) | ||
| 1707 | (sp (expand-file-name ".hg/sharedpath" root)) | ||
| 1708 | ((file-exists-p sp))) | ||
| 1709 | (with-temp-buffer | ||
| 1710 | (insert-file-contents-literally sp) | ||
| 1711 | (when (equal our-store (buffer-string)) | ||
| 1712 | (push root shares))))) | ||
| 1713 | shares)) | ||
| 1714 | |||
| 1715 | (defun vc-hg-add-working-tree (directory) | ||
| 1716 | (vc-hg-command nil 0 nil "share" | ||
| 1717 | (vc-hg-root default-directory) | ||
| 1718 | (expand-file-name directory))) | ||
| 1719 | |||
| 1720 | (defun vc-hg--shared-p (directory) | ||
| 1721 | (file-exists-p (expand-file-name ".hg/sharedpath" directory))) | ||
| 1722 | |||
| 1723 | (defun vc-hg-delete-working-tree (directory) | ||
| 1724 | (if (vc-hg--shared-p directory) | ||
| 1725 | (delete-directory directory t t) | ||
| 1726 | (user-error "\ | ||
| 1727 | Cannot delete first working tree because this would break other working trees"))) | ||
| 1728 | |||
| 1729 | (defun vc-hg-move-working-tree (from to) | ||
| 1730 | (if (vc-hg--shared-p from) | ||
| 1731 | (rename-file from (directory-file-name to) 1) | ||
| 1732 | (user-error "\ | ||
| 1733 | Cannot relocate first working tree because this would break other working trees"))) | ||
| 1734 | |||
| 1684 | (provide 'vc-hg) | 1735 | (provide 'vc-hg) |
| 1685 | 1736 | ||
| 1686 | ;;; vc-hg.el ends here | 1737 | ;;; vc-hg.el ends here |
diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el index f06736689aa..9fdc7fcf5a9 100644 --- a/lisp/vc/vc-hooks.el +++ b/lisp/vc/vc-hooks.el | |||
| @@ -965,7 +965,11 @@ In the latter case, VC mode is deactivated for this buffer." | |||
| 965 | "~" #'vc-revision-other-window | 965 | "~" #'vc-revision-other-window |
| 966 | "R" #'vc-rename-file | 966 | "R" #'vc-rename-file |
| 967 | "x" #'vc-delete-file | 967 | "x" #'vc-delete-file |
| 968 | "!" #'vc-edit-next-command) | 968 | "!" #'vc-edit-next-command |
| 969 | "w c" #'vc-add-working-tree | ||
| 970 | "w w" #'vc-switch-working-tree | ||
| 971 | "w x" #'vc-delete-working-tree | ||
| 972 | "w R" #'vc-move-working-tree) | ||
| 969 | (fset 'vc-prefix-map vc-prefix-map) | 973 | (fset 'vc-prefix-map vc-prefix-map) |
| 970 | (define-key ctl-x-map "v" 'vc-prefix-map) | 974 | (define-key ctl-x-map "v" 'vc-prefix-map) |
| 971 | 975 | ||
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index c4471a55440..6cb03c60919 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el | |||
| @@ -207,6 +207,17 @@ | |||
| 207 | ;; The default implementation deals well with all states that | 207 | ;; The default implementation deals well with all states that |
| 208 | ;; `vc-state' can return. | 208 | ;; `vc-state' can return. |
| 209 | ;; | 209 | ;; |
| 210 | ;; - known-other-working-trees () | ||
| 211 | ;; | ||
| 212 | ;; Return a list of all other working trees known to use the same | ||
| 213 | ;; backing repository as this working tree. The members of the list | ||
| 214 | ;; are the abbreviated (with `abbreviate-file-name') absolute file | ||
| 215 | ;; names of the root directories of the other working trees. | ||
| 216 | ;; For some VCS, the known working trees will not be all the other | ||
| 217 | ;; working trees, because other working trees can share the same | ||
| 218 | ;; backing repository in a way that's transparent to the original | ||
| 219 | ;; working tree (Mercurial is like this). | ||
| 220 | ;; | ||
| 210 | ;; STATE-CHANGING FUNCTIONS | 221 | ;; STATE-CHANGING FUNCTIONS |
| 211 | ;; | 222 | ;; |
| 212 | ;; * create-repo () | 223 | ;; * create-repo () |
| @@ -342,6 +353,31 @@ | |||
| 342 | ;; - find-admin-dir (file) | 353 | ;; - find-admin-dir (file) |
| 343 | ;; | 354 | ;; |
| 344 | ;; Return the administrative directory of FILE. | 355 | ;; Return the administrative directory of FILE. |
| 356 | ;; | ||
| 357 | ;; - add-working-tree (directory) | ||
| 358 | ;; | ||
| 359 | ;; Create a new working tree at DIRECTORY that uses the same backing | ||
| 360 | ;; repository as this working tree. | ||
| 361 | ;; What gets checked out in DIRECTORY is left to the backend because | ||
| 362 | ;; while some VCS can check out the same branch in multiple working | ||
| 363 | ;; trees (e.g. Mercurial), others allow each branch to be checked out | ||
| 364 | ;; in only one working tree (e.g. Git). | ||
| 365 | ;; If a new branch should be created then the backend should handle | ||
| 366 | ;; prompting for this, including prompting for a branch or tag from | ||
| 367 | ;; which to start/fork the new branch, like `vc-create-branch'. | ||
| 368 | ;; | ||
| 369 | ;; - delete-working-tree (directory) | ||
| 370 | ;; | ||
| 371 | ;; Remove the working tree, assumed to be one that uses the same | ||
| 372 | ;; backing repository as this working tree, at DIRECTORY. | ||
| 373 | ;; This removal should be unconditional with respect to the state of | ||
| 374 | ;; the working tree: the caller is responsible for checking for | ||
| 375 | ;; uncommitted work in DIRECTORY. | ||
| 376 | ;; | ||
| 377 | ;; - move-working-tree (from to) | ||
| 378 | ;; | ||
| 379 | ;; Relocate the working tree, assumed to be one that uses the same | ||
| 380 | ;; backing repository as this working tree, at FROM to TO. | ||
| 345 | 381 | ||
| 346 | ;; HISTORY FUNCTIONS | 382 | ;; HISTORY FUNCTIONS |
| 347 | ;; | 383 | ;; |
| @@ -4178,24 +4214,24 @@ to provide the `find-revision' operation instead." | |||
| 4178 | t) | 4214 | t) |
| 4179 | 4215 | ||
| 4180 | (defun vc-default-retrieve-tag (backend dir name update) | 4216 | (defun vc-default-retrieve-tag (backend dir name update) |
| 4181 | (if (string= name "") | 4217 | (if (string-empty-p name) |
| 4182 | (progn | 4218 | (vc-file-tree-walk dir |
| 4183 | (vc-file-tree-walk | 4219 | (lambda (f) |
| 4184 | dir | 4220 | (and (vc-up-to-date-p f) |
| 4185 | (lambda (f) (and | 4221 | (vc-error-occurred |
| 4186 | (vc-up-to-date-p f) | 4222 | (vc-call-backend backend 'checkout f nil "") |
| 4187 | (vc-error-occurred | 4223 | (when update |
| 4188 | (vc-call-backend backend 'checkout f nil "") | 4224 | (vc-resynch-buffer f t t)))))) |
| 4189 | (when update (vc-resynch-buffer f t t))))))) | ||
| 4190 | (let ((result (vc-tag-precondition dir))) | 4225 | (let ((result (vc-tag-precondition dir))) |
| 4191 | (if (stringp result) | 4226 | (if (stringp result) |
| 4192 | (error "File %s is locked" result) | 4227 | (error "File %s is locked" result) |
| 4193 | (setq update (and (eq result 'visited) update)) | 4228 | (setq update (and (eq result 'visited) update)) |
| 4194 | (vc-file-tree-walk | 4229 | (vc-file-tree-walk dir |
| 4195 | dir | 4230 | (lambda (f) |
| 4196 | (lambda (f) (vc-error-occurred | 4231 | (vc-error-occurred |
| 4197 | (vc-call-backend backend 'checkout f nil name) | 4232 | (vc-call-backend backend 'checkout f nil name) |
| 4198 | (when update (vc-resynch-buffer f t t))))))))) | 4233 | (when update |
| 4234 | (vc-resynch-buffer f t t))))))))) | ||
| 4199 | 4235 | ||
| 4200 | (defun vc-default-revert (backend file contents-done) | 4236 | (defun vc-default-revert (backend file contents-done) |
| 4201 | (unless contents-done | 4237 | (unless contents-done |
| @@ -4301,6 +4337,136 @@ It returns the last revision that changed LINE number in FILE." | |||
| 4301 | (let ((rev (vc-call annotate-extract-revision-at-line file))) | 4337 | (let ((rev (vc-call annotate-extract-revision-at-line file))) |
| 4302 | (if (consp rev) (car rev) rev)))) | 4338 | (if (consp rev) (car rev) rev)))) |
| 4303 | 4339 | ||
| 4340 | (defun vc-dir-status-files (directory &optional files backend) | ||
| 4341 | "Synchronously run `dir-status-files' VC backend function for DIRECTORY. | ||
| 4342 | FILES is passed to the VC backend function. | ||
| 4343 | BACKEND is defaulted by calling `vc-responsible-backend' on DIRECTORY." | ||
| 4344 | ;; The `dir-status-files' API was designed for asynchronous use to | ||
| 4345 | ;; populate *vc-dir* buffers; see `vc-dir-refresh'. | ||
| 4346 | ;; This function provides Lisp programs with synchronous access to the | ||
| 4347 | ;; same information without touching the user's *vc-dir* buffers and | ||
| 4348 | ;; without having to add a new VC backend function. | ||
| 4349 | ;; It is considerably faster than using `vc-file-tree-walk' | ||
| 4350 | ;; (like `vc-tag-precondition' does). | ||
| 4351 | ;; This function is in this file despite its `vc-dir-' prefix to avoid | ||
| 4352 | ;; having to load `vc-dir' just to get access to this simple wrapper. | ||
| 4353 | (let ((morep t) results) | ||
| 4354 | (with-temp-buffer | ||
| 4355 | (setq default-directory directory) | ||
| 4356 | (vc-call-backend (or backend (vc-responsible-backend directory)) | ||
| 4357 | 'dir-status-files directory files | ||
| 4358 | (lambda (entries &optional more-to-come) | ||
| 4359 | (let (entry) | ||
| 4360 | (while (setq entry (pop entries)) | ||
| 4361 | ;; We shouldn't actually get any | ||
| 4362 | ;; `up-to-date' or `ignored' entries back, | ||
| 4363 | ;; but just in case, pass through a filter. | ||
| 4364 | (unless (memq (cadr entry) | ||
| 4365 | '(up-to-date ignored)) | ||
| 4366 | (push entry results)))) | ||
| 4367 | (setq morep more-to-come))) | ||
| 4368 | (while morep (accept-process-output))) | ||
| 4369 | (nreverse results))) | ||
| 4370 | |||
| 4371 | ;;;###autoload | ||
| 4372 | (defun vc-add-working-tree (backend directory) | ||
| 4373 | "Create working tree DIRECTORY with same backing repository as this tree. | ||
| 4374 | See Info node `(emacs)Other Working Trees' regarding VCS repositories | ||
| 4375 | with multiple working trees." | ||
| 4376 | (interactive | ||
| 4377 | (list | ||
| 4378 | (vc-responsible-backend default-directory) | ||
| 4379 | (read-directory-name "Location for new working tree: " | ||
| 4380 | (file-name-parent-directory | ||
| 4381 | (or (vc-root-dir) | ||
| 4382 | (error "File is not under version control")))))) | ||
| 4383 | (vc-call-backend backend 'add-working-tree directory) | ||
| 4384 | |||
| 4385 | ;; `vc-switch-working-tree' relies on project.el registration so try | ||
| 4386 | ;; to ensure that both the old and new working trees are registered. | ||
| 4387 | ;; `project-current' should not return nil in either case, but don't | ||
| 4388 | ;; signal an error if it does. | ||
| 4389 | (when-let* ((p (project-current))) | ||
| 4390 | (project-remember-project p)) | ||
| 4391 | (when-let* ((p (project-current nil directory))) | ||
| 4392 | (project-remember-project p)) | ||
| 4393 | |||
| 4394 | (vc-dir directory backend)) | ||
| 4395 | |||
| 4396 | (defvar project-current-directory-override) | ||
| 4397 | |||
| 4398 | ;;;###autoload | ||
| 4399 | (defun vc-switch-working-tree (directory) | ||
| 4400 | "Switch to this file's analogue in working tree DIRECTORY. | ||
| 4401 | This command switches to the file which has the same path | ||
| 4402 | relative to DIRECTORY that this buffer's file has relative | ||
| 4403 | to the root of this working tree. | ||
| 4404 | DIRECTORY names another working tree with the same backing repository as | ||
| 4405 | this tree; see Info node `(emacs)Other Working Trees' for general | ||
| 4406 | information regarding VCS repositories with multiple working trees." | ||
| 4407 | ;; FIXME: Switch between directory analogues, too, in Dired buffers. | ||
| 4408 | (interactive | ||
| 4409 | (list | ||
| 4410 | ;; FIXME: This should respect `project-prompter'. See bug#79024. | ||
| 4411 | (completing-read "Other working tree to visit: " | ||
| 4412 | (vc-call-backend (vc-responsible-backend default-directory) | ||
| 4413 | 'known-other-working-trees) | ||
| 4414 | nil t))) | ||
| 4415 | (let ((project-current-directory-override directory)) | ||
| 4416 | (project-find-matching-file))) | ||
| 4417 | |||
| 4418 | ;;;###autoload | ||
| 4419 | (defun vc-delete-working-tree (backend directory) | ||
| 4420 | "Delete working tree DIRECTORY with same backing repository as this tree. | ||
| 4421 | See Info node `(emacs)Other Working Trees' regarding VCS repositories | ||
| 4422 | with multiple working trees." | ||
| 4423 | (interactive | ||
| 4424 | (let ((backend (vc-responsible-backend default-directory))) | ||
| 4425 | (list backend | ||
| 4426 | ;; FIXME: This should respect `project-prompter'. See bug#79024. | ||
| 4427 | (completing-read "Delete working tree: " | ||
| 4428 | (vc-call-backend backend 'known-other-working-trees) | ||
| 4429 | nil t)))) | ||
| 4430 | ;; We could consider not prompting here, thus always failing when | ||
| 4431 | ;; there is uncommitted work, and requiring the user to review and | ||
| 4432 | ;; revert the uncommitted changes before invoking this command again. | ||
| 4433 | ;; But other working trees are often created as throwaways to quickly | ||
| 4434 | ;; test some changes, so it is more useful to offer to recursively | ||
| 4435 | ;; delete them on the user's behalf. | ||
| 4436 | (when (and (vc-dir-status-files directory nil backend) | ||
| 4437 | (not (yes-or-no-p (format "\ | ||
| 4438 | %s contains uncommitted work. Continue to recursively delete it?" directory)))) | ||
| 4439 | (user-error "Aborted due to uncommitted work in %s" directory)) | ||
| 4440 | |||
| 4441 | (project-forget-project directory) | ||
| 4442 | (vc-call-backend backend 'delete-working-tree directory)) | ||
| 4443 | |||
| 4444 | (autoload 'dired-rename-subdir "dired-aux") | ||
| 4445 | ;;;###autoload | ||
| 4446 | (defun vc-move-working-tree (backend from to) | ||
| 4447 | "Relocate a working tree from FROM to TO. | ||
| 4448 | See Info node `(emacs)Other Working Trees' regarding VCS repositories | ||
| 4449 | with multiple working trees." | ||
| 4450 | (interactive | ||
| 4451 | (let ((backend (vc-responsible-backend default-directory))) | ||
| 4452 | (list backend | ||
| 4453 | ;; FIXME: This should respect `project-prompter'. See bug#79024. | ||
| 4454 | (completing-read "Relocate working tree: " | ||
| 4455 | (vc-call-backend backend 'known-other-working-trees) | ||
| 4456 | nil t) | ||
| 4457 | (read-directory-name "New location for working tree: " | ||
| 4458 | (file-name-parent-directory (vc-root-dir)))))) | ||
| 4459 | (let ((inhibit-message t)) | ||
| 4460 | (project-forget-project from)) | ||
| 4461 | (vc-call-backend backend 'move-working-tree from to) | ||
| 4462 | |||
| 4463 | ;; Update visited file names for buffers visiting files under FROM. | ||
| 4464 | ;; FIXME: Also update VC-Dir buffers. | ||
| 4465 | (dired-rename-subdir (expand-file-name from) (expand-file-name to)) | ||
| 4466 | |||
| 4467 | (when-let* ((p (project-current nil to))) | ||
| 4468 | (project-remember-project p))) | ||
| 4469 | |||
| 4304 | 4470 | ||
| 4305 | 4471 | ||
| 4306 | ;; These things should probably be generally available | 4472 | ;; These things should probably be generally available |
diff --git a/test/lisp/vc/vc-tests/vc-tests.el b/test/lisp/vc/vc-tests/vc-tests.el index 82f28cdad3a..9f570ca0dd1 100644 --- a/test/lisp/vc/vc-tests/vc-tests.el +++ b/test/lisp/vc/vc-tests/vc-tests.el | |||
| @@ -44,6 +44,7 @@ | |||
| 44 | ;; - latest-on-branch-p (file) | 44 | ;; - latest-on-branch-p (file) |
| 45 | ;; * checkout-model (files) DONE | 45 | ;; * checkout-model (files) DONE |
| 46 | ;; - mode-line-string (file) | 46 | ;; - mode-line-string (file) |
| 47 | ;; - other-working-trees () DONE | ||
| 47 | 48 | ||
| 48 | ;; STATE-CHANGING FUNCTIONS | 49 | ;; STATE-CHANGING FUNCTIONS |
| 49 | ;; | 50 | ;; |
| @@ -65,6 +66,9 @@ | |||
| 65 | ;; - modify-change-comment (files rev comment) | 66 | ;; - modify-change-comment (files rev comment) |
| 66 | ;; - mark-resolved (files) | 67 | ;; - mark-resolved (files) |
| 67 | ;; - find-admin-dir (file) | 68 | ;; - find-admin-dir (file) |
| 69 | ;; - add-working-tree (directory) DONE | ||
| 70 | ;; - delete-working-tree (directory) DONE | ||
| 71 | ;; - move-working-tree (from to) DONE | ||
| 68 | 72 | ||
| 69 | ;; HISTORY FUNCTIONS | 73 | ;; HISTORY FUNCTIONS |
| 70 | ;; | 74 | ;; |
| @@ -656,6 +660,103 @@ This checks also `vc-backend' and `vc-responsible-backend'." | |||
| 656 | (ignore-errors | 660 | (ignore-errors |
| 657 | (run-hooks 'vc-test--cleanup-hook)))))) | 661 | (run-hooks 'vc-test--cleanup-hook)))))) |
| 658 | 662 | ||
| 663 | (defun vc-test--other-working-trees (backend) | ||
| 664 | "Test other working trees actions." | ||
| 665 | (ert-with-temp-directory tempdir | ||
| 666 | (let ((vc-handled-backends `(,backend)) | ||
| 667 | (default-directory | ||
| 668 | (file-name-as-directory | ||
| 669 | (expand-file-name | ||
| 670 | (make-temp-name "vc-test") temporary-file-directory))) | ||
| 671 | (process-environment process-environment) | ||
| 672 | vc-test--cleanup-hook) | ||
| 673 | (unwind-protect | ||
| 674 | (progn | ||
| 675 | ;; Cleanup. | ||
| 676 | (add-hook | ||
| 677 | 'vc-test--cleanup-hook | ||
| 678 | (let ((dir default-directory)) | ||
| 679 | (lambda () | ||
| 680 | (delete-directory dir 'recursive) | ||
| 681 | (dolist (name '("first" "second" "first")) | ||
| 682 | (project-forget-project | ||
| 683 | (expand-file-name name default-directory)))))) | ||
| 684 | |||
| 685 | (let* ((first (file-name-as-directory | ||
| 686 | (expand-file-name "first" default-directory))) | ||
| 687 | (second (file-name-as-directory | ||
| 688 | (expand-file-name "second" default-directory))) | ||
| 689 | (third (file-name-as-directory | ||
| 690 | (expand-file-name "third" default-directory))) | ||
| 691 | (tmp-name (expand-file-name "foo" first))) | ||
| 692 | |||
| 693 | ;; Set up the first working tree. | ||
| 694 | (make-directory first t) | ||
| 695 | (let ((default-directory first)) | ||
| 696 | (vc-test--create-repo-function backend) | ||
| 697 | (write-region "foo" nil tmp-name nil 'nomessage) | ||
| 698 | (vc-register `(,backend (,(file-name-nondirectory tmp-name))))) | ||
| 699 | (with-current-buffer (find-file-noselect tmp-name) | ||
| 700 | (vc-checkin (list (file-name-nondirectory tmp-name)) backend) | ||
| 701 | (insert "Testing other working trees") | ||
| 702 | (let (vc-async-checkin) | ||
| 703 | (log-edit-done)) | ||
| 704 | |||
| 705 | ;; Set up the second working tree. | ||
| 706 | ;; For the backends which do additional prompting (as | ||
| 707 | ;; specified in the API for this backend function) we | ||
| 708 | ;; need to stub that out. | ||
| 709 | (cl-ecase backend | ||
| 710 | (Git (cl-letf (((symbol-function 'completing-read) | ||
| 711 | (lambda (&rest _ignore) ""))) | ||
| 712 | (vc-add-working-tree backend second))) | ||
| 713 | (Hg (vc-add-working-tree backend second)))) | ||
| 714 | |||
| 715 | ;; Test `known-other-working-trees'. | ||
| 716 | (with-current-buffer (find-file-noselect tmp-name) | ||
| 717 | (should | ||
| 718 | (equal (list second) | ||
| 719 | (vc-call-backend backend 'known-other-working-trees))) | ||
| 720 | (let ((default-directory second)) | ||
| 721 | (should | ||
| 722 | (equal (list first) | ||
| 723 | (vc-call-backend backend 'known-other-working-trees)))) | ||
| 724 | |||
| 725 | ;; Test `move-working-tree'. | ||
| 726 | (vc-move-working-tree backend second third) | ||
| 727 | (should | ||
| 728 | (equal (list third) | ||
| 729 | (vc-call-backend backend 'known-other-working-trees))) | ||
| 730 | (should-not (file-directory-p second)) | ||
| 731 | (should (file-directory-p third)) | ||
| 732 | ;; Moving the first working tree is only supported | ||
| 733 | ;; for some backends. | ||
| 734 | (cl-ecase backend | ||
| 735 | (Git | ||
| 736 | (let ((default-directory third)) | ||
| 737 | (vc-move-working-tree backend first second)) | ||
| 738 | (let ((default-directory third)) | ||
| 739 | (should | ||
| 740 | (equal (list second) | ||
| 741 | (vc-call-backend backend | ||
| 742 | 'known-other-working-trees)))) | ||
| 743 | (should-not (file-directory-p first)) | ||
| 744 | (should (file-directory-p second)) | ||
| 745 | (vc-move-working-tree backend second first)) | ||
| 746 | (Hg | ||
| 747 | (let ((default-directory third)) | ||
| 748 | (should-error (vc-move-working-tree backend | ||
| 749 | first second))))) | ||
| 750 | |||
| 751 | ;; Test `delete-working-tree'. | ||
| 752 | (let ((default-directory first)) | ||
| 753 | (vc-delete-working-tree backend third) | ||
| 754 | (should-not (file-directory-p third)))))) | ||
| 755 | |||
| 756 | ;; Save exit. | ||
| 757 | (ignore-errors | ||
| 758 | (run-hooks 'vc-test--cleanup-hook)))))) | ||
| 759 | |||
| 659 | ;; Create the test cases. | 760 | ;; Create the test cases. |
| 660 | 761 | ||
| 661 | (defun vc-test--rcs-enabled () | 762 | (defun vc-test--rcs-enabled () |
| @@ -794,7 +895,23 @@ This checks also `vc-backend' and `vc-responsible-backend'." | |||
| 794 | (eq system-type 'windows-nt) | 895 | (eq system-type 'windows-nt) |
| 795 | noninteractive)) | 896 | noninteractive)) |
| 796 | (vc-test--version-diff ',backend)) | 897 | (vc-test--version-diff ',backend)) |
| 797 | )))) | 898 | |
| 899 | (ert-deftest | ||
| 900 | ,(intern (format "vc-test-%s07-other-working-trees" backend-string)) () | ||
| 901 | ,(format "Check other working trees functions for the %s backend." | ||
| 902 | backend-string) | ||
| 903 | (skip-unless | ||
| 904 | (ert-test-passed-p | ||
| 905 | (ert-test-most-recent-result | ||
| 906 | (ert-get-test | ||
| 907 | ',(intern | ||
| 908 | (format "vc-test-%s01-register" backend-string)))))) | ||
| 909 | (skip-unless (memq ',backend '(Git Hg))) | ||
| 910 | (skip-when | ||
| 911 | (and (eq ',backend 'Hg) | ||
| 912 | (equal (car (process-lines-ignore-status "hg" "share")) | ||
| 913 | "hg: unknown command 'share'"))) | ||
| 914 | (vc-test--other-working-trees ',backend)))))) | ||
| 798 | 915 | ||
| 799 | (provide 'vc-tests) | 916 | (provide 'vc-tests) |
| 800 | ;;; vc-tests.el ends here | 917 | ;;; vc-tests.el ends here |