aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/vc
diff options
context:
space:
mode:
authorDmitry Gutov2022-08-15 02:22:59 +0300
committerDmitry Gutov2022-08-15 02:22:59 +0300
commitee3a674c7c9e39fe7ff296ce1f9830fc45520de8 (patch)
treee8ba1e7be54314f208454e80e3d31044c913f3eb /lisp/vc
parentfe0e53d963899a16e0dd1bbc1ba10a6b59f7989e (diff)
parent0a8e88fd83db5398d36064a7f87cff5b57da7284 (diff)
downloademacs-scratch/font_lock_large_files.tar.gz
emacs-scratch/font_lock_large_files.zip
Merge branch 'master' into scratch/font_lock_large_filesscratch/font_lock_large_files
Diffstat (limited to 'lisp/vc')
-rw-r--r--lisp/vc/add-log.el14
-rw-r--r--lisp/vc/diff-mode.el4
-rw-r--r--lisp/vc/ediff-mult.el26
-rw-r--r--lisp/vc/ediff.el11
-rw-r--r--lisp/vc/emerge.el2
-rw-r--r--lisp/vc/vc-annotate.el30
-rw-r--r--lisp/vc/vc-bzr.el24
-rw-r--r--lisp/vc/vc-dir.el16
-rw-r--r--lisp/vc/vc-git.el57
-rw-r--r--lisp/vc/vc-hg.el11
-rw-r--r--lisp/vc/vc-hooks.el57
11 files changed, 115 insertions, 137 deletions
diff --git a/lisp/vc/add-log.el b/lisp/vc/add-log.el
index e02d84f1f56..d710578ffff 100644
--- a/lisp/vc/add-log.el
+++ b/lisp/vc/add-log.el
@@ -568,14 +568,12 @@ Compatibility function for \\[next-error] invocations."
568 ;; Select window displaying source file. 568 ;; Select window displaying source file.
569 (select-window change-log-find-window))))) 569 (select-window change-log-find-window)))))
570 570
571(defvar change-log-mode-map 571(defvar-keymap change-log-mode-map
572 (let ((map (make-sparse-keymap))) 572 :doc "Keymap for Change Log major mode."
573 (define-key map [?\C-c ?\C-p] #'add-log-edit-prev-comment) 573 "C-c C-p" #'add-log-edit-prev-comment
574 (define-key map [?\C-c ?\C-n] #'add-log-edit-next-comment) 574 "C-c C-n" #'add-log-edit-next-comment
575 (define-key map [?\C-c ?\C-f] #'change-log-find-file) 575 "C-c C-f" #'change-log-find-file
576 (define-key map [?\C-c ?\C-c] #'change-log-goto-source) 576 "C-c C-c" #'change-log-goto-source)
577 map)
578 "Keymap for Change Log major mode.")
579 577
580(easy-menu-define change-log-mode-menu change-log-mode-map 578(easy-menu-define change-log-mode-menu change-log-mode-map
581 "Menu for Change Log major mode." 579 "Menu for Change Log major mode."
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el
index aa426446d73..e4a1996c1bb 100644
--- a/lisp/vc/diff-mode.el
+++ b/lisp/vc/diff-mode.el
@@ -27,8 +27,8 @@
27;; to the corresponding source file. 27;; to the corresponding source file.
28 28
29;; Inspired by Pavel Machek's patch-mode.el (<pavel@@atrey.karlin.mff.cuni.cz>) 29;; Inspired by Pavel Machek's patch-mode.el (<pavel@@atrey.karlin.mff.cuni.cz>)
30;; Some efforts were spent to have it somewhat compatible with XEmacs's 30;; Some efforts were spent to have it somewhat compatible with
31;; diff-mode as well as with compilation-minor-mode 31;; `compilation-minor-mode'.
32 32
33;; Bugs: 33;; Bugs:
34 34
diff --git a/lisp/vc/ediff-mult.el b/lisp/vc/ediff-mult.el
index 7e15060f8c4..52e356d8e9b 100644
--- a/lisp/vc/ediff-mult.el
+++ b/lisp/vc/ediff-mult.el
@@ -144,20 +144,18 @@ Useful commands (type ? to hide them and free up screen):
144 144
145(ediff-defvar-local ediff-meta-buffer-map nil 145(ediff-defvar-local ediff-meta-buffer-map nil
146 "The keymap for the meta buffer.") 146 "The keymap for the meta buffer.")
147(defvar ediff-dir-diffs-buffer-map 147(defvar-keymap ediff-dir-diffs-buffer-map
148 (let ((map (make-sparse-keymap))) 148 :doc "Keymap for buffer showing differences between directories."
149 (suppress-keymap map) 149 :suppress t
150 (define-key map "q" #'ediff-bury-dir-diffs-buffer) 150 "q" #'ediff-bury-dir-diffs-buffer
151 (define-key map " " #'next-line) 151 "SPC" #'next-line
152 (define-key map "n" #'next-line) 152 "n" #'next-line
153 (define-key map "\C-?" #'previous-line) 153 "DEL" #'previous-line
154 (define-key map "p" #'previous-line) 154 "p" #'previous-line
155 (define-key map "C" #'ediff-dir-diff-copy-file) 155 "C" #'ediff-dir-diff-copy-file
156 (define-key map [mouse-2] #'ediff-dir-diff-copy-file) 156 "<mouse-2>" #'ediff-dir-diff-copy-file
157 (define-key map [delete] #'previous-line) 157 "<delete>" #'previous-line
158 (define-key map [backspace] #'previous-line) 158 "<backspace>" #'previous-line)
159 map)
160 "Keymap for buffer showing differences between directories.")
161 159
162;; Variable specifying the action to take when the use invokes ediff in the 160;; Variable specifying the action to take when the use invokes ediff in the
163;; meta buffer. This is usually ediff-registry-action or ediff-filegroup-action 161;; meta buffer. This is usually ediff-registry-action or ediff-filegroup-action
diff --git a/lisp/vc/ediff.el b/lisp/vc/ediff.el
index 84ad5cef90f..94e3fc6d7fe 100644
--- a/lisp/vc/ediff.el
+++ b/lisp/vc/ediff.el
@@ -89,12 +89,11 @@
89;; underlining. However, if the region is already underlined by some other 89;; underlining. However, if the region is already underlined by some other
90;; overlays, there is no simple way to temporarily remove that residual 90;; overlays, there is no simple way to temporarily remove that residual
91;; underlining. This problem occurs when a buffer is highlighted with 91;; underlining. This problem occurs when a buffer is highlighted with
92;; hilit19.el or font-lock.el packages. If this residual highlighting gets 92;; font-lock.el packages. If this residual highlighting gets in the way, you
93;; in the way, you can do the following. Both font-lock.el and hilit19.el 93;; can do the following. font-lock.el provides commands for unhighlighting
94;; provide commands for unhighlighting buffers. You can either place these 94;; buffers. You can either place these commands in `ediff-prepare-buffer-hook'
95;; commands in `ediff-prepare-buffer-hook' (which will unhighlight every 95;; (which will unhighlight every buffer used by Ediff) or you can execute
96;; buffer used by Ediff) or you can execute them interactively, at any time 96;; them interactively, at any time and in any buffer.
97;; and on any buffer.
98 97
99 98
100;;; Acknowledgments: 99;;; Acknowledgments:
diff --git a/lisp/vc/emerge.el b/lisp/vc/emerge.el
index 422ed5c0a4d..de09be80e7c 100644
--- a/lisp/vc/emerge.el
+++ b/lisp/vc/emerge.el
@@ -2942,6 +2942,7 @@ If some prefix of KEY has a non-prefix definition, it is redefined."
2942 2942
2943;; Define a key if it (or a prefix) is not already defined in the map. 2943;; Define a key if it (or a prefix) is not already defined in the map.
2944(defun emerge-define-key-if-possible (keymap key definition) 2944(defun emerge-define-key-if-possible (keymap key definition)
2945 (declare (obsolete keymap-set "29.1"))
2945 ;; look up the present definition of the key 2946 ;; look up the present definition of the key
2946 (let ((present (lookup-key keymap key))) 2947 (let ((present (lookup-key keymap key)))
2947 (if (integerp present) 2948 (if (integerp present)
@@ -2959,6 +2960,7 @@ If some prefix of KEY has a non-prefix definition, it is redefined."
2959If the name won't fit on one line, the minibuffer is expanded to hold it, 2960If the name won't fit on one line, the minibuffer is expanded to hold it,
2960and the command waits for a keystroke from the user. If the keystroke is 2961and the command waits for a keystroke from the user. If the keystroke is
2961SPC, it is ignored; if it is anything else, it is processed as a command." 2962SPC, it is ignored; if it is anything else, it is processed as a command."
2963 (declare (obsolete nil "29.1"))
2962 (interactive) 2964 (interactive)
2963 (let ((name (buffer-file-name))) 2965 (let ((name (buffer-file-name)))
2964 (or name 2966 (or name
diff --git a/lisp/vc/vc-annotate.el b/lisp/vc/vc-annotate.el
index 1f19c4cfe26..a15cf417de3 100644
--- a/lisp/vc/vc-annotate.el
+++ b/lisp/vc/vc-annotate.el
@@ -162,22 +162,20 @@ List of factors, used to expand/compress the time scale. See `vc-annotate'."
162 :type '(repeat number) 162 :type '(repeat number)
163 :group 'vc) 163 :group 'vc)
164 164
165(defvar vc-annotate-mode-map 165(defvar-keymap vc-annotate-mode-map
166 (let ((m (make-sparse-keymap))) 166 :doc "Local keymap used for VC-Annotate mode."
167 (define-key m "a" #'vc-annotate-revision-previous-to-line) 167 "a" #'vc-annotate-revision-previous-to-line
168 (define-key m "d" #'vc-annotate-show-diff-revision-at-line) 168 "d" #'vc-annotate-show-diff-revision-at-line
169 (define-key m "=" #'vc-annotate-show-diff-revision-at-line) 169 "=" #'vc-annotate-show-diff-revision-at-line
170 (define-key m "D" #'vc-annotate-show-changeset-diff-revision-at-line) 170 "D" #'vc-annotate-show-changeset-diff-revision-at-line
171 (define-key m "f" #'vc-annotate-find-revision-at-line) 171 "f" #'vc-annotate-find-revision-at-line
172 (define-key m "j" #'vc-annotate-revision-at-line) 172 "j" #'vc-annotate-revision-at-line
173 (define-key m "l" #'vc-annotate-show-log-revision-at-line) 173 "l" #'vc-annotate-show-log-revision-at-line
174 (define-key m "n" #'vc-annotate-next-revision) 174 "n" #'vc-annotate-next-revision
175 (define-key m "p" #'vc-annotate-prev-revision) 175 "p" #'vc-annotate-prev-revision
176 (define-key m "w" #'vc-annotate-working-revision) 176 "w" #'vc-annotate-working-revision
177 (define-key m "v" #'vc-annotate-toggle-annotation-visibility) 177 "v" #'vc-annotate-toggle-annotation-visibility
178 (define-key m "\C-m" #'vc-annotate-goto-line) 178 "RET" #'vc-annotate-goto-line)
179 m)
180 "Local keymap used for VC-Annotate mode.")
181 179
182;;; Annotate functionality 180;;; Annotate functionality
183 181
diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el
index 072bd72b441..f6b17d4ce09 100644
--- a/lisp/vc/vc-bzr.el
+++ b/lisp/vc/vc-bzr.el
@@ -1008,19 +1008,17 @@ stream. Standard error output is discarded."
1008 ;; frob the results accordingly. 1008 ;; frob the results accordingly.
1009 (file-relative-name dir (vc-bzr-root dir))))) 1009 (file-relative-name dir (vc-bzr-root dir)))))
1010 1010
1011(defvar vc-bzr-shelve-map 1011(defvar-keymap vc-bzr-shelve-map
1012 (let ((map (make-sparse-keymap))) 1012 ;; Turn off vc-dir marking
1013 ;; Turn off vc-dir marking 1013 "<mouse-2>" #'ignore
1014 (define-key map [mouse-2] #'ignore) 1014
1015 1015 "<down-mouse-3>" #'vc-bzr-shelve-menu
1016 (define-key map [down-mouse-3] #'vc-bzr-shelve-menu) 1016 "C-k" #'vc-bzr-shelve-delete-at-point
1017 (define-key map "\C-k" #'vc-bzr-shelve-delete-at-point) 1017 "=" #'vc-bzr-shelve-show-at-point
1018 (define-key map "=" #'vc-bzr-shelve-show-at-point) 1018 "RET" #'vc-bzr-shelve-show-at-point
1019 (define-key map "\C-m" #'vc-bzr-shelve-show-at-point) 1019 "A" #'vc-bzr-shelve-apply-and-keep-at-point
1020 (define-key map "A" #'vc-bzr-shelve-apply-and-keep-at-point) 1020 "P" #'vc-bzr-shelve-apply-at-point
1021 (define-key map "P" #'vc-bzr-shelve-apply-at-point) 1021 "S" #'vc-bzr-shelve-snapshot)
1022 (define-key map "S" #'vc-bzr-shelve-snapshot)
1023 map))
1024 1022
1025(defvar vc-bzr-shelve-menu-map 1023(defvar vc-bzr-shelve-menu-map
1026 (let ((map (make-sparse-keymap "Bzr Shelve"))) 1024 (let ((map (make-sparse-keymap "Bzr Shelve")))
diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index 9335da10065..068a66b25b8 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -1467,17 +1467,13 @@ These are the commands available for use in the file status buffer:
1467 (propertize "Please add backend specific headers here. It's easy!" 1467 (propertize "Please add backend specific headers here. It's easy!"
1468 'face 'vc-dir-status-warning))) 1468 'face 'vc-dir-status-warning)))
1469 1469
1470(defvar vc-dir-status-mouse-map 1470(defvar-keymap vc-dir-status-mouse-map
1471 (let ((map (make-sparse-keymap))) 1471 :doc "Local keymap for toggling mark."
1472 (define-key map [mouse-2] #'vc-dir-toggle-mark) 1472 "<mouse-2>" #'vc-dir-toggle-mark)
1473 map)
1474 "Local keymap for toggling mark.")
1475 1473
1476(defvar vc-dir-filename-mouse-map 1474(defvar-keymap vc-dir-filename-mouse-map
1477 (let ((map (make-sparse-keymap))) 1475 :doc "Local keymap for visiting a file."
1478 (define-key map [mouse-2] #'vc-dir-find-file-other-window) 1476 "<mouse-2>" #'vc-dir-find-file-other-window)
1479 map)
1480 "Local keymap for visiting a file.")
1481 1477
1482(defun vc-default-dir-printer (_backend fileentry) 1478(defun vc-default-dir-printer (_backend fileentry)
1483 "Pretty print FILEENTRY." 1479 "Pretty print FILEENTRY."
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 8937454d111..46a486a46c3 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -664,32 +664,26 @@ or an empty string if none."
664 :files files 664 :files files
665 :update-function update-function))) 665 :update-function update-function)))
666 666
667(defvar vc-git-stash-shared-map 667(defvar-keymap vc-git-stash-shared-map
668 (let ((map (make-sparse-keymap))) 668 "S" #'vc-git-stash-snapshot
669 (define-key map "S" #'vc-git-stash-snapshot) 669 "C" #'vc-git-stash)
670 (define-key map "C" #'vc-git-stash) 670
671 map)) 671(defvar-keymap vc-git-stash-map
672 672 :parent vc-git-stash-shared-map
673(defvar vc-git-stash-map 673 ;; Turn off vc-dir marking
674 (let ((map (make-sparse-keymap))) 674 "<mouse-2>" #'ignore
675 (set-keymap-parent map vc-git-stash-shared-map) 675
676 ;; Turn off vc-dir marking 676 "<down-mouse-3>" #'vc-git-stash-menu
677 (define-key map [mouse-2] #'ignore) 677 "C-k" #'vc-git-stash-delete-at-point
678 678 "=" #'vc-git-stash-show-at-point
679 (define-key map [down-mouse-3] #'vc-git-stash-menu) 679 "RET" #'vc-git-stash-show-at-point
680 (define-key map "\C-k" #'vc-git-stash-delete-at-point) 680 "A" #'vc-git-stash-apply-at-point
681 (define-key map "=" #'vc-git-stash-show-at-point) 681 "P" #'vc-git-stash-pop-at-point)
682 (define-key map "\C-m" #'vc-git-stash-show-at-point) 682
683 (define-key map "A" #'vc-git-stash-apply-at-point) 683(defvar-keymap vc-git-stash-button-map
684 (define-key map "P" #'vc-git-stash-pop-at-point) 684 :parent vc-git-stash-shared-map
685 map)) 685 "<mouse-2>" #'push-button
686 686 "RET" #'push-button)
687(defvar vc-git-stash-button-map
688 (let ((map (make-sparse-keymap)))
689 (set-keymap-parent map vc-git-stash-shared-map)
690 (define-key map [mouse-2] #'push-button)
691 (define-key map "\C-m" #'push-button)
692 map))
693 687
694(defconst vc-git-stash-shared-help 688(defconst vc-git-stash-shared-help
695 "\\<vc-git-stash-shared-map>\\[vc-git-stash]: Create named stash\n\\[vc-git-stash-snapshot]: Snapshot stash") 689 "\\<vc-git-stash-shared-map>\\[vc-git-stash]: Create named stash\n\\[vc-git-stash-snapshot]: Snapshot stash")
@@ -910,12 +904,11 @@ If toggling on, also insert its message into the buffer."
910 standard-output 1 nil 904 standard-output 1 nil
911 "log" "--max-count=1" "--pretty=format:%B" "HEAD"))))) 905 "log" "--max-count=1" "--pretty=format:%B" "HEAD")))))
912 906
913(defvar vc-git-log-edit-mode-map 907(defvar-keymap vc-git-log-edit-mode-map
914 (let ((map (make-sparse-keymap "Git-Log-Edit"))) 908 :name "Git-Log-Edit"
915 (define-key map "\C-c\C-s" #'vc-git-log-edit-toggle-signoff) 909 "C-c C-s" #'vc-git-log-edit-toggle-signoff
916 (define-key map "\C-c\C-n" #'vc-git-log-edit-toggle-no-verify) 910 "C-c C-n" #'vc-git-log-edit-toggle-no-verify
917 (define-key map "\C-c\C-e" #'vc-git-log-edit-toggle-amend) 911 "C-c C-e" #'vc-git-log-edit-toggle-amend)
918 map))
919 912
920(define-derived-mode vc-git-log-edit-mode log-edit-mode "Log-Edit/git" 913(define-derived-mode vc-git-log-edit-mode log-edit-mode "Log-Edit/git"
921 "Major mode for editing Git log messages. 914 "Major mode for editing Git log messages.
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el
index 5fba2b3908a..61976288e35 100644
--- a/lisp/vc/vc-hg.el
+++ b/lisp/vc/vc-hg.el
@@ -1177,10 +1177,9 @@ If toggling on, also insert its message into the buffer."
1177 standard-output 1 nil 1177 standard-output 1 nil
1178 "log" "--limit=1" "--template" "{desc}"))))) 1178 "log" "--limit=1" "--template" "{desc}")))))
1179 1179
1180(defvar vc-hg-log-edit-mode-map 1180(defvar-keymap vc-hg-log-edit-mode-map
1181 (let ((map (make-sparse-keymap "Hg-Log-Edit"))) 1181 :name "Hg-Log-Edit"
1182 (define-key map "\C-c\C-e" #'vc-hg-log-edit-toggle-amend) 1182 "C-c C-e" #'vc-hg-log-edit-toggle-amend)
1183 map))
1184 1183
1185(define-derived-mode vc-hg-log-edit-mode log-edit-mode "Log-Edit/hg" 1184(define-derived-mode vc-hg-log-edit-mode log-edit-mode "Log-Edit/hg"
1186 "Major mode for editing Hg log messages. 1185 "Major mode for editing Hg log messages.
@@ -1262,9 +1261,7 @@ REV is the revision to check out into WORKFILE."
1262 1261
1263;;; Hg specific functionality. 1262;;; Hg specific functionality.
1264 1263
1265(defvar vc-hg-extra-menu-map 1264(defvar-keymap vc-hg-extra-menu-map)
1266 (let ((map (make-sparse-keymap)))
1267 map))
1268 1265
1269(defun vc-hg-extra-menu () vc-hg-extra-menu-map) 1266(defun vc-hg-extra-menu () vc-hg-extra-menu-map)
1270 1267
diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el
index 405c9bc2ca4..1f0eeb7e18a 100644
--- a/lisp/vc/vc-hooks.el
+++ b/lisp/vc/vc-hooks.el
@@ -855,38 +855,37 @@ In the latter case, VC mode is deactivated for this buffer."
855;; Autoloading works fine, but it prevents shortcuts from appearing 855;; Autoloading works fine, but it prevents shortcuts from appearing
856;; in the menu because they don't exist yet when the menu is built. 856;; in the menu because they don't exist yet when the menu is built.
857;; (autoload 'vc-prefix-map "vc" nil nil 'keymap) 857;; (autoload 'vc-prefix-map "vc" nil nil 'keymap)
858(defvar vc-prefix-map 858(defvar-keymap vc-prefix-map
859 (let ((map (make-sparse-keymap))) 859 "a" #'vc-update-change-log
860 (define-key map "a" #'vc-update-change-log) 860 "d" #'vc-dir
861 (with-suppressed-warnings ((obsolete vc-switch-backend)) 861 "g" #'vc-annotate
862 (define-key map "b" #'vc-switch-backend)) 862 "G" #'vc-ignore
863 (define-key map "d" #'vc-dir) 863 "h" #'vc-region-history
864 (define-key map "g" #'vc-annotate) 864 "i" #'vc-register
865 (define-key map "G" #'vc-ignore) 865 "l" #'vc-print-log
866 (define-key map "h" #'vc-region-history) 866 "L" #'vc-print-root-log
867 (define-key map "i" #'vc-register) 867 "I" #'vc-log-incoming
868 (define-key map "l" #'vc-print-log) 868 "O" #'vc-log-outgoing
869 (define-key map "L" #'vc-print-root-log) 869 "M L" #'vc-log-mergebase
870 (define-key map "I" #'vc-log-incoming) 870 "M D" #'vc-diff-mergebase
871 (define-key map "O" #'vc-log-outgoing) 871 "m" #'vc-merge
872 (define-key map "ML" #'vc-log-mergebase) 872 "r" #'vc-retrieve-tag
873 (define-key map "MD" #'vc-diff-mergebase) 873 "s" #'vc-create-tag
874 (define-key map "m" #'vc-merge) 874 "u" #'vc-revert
875 (define-key map "r" #'vc-retrieve-tag) 875 "v" #'vc-next-action
876 (define-key map "s" #'vc-create-tag) 876 "+" #'vc-update
877 (define-key map "u" #'vc-revert) 877 ;; I'd prefer some kind of symmetry with vc-update:
878 (define-key map "v" #'vc-next-action) 878 "P" #'vc-push
879 (define-key map "+" #'vc-update) 879 "=" #'vc-diff
880 ;; I'd prefer some kind of symmetry with vc-update: 880 "D" #'vc-root-diff
881 (define-key map "P" #'vc-push) 881 "~" #'vc-revision-other-window
882 (define-key map "=" #'vc-diff) 882 "x" #'vc-delete-file)
883 (define-key map "D" #'vc-root-diff)
884 (define-key map "~" #'vc-revision-other-window)
885 (define-key map "x" #'vc-delete-file)
886 map))
887(fset 'vc-prefix-map vc-prefix-map) 883(fset 'vc-prefix-map vc-prefix-map)
888(define-key ctl-x-map "v" 'vc-prefix-map) 884(define-key ctl-x-map "v" 'vc-prefix-map)
889 885
886(with-suppressed-warnings ((obsolete vc-switch-backend))
887 (keymap-set vc-prefix-map "b" #'vc-switch-backend))
888
890(defvar vc-menu-map 889(defvar vc-menu-map
891 (let ((map (make-sparse-keymap "Version Control"))) 890 (let ((map (make-sparse-keymap "Version Control")))
892 ;;(define-key map [show-files] 891 ;;(define-key map [show-files]