From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:863f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms12 with LMTPS id sOJIC0zpu2DaeAAAsNZ9tg (envelope-from ); Sat, 05 Jun 2021 21:14:52 +0000 Received: from out1.migadu.com ([2001:41d0:2:863f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id wNNRC0jpu2ChFwAA1q6Kng (envelope-from ); Sat, 05 Jun 2021 21:14:48 +0000 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kyleam.com; s=key1; t=1622927688; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=d6kn3D+hLLGPTg0KmROGtXOJfxPEO9mZIVoxIG8KR5M=; b=eqMGClxVzc8PzpTowZg8x6Mni31BMI6wYKAZXO9ggGxgqBXFDIFENx/9zrjwo3X7gLpnPA KZHBumUzDFI0Ac8mVPfT6Xc/u6StsmTZQBFWCIS1dFCwmCEYWcFPwuC2xu6By1o+bU0Nq8 QczSwkW4wryLIu1BNHjQ3MZG4RD2nbrSF1I19UNPp3OvPzzXh/DkESfXb6dzUEU7nEtyTh 0o9WcYDCWmWdzAEH8iFL21N3TpHIyKj6n9/OXxdfJ6xsnSG9C/XUu+Dk8Db148HkxxJri4 ZgYMCVz3q3m5LGX1qbPnrXMuVdmsDV5ewOM/aG6h6sYOwXeQ+Y7Cu/94ooB51Q== From: Kyle Meyer To: piem@inbox.kyleam.com Subject: [PATCH 16/18] lei: Configure bindings for query and show modes Date: Sat, 5 Jun 2021 17:14:00 -0400 Message-Id: <20210605211402.20304-17-kyle@kyleam.com> In-Reply-To: <20210605211402.20304-1-kyle@kyleam.com> References: <20210605211402.20304-1-kyle@kyleam.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: kyle@kyleam.com X-TUID: UXq4Mkp7r1o9 --- piem-lei.el | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/piem-lei.el b/piem-lei.el index 8267da5b..71f548c9 100644 --- a/piem-lei.el +++ b/piem-lei.el @@ -139,6 +139,13 @@ (defvar piem-lei-show-mode-font-lock-keywords ("^>>>> \\(.*\\)" 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 @@ (defun piem-lei-query-show-or-scroll-down (arg) (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 -- 2.31.1