From 7c558f7c53eb882c04dc9a046476c58b29e60f0a Mon Sep 17 00:00:00 2001 From: William Carroll Date: Thu, 6 Jan 2022 14:08:19 -0800 Subject: fix(wpcarro/emacs): Redefine bookmark-install-kbd as public fn I originally refactored this by inlining it as a lambda function, but I was ignoring the fact that my work machines relied on it because I have Elisp code in google-briefcase that calls `bookmark-install-kbd`. Change-Id: I03804250fdfdc22be1445718a061a46461eb9af8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4820 Tested-by: BuildkiteCI Reviewed-by: wpcarro --- users/wpcarro/emacs/.emacs.d/wpc/bookmark.el | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'users/wpcarro/emacs/.emacs.d') diff --git a/users/wpcarro/emacs/.emacs.d/wpc/bookmark.el b/users/wpcarro/emacs/.emacs.d/wpc/bookmark.el index c5e3bf3ac9..04efc7c2e5 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 "" + :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 -- cgit 1.4.1