From 5083f82952920cccede561c1e4d622611d20bcef Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sat, 5 Jun 2021 17:14:00 -0400 Subject: lei: Configure bindings for query and show modes Message-Id: <20210605211402.20304-17-kyle@kyleam.com> --- piem-lei.el | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/piem-lei.el b/piem-lei.el index 8267da5..71f548c 100644 --- a/piem-lei.el +++ b/piem-lei.el @@ -139,6 +139,13 @@ unless DISPLAY is non-nil." ("^>>>> \\(.*\\)" 0 'piem-lei-show-cited-text-4)) "Font lock keywords for `piem-lei-show-mode'.") +(defvar piem-lei-show-mode-map + (let ((map (make-sparse-keymap))) + (define-key map "s" #'piem-lei-query) + (define-key map "t" #'piem-lei-query-thread) + map) + "Keymap for `piem-lei-show-mode'.") + (define-derived-mode piem-lei-show-mode special-mode "lei-show" "Major mode for displaying message via lei." :group 'piem-lei @@ -319,6 +326,18 @@ line's message, scroll its text downward, passing ARG to (arg (- arg)) (t '-)))) +(defvar piem-lei-query-mode-map + (let ((map (make-sparse-keymap))) + (define-key map (kbd "RET") #'piem-lei-query-show) + (define-key map (kbd "DEL") #'piem-lei-query-show-or-scroll-down) + (define-key map (kbd "SPC") #'piem-lei-query-show-or-scroll-up) + (define-key map "n" #'piem-lei-query-next-line) + (define-key map "p" #'piem-lei-query-previous-line) + (define-key map "s" #'piem-lei-query) + (define-key map "t" #'piem-lei-query-thread) + map) + "Keymap for `piem-lei-query-mode'.") + (define-derived-mode piem-lei-query-mode special-mode "lei-query" "Major mode for displaying overview of `lei q' results." :group 'piem-lei -- cgit v1.2.3