diff options
-rw-r--r-- | common.el | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -426,6 +426,20 @@ mark at the end for the first yank." (define-key ctl-x-r-map (vector ?p) #'point-to-register) +;;; Save anonymous bookmark in a register + +(load-after-function bookmark-make-record "bookmark-conf.el" + "Fake function that loads bookmarks." nil) + +(defun durand-bookmark-to-register (register) + "Store an anonymous bookmark in register REGISTER. +Use \\[jump-to-register] to jump to the bookmark." + (interactive + (list (register-read-with-preview "Bookmark to register: "))) + (set-register register (cons 'bookmark (bookmark-make-record)))) + +(define-key ctl-x-r-map (vector ?B) #'durand-bookmark-to-register) + ;;; Intentionally disable some key-bindings. ;; Using byte-code is fun. |