From 99340ad17a826c61895b3e1ed6928b36fbfeac60 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 26 Feb 2021 16:51:15 -0500 Subject: lisp/vc/*.el: Use lexical-bindings in all the files Also remove some redundant `:group` arguments. * lisp/vc/vc.el (vc-ignore): Autoload. * lisp/vc/pcvs-util.el (cvs-every, cvs-union, cvs-map): Delete functions. * lisp/vc/cvs-status.el: Require `cl-lib` at runtime. (cvs-tree-tags-insert): Use `cl-mapcar` and `cl-every` instead. * lisp/vc/pcvs.el: Require `cl-lib` at runtime. (cvs-do-removal): Use `cl-every` instead. * lisp/vc/ediff-init.el: Require `ediff-util` (for `ediff-cleanup-mess` and `ediff-default-suspend-function`). * lisp/vc/pcvs-info.el (cvs-fileinfo<): Remove unused vars `subtypea` and `subtypeb`. * lisp/vc/vc-git.el: * lisp/vc/vc-bzr.el: Require `vc-dispatcher` at runtime for `vc-do-async-command`. --- lisp/vc/vc-hooks.el | 72 ++++++++++++++++++++++++----------------------------- 1 file changed, 32 insertions(+), 40 deletions(-) (limited to 'lisp/vc/vc-hooks.el') diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el index f910f9d5496..4b3c829a2c6 100644 --- a/lisp/vc/vc-hooks.el +++ b/lisp/vc/vc-hooks.el @@ -50,50 +50,42 @@ (defface vc-up-to-date-state '((default :inherit vc-state-base)) "Face for VC modeline state when the file is up to date." - :version "25.1" - :group 'vc-faces) + :version "25.1") (defface vc-needs-update-state '((default :inherit vc-state-base)) "Face for VC modeline state when the file needs update." - :version "25.1" - :group 'vc-faces) + :version "25.1") (defface vc-locked-state '((default :inherit vc-state-base)) "Face for VC modeline state when the file locked." - :version "25.1" - :group 'vc-faces) + :version "25.1") (defface vc-locally-added-state '((default :inherit vc-state-base)) "Face for VC modeline state when the file is locally added." - :version "25.1" - :group 'vc-faces) + :version "25.1") (defface vc-conflict-state '((default :inherit vc-state-base)) "Face for VC modeline state when the file contains merge conflicts." - :version "25.1" - :group 'vc-faces) + :version "25.1") (defface vc-removed-state '((default :inherit vc-state-base)) "Face for VC modeline state when the file was removed from the VC system." - :version "25.1" - :group 'vc-faces) + :version "25.1") (defface vc-missing-state '((default :inherit vc-state-base)) "Face for VC modeline state when the file is missing from the file system." - :version "25.1" - :group 'vc-faces) + :version "25.1") (defface vc-edited-state '((default :inherit vc-state-base)) "Face for VC modeline state when the file is edited." - :version "25.1" - :group 'vc-faces) + :version "25.1") ;; Customization Variables (the rest is in vc.el) @@ -871,31 +863,31 @@ In the latter case, VC mode is deactivated for this buffer." ;; (autoload 'vc-prefix-map "vc" nil nil 'keymap) (defvar vc-prefix-map (let ((map (make-sparse-keymap))) - (define-key map "a" 'vc-update-change-log) - (define-key map "b" 'vc-switch-backend) - (define-key map "d" 'vc-dir) - (define-key map "g" 'vc-annotate) - (define-key map "G" 'vc-ignore) - (define-key map "h" 'vc-region-history) - (define-key map "i" 'vc-register) - (define-key map "l" 'vc-print-log) - (define-key map "L" 'vc-print-root-log) - (define-key map "I" 'vc-log-incoming) - (define-key map "O" 'vc-log-outgoing) - (define-key map "ML" 'vc-log-mergebase) - (define-key map "MD" 'vc-diff-mergebase) - (define-key map "m" 'vc-merge) - (define-key map "r" 'vc-retrieve-tag) - (define-key map "s" 'vc-create-tag) - (define-key map "u" 'vc-revert) - (define-key map "v" 'vc-next-action) - (define-key map "+" 'vc-update) + (define-key map "a" #'vc-update-change-log) + (define-key map "b" #'vc-switch-backend) + (define-key map "d" #'vc-dir) + (define-key map "g" #'vc-annotate) + (define-key map "G" #'vc-ignore) + (define-key map "h" #'vc-region-history) + (define-key map "i" #'vc-register) + (define-key map "l" #'vc-print-log) + (define-key map "L" #'vc-print-root-log) + (define-key map "I" #'vc-log-incoming) + (define-key map "O" #'vc-log-outgoing) + (define-key map "ML" #'vc-log-mergebase) + (define-key map "MD" #'vc-diff-mergebase) + (define-key map "m" #'vc-merge) + (define-key map "r" #'vc-retrieve-tag) + (define-key map "s" #'vc-create-tag) + (define-key map "u" #'vc-revert) + (define-key map "v" #'vc-next-action) + (define-key map "+" #'vc-update) ;; I'd prefer some kind of symmetry with vc-update: - (define-key map "P" 'vc-push) - (define-key map "=" 'vc-diff) - (define-key map "D" 'vc-root-diff) - (define-key map "~" 'vc-revision-other-window) - (define-key map "x" 'vc-delete-file) + (define-key map "P" #'vc-push) + (define-key map "=" #'vc-diff) + (define-key map "D" #'vc-root-diff) + (define-key map "~" #'vc-revision-other-window) + (define-key map "x" #'vc-delete-file) map)) (fset 'vc-prefix-map vc-prefix-map) (define-key ctl-x-map "v" 'vc-prefix-map) -- cgit v1.2.3