emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/diff-hl 2ded28e 1/2: Define common show-hunk commands i


From: ELPA Syncer
Subject: [elpa] externals/diff-hl 2ded28e 1/2: Define common show-hunk commands in just one map and rename it
Date: Sun, 31 Oct 2021 19:57:17 -0400 (EDT)

branch: externals/diff-hl
commit 2ded28eacca0df527c55759838357b3e56d9b711
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>

    Define common show-hunk commands in just one map and rename it
---
 diff-hl-show-hunk-posframe.el | 13 ++-----------
 diff-hl-show-hunk.el          |  4 ++--
 2 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/diff-hl-show-hunk-posframe.el b/diff-hl-show-hunk-posframe.el
index ba77151..f6a2cb3 100644
--- a/diff-hl-show-hunk-posframe.el
+++ b/diff-hl-show-hunk-posframe.el
@@ -91,18 +91,9 @@ Customize it to change the base properties of the text.")
     (define-key map [escape]    #'diff-hl-show-hunk-hide)
     (define-key map (kbd "q")   #'diff-hl-show-hunk-hide)
     (define-key map (kbd "C-g") #'diff-hl-show-hunk-hide)
-    (define-key map (kbd "p")   #'diff-hl-show-hunk-previous)
-    (define-key map (kbd "n")   #'diff-hl-show-hunk-next)
-    (define-key map (kbd "c")   #'diff-hl-show-hunk-copy-original-text)
-    (define-key map (kbd "r")   #'diff-hl-show-hunk-revert-hunk)
-    (define-key map (kbd "[")   #'diff-hl-show-hunk-previous)
-    (define-key map (kbd "]")   #'diff-hl-show-hunk-next)
-    (define-key map (kbd "{")   #'diff-hl-show-hunk-previous)
-    (define-key map (kbd "}")   #'diff-hl-show-hunk-next)
+    (set-keymap-parent map diff-hl-show-hunk-map)
     map)
-  "Keymap for command `diff-hl-show-hunk-posframe--transient-mode'.
-Capture all the vertical movement of the point, and converts it
-to scroll in the posframe")
+  "Keymap for command `diff-hl-show-hunk-posframe--transient-mode'.")
 
 (define-minor-mode diff-hl-show-hunk-posframe--transient-mode
   "Temporal minor mode to control diff-hl posframe."
diff --git a/diff-hl-show-hunk.el b/diff-hl-show-hunk.el
index f475fc8..1a5d883 100644
--- a/diff-hl-show-hunk.el
+++ b/diff-hl-show-hunk.el
@@ -210,7 +210,7 @@ Returns a list with the buffer and the line number of the 
clicked line."
   (posn-set-point (event-start event))
   (diff-hl-show-hunk))
 
-(defvar diff-hl-show-hunk--inline-popup-map
+(defvar diff-hl-show-hunk-map
   (let ((map (make-sparse-keymap)))
     (define-key map (kbd "p") #'diff-hl-show-hunk-previous)
     (define-key map (kbd "n") #'diff-hl-show-hunk-next)
@@ -275,7 +275,7 @@ BUFFER is a buffer with the hunk."
              (concat "Diff with " diff-hl-reference-revision)
            "Diff with HEAD")
          "(q)Quit  (p)Previous  (n)Next  (r)Revert  (c)Copy original"
-         diff-hl-show-hunk--inline-popup-map
+         diff-hl-show-hunk-map
          #'diff-hl-show-hunk-hide
          point
          height))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]