about summary refs log tree commit diff
path: root/users
diff options
context:
space:
mode:
Diffstat (limited to 'users')
-rw-r--r--users/wpcarro/emacs/.emacs.d/wpc/bookmark.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/users/wpcarro/emacs/.emacs.d/wpc/bookmark.el b/users/wpcarro/emacs/.emacs.d/wpc/bookmark.el
index c5e3bf3ac965..04efc7c2e505 100644
--- a/users/wpcarro/emacs/.emacs.d/wpc/bookmark.el
+++ b/users/wpcarro/emacs/.emacs.d/wpc/bookmark.el
@@ -80,6 +80,14 @@
    (format "J%s" (bookmark-kbd b)) `,(intern (format "bookmark-visit-%s" (bookmark-label b)))
    (format "j%s" (bookmark-kbd b)) `,(intern (format "bookmark-browse-%s" (bookmark-label b)))))
 
+(defun bookmark-install-kbd (x)
+  "Install the keybindings for a bookmark, X."
+  (general-define-key
+    :prefix "<SPC>"
+    :states '(normal)
+    (format "J%s" (bookmark-kbd x)) (lambda () (interactive) (find-file (bookmark-path x)))
+    (format "j%s" (bookmark-kbd x)) (lambda () (interactive) (bookmark-open (bookmark-path x)))))
+
 (defun bookmark-install-kbds ()
   "Install the keybindings defined herein."
   (->> bookmark-whitelist