From 8e2a1ec184aa27e0a8073b999cc3baafbea52d96 Mon Sep 17 00:00:00 2001 From: JSDurand Date: Sat, 10 Feb 2024 14:51:41 +0800 Subject: dashboard: let-bind for shorter lines * dashboard.el (dashboard-mode-map): Bind it to a short name so that the calls to `define-key` can fit in one line. --- dashboard.el | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/dashboard.el b/dashboard.el index 40ddbda..301833e 100644 --- a/dashboard.el +++ b/dashboard.el @@ -74,19 +74,20 @@ If FORCE is non-nil, re-gerenate the dashboard buffer." The main purpose is to provide a dedicated keymap to access common functionalities more conveniently.") -(define-key dashboard-mode-map (vector ?l) #'blist) -(define-key dashboard-mode-map (vector ?L) #'rlist-list-registers) -(define-key dashboard-mode-map (vector ?b) #'bookmark-jump) -(define-key dashboard-mode-map (vector ?T) #'modeline-toggle) -(define-key dashboard-mode-map (vector ?t) - #'durand-view-timers-or-temps) -(define-key dashboard-mode-map (vector ?o) #'durand-open-object) -(define-key dashboard-mode-map (vector ?g) #'gnus) -(define-key dashboard-mode-map (vector ?a) #'dashboard-org-agenda) -(define-key dashboard-mode-map (vector ?c) #'dashboard-clear) -(define-key dashboard-mode-map (vector ?C) #'dashboard-org-capture) -(define-key dashboard-mode-map (vector ?p) #'project-switch-project) -(define-key dashboard-mode-map (vector ?x) #'execute-extended-command) +(let ((m dashboard-mode-map)) + (define-key m (vector ?l) #'blist) + (define-key m (vector ?L) #'rlist-list-registers) + (define-key m (vector ?b) #'bookmark-jump) + (define-key m (vector ?b) #'durand-jump-bookmark-new-tab) + (define-key m (vector ?T) #'modeline-toggle) + (define-key m (vector ?t) #'durand-view-timers-or-temps) + (define-key m (vector ?o) #'durand-open-object) + (define-key m (vector ?g) #'gnus) + (define-key m (vector ?a) #'dashboard-org-agenda) + (define-key m (vector ?c) #'dashboard-clear) + (define-key m (vector ?C) #'dashboard-org-capture) + (define-key m (vector ?p) #'project-switch-project) + (define-key m (vector ?x) #'execute-extended-command)) ;; load Org if not loaded already -- cgit v1.2.3-18-g5258