summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuri Linkov <juri@linkov.net>2022-09-12 22:12:50 +0300
committerJuri Linkov <juri@linkov.net>2022-09-12 22:12:50 +0300
commit5e6a7a210bbb92b7f4c94b5765297fd814362338 (patch)
tree6c5126c6d9b90804addb6a244bc23cd72f65a34c
parentbcc95bd66d69f418f33d4277b1d2244eb3026ebe (diff)
downloademacs-5e6a7a210bbb92b7f4c94b5765297fd814362338.tar.gz
Document the recently added branch commands (bug#50344)
* doc/emacs/maintaining.texi (VC Directory Commands): Change the prefix key from "B" to "b". Replace vc-create-tag with vc-create-branch, and vc-retrieve-tag with vc-switch-branch. (Switching Branches): Mention vc-switch-branch bound to 'C-x v b s'. (Creating Branches): Mention vc-create-branch bound to 'C-x v b c'. * lisp/vc/vc-dir.el (vc-dir-mode-map): In branch keymap 'b' rebind "c" from vc-create-tag to vc-create-branch, and "s" from vc-retrieve-tag to vc-switch-branch.
-rw-r--r--doc/emacs/maintaining.texi19
-rw-r--r--etc/NEWS3
-rw-r--r--lisp/vc/vc-dir.el4
3 files changed, 15 insertions, 11 deletions
diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi
index 9f81313844e..89e6b2215c9 100644
--- a/doc/emacs/maintaining.texi
+++ b/doc/emacs/maintaining.texi
@@ -1398,18 +1398,19 @@ Apart from acting on multiple files, these commands behave much like
their single-buffer counterparts (@pxref{Search}).
The VC Directory buffer additionally defines some branch-related
-commands starting with the prefix @kbd{B}:
+commands starting with the prefix @kbd{b}:
@table @kbd
-@item B c
-Create a new branch (@code{vc-create-tag}).
+@item b c
+Create a new branch (@code{vc-create-branch}). @xref{Creating
+Branches}.
-@item B l
+@item b l
Prompt for the name of a branch and display the change history of that
branch (@code{vc-print-branch-log}).
-@item B s
-Switch to a branch (@code{vc-retrieve-tag}). @xref{Switching
+@item b s
+Switch to a branch (@code{vc-switch-branch}). @xref{Switching
Branches}.
@item d
@@ -1473,7 +1474,7 @@ Mercurial, command @kbd{hg update} is used to switch to another
branch.
The VC command to switch to another branch in the current directory
-is @kbd{C-x v r @var{branch-name} @key{RET}} (@code{vc-retrieve-tag}).
+is @kbd{C-x v b s @var{branch-name} @key{RET}} (@code{vc-switch-branch}).
On centralized version control systems, you can also switch between
branches by typing @kbd{C-u C-x v v} in an up-to-date work file
@@ -1623,8 +1624,8 @@ if the current revision is 2.5, the branch ID should be 2.5.1, 2.5.2,
and so on, depending on the number of existing branches at that point.
This procedure will not work for distributed version control systems
-like git or Mercurial. For those systems you should use the prefix
-argument to @code{vc-create-tag} (@kbd{C-u C-x v s}) instead.
+like git or Mercurial. For those systems you should use the command
+@code{vc-create-branch} (@kbd{C-x v b c}) instead.
To create a new branch at an older revision (one that is no longer
the head of a branch), first select that revision (@pxref{Switching
diff --git a/etc/NEWS b/etc/NEWS
index 562cb701826..35d3db5ceb1 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1647,9 +1647,12 @@ info node. This command only works for the Emacs and Emacs Lisp manuals.
** VC
++++
*** 'C-x v b' prefix key is used now for branch commands.
'vc-print-branch-log' is bound to 'C-x v b l', and new commands are
'vc-create-branch' ('C-x v b c') and 'vc-switch-branch' ('C-x v b s').
+The VC Directory buffer now uses the prefix 'b' for these branch-related
+commands.
+++
*** New command '%' ('vc-dir-mark-by-regexp').
diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index aa8bad79613..b4568727ea0 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -357,9 +357,9 @@ See `run-hooks'."
(let ((branch-map (make-sparse-keymap)))
(define-key map "b" branch-map)
- (define-key branch-map "c" #'vc-create-tag)
+ (define-key branch-map "c" #'vc-create-branch)
(define-key branch-map "l" #'vc-print-branch-log)
- (define-key branch-map "s" #'vc-retrieve-tag))
+ (define-key branch-map "s" #'vc-switch-branch))
(let ((mark-map (make-sparse-keymap)))
(define-key map "*" mark-map)