From 6d1af1560e3b815d68759921a12bee0c80aa5c39 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Wed, 9 Nov 2022 15:10:24 +0100 Subject: [PATCH] * lisp/thread.el (thread-list-mode-map): Prefer defvar-keymap. --- lisp/thread.el | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/lisp/thread.el b/lisp/thread.el index 1e6e9e75a72..c0cc5feb97c 100644 --- a/lisp/thread.el +++ b/lisp/thread.el @@ -58,20 +58,18 @@ An EVENT has the format :type 'number :version "27.1") -(defvar thread-list-mode-map - (let ((map (make-sparse-keymap))) - (set-keymap-parent map tabulated-list-mode-map) - (define-key map "b" #'thread-list-pop-to-backtrace) - (define-key map "s" nil) - (define-key map "sq" #'thread-list-send-quit-signal) - (define-key map "se" #'thread-list-send-error-signal) - (easy-menu-define nil map "" - '("Threads" - ["Show backtrace" thread-list-pop-to-backtrace t] - ["Send Quit Signal" thread-list-send-quit-signal t] - ["Send Error Signal" thread-list-send-error-signal t])) - map) - "Local keymap for `thread-list-mode' buffers.") +(defvar-keymap thread-list-mode-map + :doc "Local keymap for `thread-list-mode' buffers." + :parent tabulated-list-mode-map + "b" #'thread-list-pop-to-backtrace + "s" nil + "s q" #'thread-list-send-quit-signal + "s e" #'thread-list-send-error-signal + :menu + '("Threads" + ["Show backtrace" thread-list-pop-to-backtrace t] + ["Send Quit Signal" thread-list-send-quit-signal t] + ["Send Error Signal" thread-list-send-error-signal t])) (define-derived-mode thread-list-mode tabulated-list-mode "Thread-List" "Major mode for monitoring Lisp threads." -- 2.39.5