branch: elpa/git-commit
commit 4195508e2e5f9fddef415bfc0b9d20a954eb5fac
Author: Jonas Bernoulli <jo...@bernoul.li>
Commit: Jonas Bernoulli <jo...@bernoul.li>

    Set keymap slot of section classes
    
    Provided a directly corresponding keymap exists, of course.
    
    Do this even for the abstract `magit-diff-class', for consistency.
---
 lisp/magit-base.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lisp/magit-base.el b/lisp/magit-base.el
index 0e849ea618..81e7e510a1 100644
--- a/lisp/magit-base.el
+++ b/lisp/magit-base.el
@@ -471,11 +471,14 @@ and delay of your graphical environment or operating 
system."
 
 ;;; Section Classes
 
-(defclass magit-commit-section (magit-section) ())
+(defclass magit-commit-section (magit-section)
+  ((keymap :initform 'magit-commit-section-map)))
 
 (setf (alist-get 'commit magit--section-type-alist) 'magit-commit-section)
 
-(defclass magit-diff-section (magit-section) () :abstract t)
+(defclass magit-diff-section (magit-section)
+  ((keymap :initform 'magit-diff-section-map))
+  :abstract t)
 
 (defclass magit-file-section (magit-diff-section)
   ((keymap :initform 'magit-file-section-map)

Reply via email to