From 99b355e2fa177e73d1a0e388574eb1dd575a2ec0 Mon Sep 17 00:00:00 2001 From: bmag Date: Fri, 15 Feb 2019 19:31:01 +0200 Subject: [PATCH] Adapt for Magit's move to Transient Magit now uses Transient instead of magit-popup, and we must adapt. Also had to replace the recently removed magit-diff-buffer-file-popup with magit-diff-buffer-file (similar but doesn't offer a popup before displaying the diff). Note some upstream packages haven't adapted to this change, but when they do we might need similar fixes: - magithub - magit-gitflow - magit-svn --- CHANGELOG.develop | 4 ++-- layers/+intl/keyboard-layout/packages.el | 6 +++--- layers/+source-control/git/README.org | 2 +- layers/+source-control/git/packages.el | 4 ++-- .../+source-control/version-control/keybindings.el | 12 ++++++------ 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.develop b/CHANGELOG.develop index e30248373eff..987edd7f1a5a 100644 --- a/CHANGELOG.develop +++ b/CHANGELOG.develop @@ -1210,8 +1210,8 @@ Other: duianto) - ~SPC g i~ to initialize a repository (thanks to Steven Allen) - ~SPC m g y~ to find symbols (thanks to Daniel Ralston) - - ~SPC g f d~ for =magit-diff-buffer-file-popup= (thanks to Ag Ibragimov) -- Added feature to toggle =evil-magit= based on editing style (thanks to Muneeb + - ~SPC g f d~ for =magit-diff-buffer-file= (thanks to Ag Ibragimov and bmag) +- Add feature to toggle =evil-magit= based on editing style (thanks to Muneeb Shaikh) - Added =use-package= for deferred loading of evil-magit (thanks to Sylvain Benner) diff --git a/layers/+intl/keyboard-layout/packages.el b/layers/+intl/keyboard-layout/packages.el index 3eb50b07c16c..39608febf181 100644 --- a/layers/+intl/keyboard-layout/packages.el +++ b/layers/+intl/keyboard-layout/packages.el @@ -398,9 +398,9 @@ "C-k")) :bepo (progn - (magit-change-popup-key 'magit-dispatch-popup :actions ?t ?j) - (magit-change-popup-key 'magit-dispatch-popup :actions ?s ?k) - (magit-change-popup-key 'magit-dispatch-popup :actions ?S ?K)) + (transient-suffix-put 'magit-dispatch "t" :key "j") + (transient-suffix-put 'magit-dispatch "s" :key "k") + (transient-suffix-put 'magit-dispatch "S" :key "K")) :colemak-jkhl (kl/evil-correct-keys 'visual magit-mode-map "j" diff --git a/layers/+source-control/git/README.org b/layers/+source-control/git/README.org index 12494bf6774e..6b81bb833dd6 100644 --- a/layers/+source-control/git/README.org +++ b/layers/+source-control/git/README.org @@ -110,7 +110,7 @@ Git commands (start with ~g~): | ~SPC g b~ | open a =magit= blame | | ~SPC g f f~ | view a file at a specific branch or commit | | ~SPC g f l~ | commits log for current file | -| ~SPC g f d~ | diff commands for current file | +| ~SPC g f d~ | diff for current file | | ~SPC g H c~ | clear highlights | | ~SPC g H h~ | highlight regions by age of commits | | ~SPC g H t~ | highlight regions by last updated time | diff --git a/layers/+source-control/git/packages.el b/layers/+source-control/git/packages.el index 0ae2a3da99af..e160d172715c 100644 --- a/layers/+source-control/git/packages.el +++ b/layers/+source-control/git/packages.el @@ -157,10 +157,10 @@ "gc" 'magit-clone "gff" 'magit-find-file "gfl" 'magit-log-buffer-file - "gfd" 'magit-diff-buffer-file-popup + "gfd" 'magit-diff-buffer-file "gi" 'magit-init "gL" 'magit-list-repositories - "gm" 'magit-dispatch-popup + "gm" 'magit-dispatch "gs" 'magit-status "gS" 'magit-stage-file "gU" 'magit-unstage-file) diff --git a/layers/+source-control/version-control/keybindings.el b/layers/+source-control/version-control/keybindings.el index b55ffcf9b4d0..1d83e5de31ba 100644 --- a/layers/+source-control/version-control/keybindings.el +++ b/layers/+source-control/version-control/keybindings.el @@ -21,13 +21,13 @@ :on-enter (spacemacs/vcs-enable-margin) :bindings ("C" magit-commit :exit t) - ("d" magit-ediff-popup :exit t) + ("d" magit-ediff :exit t) ("D" magit-diff-unstaged :exit t) - ("F" magit-pull-popup :exit t) - ("P" magit-push-popup :exit t) - ("c" magit-commit-popup :exit t) - ("f" magit-fetch-popup :exit t) - ("l" magit-log-popup :exit t) + ("F" magit-pull :exit t) + ("P" magit-push :exit t) + ("c" magit-commit :exit t) + ("f" magit-fetch :exit t) + ("l" magit-log :exit t) ("u" magit-unstage-file) ("w" magit-stage-file) ("n" spacemacs/vcs-next-hunk)