branch: elpa/magit commit 3e755c48f2e85090043586a2e8ddeba964d9a11d Author: Jonas Bernoulli <jo...@bernoul.li> Commit: Jonas Bernoulli <jo...@bernoul.li>
git-commit-mode-map: Add more bindings in defvar-keymap Now that "git-commit.el" is part of the `magit' package, we can add all the bindings up front. But we cannot #'quote. Well, we could, but then we would also have to `declare-function' and wouldn't that just be silly? --- lisp/git-commit.el | 4 +++- lisp/magit-diff.el | 2 -- lisp/magit-extras.el | 2 -- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lisp/git-commit.el b/lisp/git-commit.el index a2578efcdc3..7a727c7e4e8 100644 --- a/lisp/git-commit.el +++ b/lisp/git-commit.el @@ -424,7 +424,9 @@ the redundant bindings, then set this to nil, before loading "C-c M-p" #'git-commit-search-message-backward "C-c M-n" #'git-commit-search-message-forward "C-c C-i" #'git-commit-insert-trailer - "C-c M-s" #'git-commit-save-message) + "C-c M-s" #'git-commit-save-message + "C-c C-d" 'magit-diff-while-committing + "C-c C-w" 'magit-pop-revision-stack) ;;; Menu diff --git a/lisp/magit-diff.el b/lisp/magit-diff.el index 5aeba13c877..9ac0f564505 100644 --- a/lisp/magit-diff.el +++ b/lisp/magit-diff.el @@ -1273,8 +1273,6 @@ be committed." (user-error "No commit in progress")) (magit-commit-diff-1)) -(keymap-set git-commit-mode-map "C-c C-d" #'magit-diff-while-committing) - ;;;###autoload (defun magit-diff-buffer-file () "Show diff for the blob or file visited in the current buffer. diff --git a/lisp/magit-extras.el b/lisp/magit-extras.el index 77350b99194..e43526d689c 100644 --- a/lisp/magit-extras.el +++ b/lisp/magit-extras.el @@ -735,8 +735,6 @@ the minibuffer too." (delete-char -1))))) (user-error "Revision stack is empty"))) -(keymap-set git-commit-mode-map "C-c C-w" #'magit-pop-revision-stack) - ;;;###autoload (defun magit-copy-section-value (arg) "Save the value of the current section for later use.