summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2024-02-10 14:51:41 +0800
committerJSDurand <mmemmew@gmail.com>2024-02-10 14:51:41 +0800
commit8e2a1ec184aa27e0a8073b999cc3baafbea52d96 (patch)
treedf6a2cb54c69c5fbd842314ba6fbd399ed3a127b
parentb86b9a70dee3f679ddf4e34a0f02067b3d9c475b (diff)
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.
-rw-r--r--dashboard.el27
1 files 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