Skip to content

Commit

Permalink
global mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Artawower committed Feb 19, 2023
1 parent 5fd954b commit a736b3c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions buffer-hop.el
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ DIRECTION is the direction to move, it can be `forward' or `backward'."
(bh--move-to-buffer 'backward)
(previous-buffer)))

;;;###autoload
(define-minor-mode buffer-hop-mode
"Buffer hop mode.
Expand All @@ -150,6 +151,16 @@ When `buffer-hop-mode' is enabled, all buffer navigation will be stored"
(setq buffer-hop--get-ordered-persp-buffers nil)
(remove-hook 'buffer-hop--buffer-changed-hook #'bh--store-new-buffer)))

;;;###autoload
(define-globalized-minor-mode
global-buffer-hop-mode
buffer-hop-mode
(lambda ()
(unless buffer-hop-mode
(buffer-hop-mode)))
:group 'buffer-hop)




(provide 'buffer-hop)
Expand Down

0 comments on commit a736b3c

Please sign in to comment.